Back to cookbook

AI Prompt to Explore and Summarize a Snowflake Dataset via Snowflake's MCP Server

0 views Published

Make this prompt yours

Share

This AI prompt is for analysts and data scientists who want a fast first pass over an unfamiliar table in Snowflake, using Snowflake's MCP server to query schema, row counts, and sample data directly instead of writing exploratory SQL by hand before any real analysis starts. Once Snowflake is connected over MCP, the assistant can read column types, null rates, and value distributions live and turn that into a plain-language profile of the dataset.

The prompt asks the model to describe what each column likely represents, flag data quality issues such as unexpected nulls or inconsistent formatting, and suggest which columns are worth deeper analysis for the stated goal. It is meant for the first 15 minutes of working with a new table, not as a substitute for a full data quality audit on production pipelines.

Because exploratory summaries are only useful if they're grounded in what the data actually contains rather than guessed from column names, keeping the MCP connection live during the session matters more here than in most prompts. For tables too large to paste in full, the Context Extractor can pull just the relevant sample rows or schema excerpts needed for this kind of profiling.

Prompt template

Make this prompt yours

prompt-template
272 tokens
ROLE: You are a data analyst assistant helping profile an unfamiliar database table before analysis. CONTEXT: - Table name: [SCHEMA.TABLE_NAME] - Analysis goal: [WHAT YOU ARE TRYING TO ANSWER OR BUILD WITH THIS DATA] - Schema: [LIST COLUMN NAMES AND DATA TYPES] - Sample rows: [PASTE 10-20 SAMPLE ROWS] - Row count and known constraints: [TOTAL ROW COUNT, ANY KNOWN PRIMARY/FOREIGN KEYS] TASK: 1. For each column, state what it likely represents based on its name and sample values. 2. Flag columns with unexpected nulls, inconsistent formatting, or suspicious outlier values. 3. Identify which columns are most relevant to the stated analysis goal. 4. Note any data quality concerns that should be resolved before using this table in analysis. CONSTRAINTS: - Base conclusions only on the schema and sample data provided; do not assume business logic that isn't shown. - Clearly separate "likely meaning" from "confirmed meaning" when the sample data is ambiguous. OUTPUT FORMAT: - A short table-level summary (what this table appears to represent) - A column-by-column breakdown: name, likely meaning, data quality notes - A ranked list of columns most relevant to the stated analysis goal - A list of open data quality concerns to verify before analysis

Want it sharper? Optimize this prompt with Prompt Optimizer, check it with the Prompt Debugger or shorten it with the Token Optimizer.

Example input

example-input
170 tokens
Table name: ANALYTICS.CUSTOMER_ORDERS Analysis goal: Understand repeat purchase behavior by customer segment Schema: ORDER_ID (VARCHAR), CUSTOMER_ID (VARCHAR), ORDER_DATE (DATE), ORDER_TOTAL (NUMBER), SEGMENT (VARCHAR), DISCOUNT_CODE (VARCHAR) Sample rows: ORD-001, CUST-55, 2026-03-01, 142.50, "premium", NULL; ORD-002, CUST-55, 2026-03-15, 89.00, "premium", "SPRING10"; ORD-003, CUST-91, 2026-03-02, 15.00, NULL, NULL Row count and known constraints: 2.1 million rows, ORDER_ID is primary key, CUSTOMER_ID has no enforced foreign key constraint

When to use it

  • Getting oriented in a new or unfamiliar Snowflake table before building a query on top of it
  • Checking whether a table is clean enough to join into an existing analysis
  • Writing a quick data dictionary for a table that has none
  • Spotting obvious data quality issues before they surface downstream in a report

Best practices

  • Always state the analysis goal upfront so the model prioritizes which columns matter most
  • Ask for actual sample values per column, not just data types, to catch mislabeled or inconsistent fields
  • Request null and distinct-value counts explicitly, since these surface most data quality issues
  • Re-run the profile after any upstream pipeline change rather than trusting an old summary

Common mistakes

  • Asking for a summary without specifying the intended use case, leading to generic, unfocused output
  • Relying on column names alone instead of actual sample data to infer what a field represents
  • Treating a one-time profile as permanently accurate for a table that updates daily
  • Skipping null-rate checks on join keys, which causes silent row loss later

FAQs

How do I query Snowflake directly from ChatGPT or Claude using MCP?

You connect Snowflake's official MCP server (or a compatible hosted connector) with read access to the relevant schema, and the model can then call it as a tool to pull live schema details, row samples, and counts into the conversation.

Does this replace writing SQL for exploratory data analysis?

No. It's meant to speed up the orientation phase before you write SQL, by giving you a quick read on what a table contains and where the issues are, so your first real queries are better targeted.

Can this prompt work with a CSV export instead of a live Snowflake connection?

