Back to Snowflake in Excel
SheetXAI logo
Snowflake logo
Snowflake · Excel Guide

Run a Data Quality Audit Across Snowflake Tables Into a Excel workbook

2026-05-14
5 min read

The Scenario

A stakeholder email arrived Friday morning: the client governance review is next Thursday, and they want a data quality report covering your 15 core Snowflake tables. Null rates on primary keys. Duplicate counts. Total row counts. One clean Excel sheet, one row per table, ready to share.

You've done data quality checks before. You know what they involve: writing a bespoke COUNT(*) and COUNT(DISTINCT pk) for each table, running each query separately in SnowSight, copying the result into Excel, aligning columns, double-checking that table names match.

For 15 tables that's 15 separate queries and 15 copy-paste cycles. You'll catch the mistake in table 9 only after you've already sent the sheet to the client.

The bad version:

  • Write a null-check query for CUSTOMERS, run it in SnowSight, note the result in the Excel sheet
  • Write the same query for ORDERS, run it, note the result — and realize you forgot to include duplicate detection
  • Rebuild the query template to include all three checks, then discover that INVOICES uses a composite primary key and the template breaks

The governance report is due Thursday. You have other work until then.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Excel workbook. It reads the workbook, connects to Snowflake through its built-in integration, and can run validation queries across multiple tables in sequence — writing one structured result row per table directly into your worksheet.

Open a blank Excel worksheet and paste this into the SheetXAI sidebar:

For each of these 10 Snowflake tables in DB PROD schema PUBLIC: CUSTOMERS, ORDERS, PRODUCTS, INVOICES, RETURNS, EVENTS, SESSIONS, LEADS, OPPORTUNITIES, ACCOUNTS — run a query to count total rows, count null primary key values, and count duplicate primary key values, then write one result row per table in this sheet with columns: table_name, total_rows, null_pks, duplicate_pks

What You Get

  • One row per table in the worksheet: table_name, total_rows, null_pks, duplicate_pks
  • Each metric computed directly in Snowflake — no sampling, no estimation
  • Tables in the order listed, column labels in row 1
  • Inaccessible tables flagged in the row rather than silently omitted

What If the Data Is Not Quite Ready

Some tables use composite primary keys

For Snowflake tables in DB PROD schema PUBLIC: ORDERS (pk: order_id), INVOICES (composite pk: invoice_id + line_item_id), RETURNS (pk: return_id) — for each table count total rows, count rows where any pk column is null, and count duplicate pk combinations — write table_name, total_rows, null_pks, duplicate_pks into this Excel sheet

You need column-level null rates, not just primary key checks

Query Snowflake schema ANALYTICS.DW and find all columns with a null rate above 15% — write database, schema, table_name, column_name, null_count, total_rows, and null_pct into this Excel sheet sorted by null_pct descending

Compare current row counts to expected minimums and flag anything below threshold

For Snowflake tables CUSTOMERS, ORDERS, PRODUCTS in DB PROD schema PUBLIC — count total rows, compare to these minimums: CUSTOMERS 50000, ORDERS 200000, PRODUCTS 5000 — write table_name, total_rows, expected_minimum, and status (OK or BELOW) into this Excel sheet

Full audit with null rates, duplicates, and a summary row

For these 10 Snowflake tables in PROD.PUBLIC: CUSTOMERS, ORDERS, PRODUCTS, INVOICES, RETURNS, EVENTS, SESSIONS, LEADS, OPPORTUNITIES, ACCOUNTS — count total_rows, null_pks, duplicate_pks, and calculate null_pk_rate — write one row per table into this Excel sheet, add a summary row at the bottom showing totals and which table has the highest null_pk_rate

The pattern: the analytics and the report are the same instruction — not a dozen round trips to SnowSight followed by a formatting pass in Excel.

Try It

Get the 7-day free trial of SheetXAI and open a blank Excel workbook, then ask it to run null checks, duplicate counts, and row validation across your Snowflake tables in one pass. Also see run a SQL query into an Excel workbook for ad-hoc queries, or return to the Snowflake integration overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more