# Load parquet into instant databases and query it Source: https://www.hotdata.dev/use-cases/dataset-uploads Site index: https://www.hotdata.dev/llms.txt Parquet dumps and other one-offs usually need to live next to warehouse tables. Load them into an instant database, inspect the shape, then join them with everything else without standing up another pipeline. ## How it works ### Step 1: Upload from a file **Claude** ``` Create an instant database with catalog q2, declare a targets table, and load targets.parquet into it. What do I type in SQL to read it? ``` **CLI** ```bash hotdata databases create --catalog q2 --table targets hotdata databases load --catalog q2 --table targets --file ./targets.parquet ``` **Python SDK** ```python import hotdata db_api = hotdata.DatabasesApi(api_client) db = db_api.create_database( hotdata.CreateDatabaseRequest( name="Q2 targets", schemas=[hotdata.DatabaseDefaultSchemaDecl( name="public", tables=[hotdata.DatabaseDefaultTableDecl(name="targets")] )] ) ) uploads = hotdata.UploadsApi(api_client) with open("targets.parquet", "rb") as f: up = uploads.upload_file(f.read()) conn_api = hotdata.ConnectionsApi(api_client) conn_api.load_managed_table( db.default_connection_id, "public", "targets", hotdata.LoadManagedTableRequest(mode="replace", upload_id=up.upload_id), ) # Query as: SELECT * FROM default.public.targets ``` ### Step 2: Load more files into the same database **Claude** ``` Load accounts.parquet as an accounts table into the same q2 database. ``` **CLI** ```bash hotdata databases load --catalog q2 --table accounts --file ./accounts.parquet ``` **Python SDK** ```python import hotdata uploads = hotdata.UploadsApi(api_client) with open("accounts.parquet", "rb") as f: up = uploads.upload_file(f.read()) conn_api = hotdata.ConnectionsApi(api_client) conn_api.load_managed_table( "", "public", "accounts", hotdata.LoadManagedTableRequest(mode="replace", upload_id=up.upload_id), ) ``` ### Step 3: Inspect before you join **Claude** ``` Show my instant databases and list the tables inside q2. ``` **CLI** ```bash hotdata databases list hotdata databases tables list ``` **Python SDK** ```python import hotdata db_api = hotdata.DatabasesApi(api_client) db_api.list_databases() db_api.get_database("") ``` ### Step 4: Query like any other table **Claude** ``` Match my Q2 targets to sales accounts on account id. Give me account_id and plan for up to 50 pairs. ``` **CLI** ```bash hotdata query "SELECT t.account_id, s.plan FROM q2.public.targets t JOIN sales.public.accounts s ON s.id = t.account_id LIMIT 50" ``` **Python SDK** ```python import hotdata query_api = hotdata.QueryApi(api_client) query_api.query( hotdata.QueryRequest( sql=( "SELECT t.account_id, s.plan FROM default.public.targets t " "JOIN sales.public.accounts s ON s.id = t.account_id LIMIT 50" ), ), ) ``` ## Who uses this - Ops bringing in recurring CSV extracts without touching warehouse DDL. - Analytics freezing cohort definitions as stable instant-database tables. - Automation that reads uploaded tables by name instead of parsing attachments ad hoc.