Yes, you can paste schema and sample rows manually without MCP, though you lose the ability to re-query live for larger samples or updated row counts as the table changes.

How large a sample should I give the model for an accurate profile?

10 to 20 rows is usually enough to spot obvious patterns and nulls, but for tables with many rare categorical values, a larger or stratified sample will catch issues a small sample misses.

What tool can help if my table schema is too large to paste in one go?

Context Extractor — it pulls only the relevant schema sections or sample rows from a large data source, which keeps this kind of profiling prompt focused instead of overloaded with irrelevant columns.

Found this prompt useful? Share it.

Share

More in Data Analysis & Data Science

Data Analysis & Data Science

AI Prompt to Audit BigQuery Query Costs Using Google Cloud's MCP Server

This BigQuery MCP prompt is for data analysts and engineers who want to find out why their Google Cloud bill is climbing without manually di…

ROLE: You are a cloud cost analyst assistant with access to a BigQuery MCP server.

CONTEXT:
- Google Cloud project: [PROJECT_ID]
- Pricing model: [on-demand or flat-rate/slot-based]
- Time window to audit: [TIME_WINDOW, e.g. last 7 days]
- Cost or bytes-scanned threshold to flag: [THRESHOLD]

TASK:
1. Query job and billing metadata for the specified project and time window.
2. Rank queries and scheduled jobs by bytes scanned (or slot-seconds, for flat-rate pricing) above the threshold.
3. Group the results by table or dataset to identify recurring cost patterns.
4. For each high-cost pattern, identify the likely cause (e.g. missing partition filter, SELECT *, unnecessary full table scan, lack of clustering).
5. Recommend a specific fix for each pattern, ordered by estimated cost savings.

CONSTRAINTS:
- Clearly state whether figures are bytes scanned or estimated dollar cost, and note the pricing model used.
- Do not recommend a fix without identifying the specific query or job pattern causing the cost.

OUTPUT FORMAT:
- Summary of total cost/bytes scanned in the audited window
- Ranked list of top cost drivers (query/job, table, bytes or cost)
- Root cause per driver
- Recommended fix per driver, ordered by estimated savings

Make this prompt yours

Data Analysis & Data Science

ChatGPT Prompt to Analyze Open-Ended Survey Responses

This survey analysis prompt is for turning a spreadsheet of open ended survey answers, the free text box rather than the multiple choice que…

ROLE: You are a research analyst summarizing open-ended survey responses for [TEAM/STAKEHOLDER].

CONTEXT:
- Survey question asked: "[EXACT SURVEY QUESTION]"
- Number of responses: [NUMBER]
- Responses: [PASTE RESPONSES, ONE PER LINE OR AS A LIST]

TASK:
1. Group the responses into [NUMBER, E.G. 5-8] distinct themes based on what respondents actually said.
2. For each theme, give a short label, an approximate count or percentage of responses it covers, and 2-3 verbatim quotes.
3. Note any responses that don't fit cleanly into a theme and list them separately as "other."
4. Flag if any theme seems to be driven by a single vocal subgroup rather than a broad pattern, based on the language used.

CONSTRAINTS:
- Do not invent quotes; use only exact text from the provided responses.
- Do not merge themes that are related but distinct, e.g. "price too high" and "unclear pricing page" should stay separate.

OUTPUT FORMAT:
A table (Theme | Approx. Count/% | Example Quotes) followed by an "Other" section for uncategorized responses.

Make this prompt yours

Data Analysis & Data Science

AI Prompt to Query and Summarize MongoDB Collections via MongoDB's MCP Server

This prompt is for data analysts and backend engineers who want an AI assistant like Claude or ChatGPT to query a live MongoDB database thro…

ROLE: You are a data analyst with access to a MongoDB database through an MCP connection.

CONTEXT:
- Database: [DATABASE_NAME]
- Collection: [COLLECTION_NAME]
- Relevant fields: [FIELD_NAMES]
- Time range or filter (if applicable): [DATE_RANGE_OR_CONDITION]

TASK:
1. Query the specified collection through the MCP connection to answer this question: [QUESTION_IN_PLAIN_LANGUAGE].
2. Show the exact query or aggregation pipeline used.
3. Report the total number of documents the query matched.
4. Summarize the result in 2-3 plain-language sentences a non-technical stakeholder could understand.
5. Flag anything unusual in the data, such as missing fields, unexpected nulls, or a result that seems inconsistent with the time range given.

CONSTRAINTS:
- Only report numbers that came from the actual query result, not an estimate.
- If the MCP connection cannot reach the collection, say so instead of guessing an answer.

OUTPUT FORMAT:
- Query used: [pipeline or filter]
- Documents matched: [count]
- Summary: [plain-language explanation]
- Notes: [anything unusual, or "none"]

Make this prompt yours