# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3 (ipykernel)
#     language: python
#     name: python3
# ---

# ## Setup

# %load_ext sql
# %config SqlMagic.autocommit=False # avoiding the error: FAILED: IllegalStateException COMMIT is not supported yet.
# %sql hive://hadoop@localhost:10000/

# # Time It

# ## Count all rows

# %time %sql select count(*) from movielens.ratings

# %time %sql select count(*) from movielens_parquet.ratings

# %time %sql select count(*) from movielens_parquet_compressed.ratings

# ## Get max(userid)

# %time %sql select max(userid) from movielens.ratings

# %time %sql select max(userid) from movielens_parquet.ratings

# %time %sql select max(userid) from movielens_parquet_compressed.ratings

# ## Save all Ratings into a Variable

# %%time
# test_1 = %sql select userid from movielens.ratings

# %%time
# test_2 = %sql select userid from movielens_parquet.ratings

# %%time
# test_3 = %sql select userid from movielens_parquet_compressed.ratings

StarcoderdataJupyterScriptsDedupFiltered