mcpdata Request an invite

Answers / Comparisons

Uploading files to ChatGPT vs connecting a database: which is better for analysis?

Recipe verified on Ran on the public demo (read-only)
Short answer

Uploading a file is quicker for a one-off look at a small file. Connecting a database is better once the data is large, used again, shared, or needs exact numbers: it's loaded once, every question runs over all the rows, and the data is still there next time.

Steps

  1. Connect your assistant to the public demo. It's a read-only instance with 10 million synthetic orders, so you can try this before you have your own. In Claude Code:
    claude mcp add --transport http mcpdata-demo https://demo.mcpdata.org/mcp --header "Authorization: Bearer cdb_live_PkVoldus8qcE-hqffjajNZzQwiA7rTHMoR4RLSAxsCE"

    The key is public on purpose: it can only read the demo's sample data. For Claude Desktop, Cursor and other apps, see Connect your AI.

  2. Ask your question. Give your AI this prompt:
    Using mcpdata, average order value by category in Demo.Orders.
What your AI does: the tool call it makes for this prompt, and what came back
query(table_name="Demo.Orders", group_by=["category"], agg=[{"func": "avg", "column": "revenue", "alias": "avg_order_value"}], sort=[{"column": "avg_order_value", "desc": true}]) → 12 rows
What you should get · the recipe's real result from its last run
categoryavg_order_value
Laptops1,744.75
Cameras1,125.89
Phones826.12
Tablets673.39
Monitors526.99
Storage329.46
Gaming311.86
Audio209.96
Networking197.03
Smart Home163.29
Software136.99
Accessories54.45

Synthetic data: the demo's orders are generated, not real customers.

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

Why this works

Upload: no setup, but limited by the sandbox's memory and time, re-read every session, and the arithmetic happens in generated code you rarely check. Database: one-time setup, then exact, repeatable queries over any size, shared with your other tools and with colleagues, plus history and scheduled reports. The call below runs over 10 million orders, which is far more than a chat upload handles comfortably.

Related questions