
Profiling Tables
Run a structured SQL profiling workflow on one named table so you know row counts, column stats, and data-quality signals before modeling or shipping features.
Overview
Profiling Tables is an agent skill most often used in Build (also Ship, Operate) that deep-dives one table with SQL metadata and column-level statistics for data quality and onboarding.
Install
npx skills add https://github.com/astronomer/agents --skill profiling-tablesWhat is this skill?
- Step 1: INFORMATION_SCHEMA column metadata (name, type, comment) with table lookup when name is partial
- Step 2: row count and scale via run_sql
- Step 3: per-column stats—numeric min/max/avg/median/nulls/distinct; string length stats; type-appropriate SQL templates
- Output framed for a new teammate onboarding to the dataset
- Requires an explicit table name to start
- 3-step profiling workflow: metadata, size and shape, column-level statistics
Adoption & trust: 742 installs on skills.sh; 384 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You inherited a table name but lack a concise picture of row scale, column types, null rates, and value distributions.
Who is it for?
Builders with SQL access who need a fast, documented snapshot of one production or staging table.
Skip if: Cluster-wide lineage, streaming pipelines, or profiling without a specific table name and SQL execution path.
When should I use this skill?
User asks to profile a table, wants dataset statistics, asks about data quality, or needs to understand a table's structure and content; requires a table name.
What do I get? / Deliverables
You receive a comprehensive table profile—metadata, size, and per-column stats—a new teammate could use to understand the data before modeling or shipping.
- Column metadata summary
- Row count and scale metrics
- Per-column statistical profile
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Table profiling is shelved under Build because solo builders most often invoke it while implementing backends, warehouses, or pipelines; the same profile supports Ship validation and Operate data health checks. Backend is the canonical shelf for dataset structure and content understanding tied to application or warehouse tables.
Where it fits
Profile the events table before adding aggregates to your API response.
Capture null and distinct counts on staging to gate a release migration.
Re-run column stats after an ETL change to confirm distribution drift.
How it compares
Single-table SQL profiling ritual, not a managed observability product or schema migration tool.
Common Questions / FAQ
Who is profiling-tables for?
Solo developers and small teams working on warehouses or app databases who need agent-guided SQL profiling without spinning up a separate DQ suite.
When should I use profiling-tables?
During Build when designing features on a dataset; in Ship when validating data before release; in Operate when investigating quality regressions—whenever you ask to profile a table or understand statistics.
Is profiling-tables safe to install?
The skill assumes run_sql against your database—treat that as sensitive; review the Security Audits panel on this page and scope credentials before use.
SKILL.md
READMESKILL.md - Profiling Tables
# Data Profile Generate a comprehensive profile of a table that a new team member could use to understand the data. ## Step 1: Basic Metadata Query column metadata: ```sql SELECT COLUMN_NAME, DATA_TYPE, COMMENT FROM <database>.INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '<schema>' AND TABLE_NAME = '<table>' ORDER BY ORDINAL_POSITION ``` If the table name isn't fully qualified, search INFORMATION_SCHEMA.TABLES to locate it first. ## Step 2: Size and Shape Run via `run_sql`: ```sql SELECT COUNT(*) as total_rows, COUNT(*) / 1000000.0 as millions_of_rows FROM <table> ``` ## Step 3: Column-Level Statistics For each column, gather appropriate statistics based on data type: ### Numeric Columns ```sql SELECT MIN(column_name) as min_val, MAX(column_name) as max_val, AVG(column_name) as avg_val, STDDEV(column_name) as std_dev, PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY column_name) as median, SUM(CASE WHEN column_name IS NULL THEN 1 ELSE 0 END) as null_count, COUNT(DISTINCT column_name) as distinct_count FROM <table> ``` ### String Columns ```sql SELECT MIN(LEN(column_name)) as min_length, MAX(LEN(column_name)) as max_length, AVG(LEN(column_name)) as avg_length, SUM(CASE WHEN column_name IS NULL OR column_name = '' THEN 1 ELSE 0 END) as empty_count, COUNT(DISTINCT column_name) as distinct_count FROM <table> ``` ### Date/Timestamp Columns ```sql SELECT MIN(column_name) as earliest, MAX(column_name) as latest, DATEDIFF('day', MIN(column_name), MAX(column_name)) as date_range_days, SUM(CASE WHEN column_name IS NULL THEN 1 ELSE 0 END) as null_count FROM <table> ``` ## Step 4: Cardinality Analysis For columns that look like categorical/dimension keys: ```sql SELECT column_name, COUNT(*) as frequency, ROUND(COUNT(*) * 100.0 / SUM(COUNT(*)) OVER(), 2) as percentage FROM <table> GROUP BY column_name ORDER BY frequency DESC LIMIT 20 ``` This reveals: - High-cardinality columns (likely IDs or unique values) - Low-cardinality columns (likely categories or status fields) - Skewed distributions (one value dominates) ## Step 5: Sample Data Get representative rows: ```sql SELECT * FROM <table> LIMIT 10 ``` If the table is large and you want variety, sample from different time periods or categories. ## Step 6: Data Quality Assessment Summarize quality across dimensions: ### Completeness - Which columns have NULLs? What percentage? - Are NULLs expected or problematic? ### Uniqueness - Does the apparent primary key have duplicates? - Are there unexpected duplicate rows? ### Freshness - When was data last updated? (MAX of timestamp columns) - Is the update frequency as expected? ### Validity - Are there values outside expected ranges? - Are there invalid formats (dates, emails, etc.)? - Are there orphaned foreign keys? ### Consistency - Do related columns make sense together? - Are there logical contradictions? ## Step 7: Output Summary Provide a structured profile: ### Overview 2-3 sentences describing what this table contains, who uses it, and how fresh it is. ### Schema | Column | Type | Nulls% | Distinct | Description | |--------|------|--------|----------|-------------| | ... | ... | ... | ... | ... | ### Key Statistics - Row count: X - Date range: Y to Z - Last updated: timestamp ### Data Quality Score - Completeness: X/10 - Uniqueness: X/10 - Freshness: X/10 - Overall: X/10 ### Potential Issues List any data quality concerns discovered. ### Recommended Queries 3-5 useful queries for common questions about this data.