mcpdata Request an invite

Answers / Get data into your AI

How do I load Parquet files so an AI can query them?

Recipe verified on Ran on a private test instance
Short answer

Sync the folder with cdb-localdata, the same as CSV: each .parquet file becomes a table, with its column types kept. Your AI queries it over MCP with exact results. ORC files work the same way.

Steps

  1. Connect your assistant to your instance (this writes, so it needs your own instance with a ReadWrite key from the accounts portal; the public demo is read-only). In Claude Code:
    claude mcp add --transport http mcpdata https://[you].mcpdata.org/mcp --header "Authorization: Bearer $CDB_API_KEY"

    Replace [you] with your instance's name. Other apps: Connect your AI.

  2. Install the client and sign it in.
    pip install https://[you].mcpdata.org/help/download/cdb-0.3.4-py3-none-any.whl
    cdb-localdata login --to https://[you].mcpdata.org
  3. Add the folder and sync it. Here the sample orders_sample.parquet:
    cdb-localdata add ./samples/parquet --to https://[you].mcpdata.org --namespace pq
    cdb-localdata sync
  4. Ask your question. Give your AI this prompt:
    Using mcpdata, average order value per channel in pq.orders_sample.
What your AI does: the tool calls it makes for this prompt, and what came back
describe_table(table_name="pq.orders_sample") → 15 columns, 100,000 rows
query(table_name="pq.orders_sample", group_by=["channel"], agg=[{"func": "avg", "column": "revenue", "alias": "avg_order_value"}, {"func": "count", "column": "order_id", "alias": "orders"}]) → 3 rows
What you should get · the recipe's real result from its last run
channelavg_order_valueorders
Store537.1432,938
Online531.4755,059
Partner534.8612,003

The assistant needs mcpdata connected (step 1) to run the query.

Why this works

Parquet already carries column names and types, so nothing is guessed on the way in: integers stay integers and timestamps stay timestamps. Loading keeps the data columnar, which suits the summaries an AI asks for.

Related questions