New advertisers: 50% off your first month with code FIRSTMONTHSee slots
astronomer avatar

Profiling Tables

Deep data profile of a named table covering metadata, column statistics, cardinality, and quality scoring.

skills.sh installs
1.1K
GitHub stars
463
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers basic metadata, size, column-level statistics, cardinality, sample rows, and a data quality assessment
  • Includes type-specific SQL for numeric, string, and date/timestamp columns, plus completeness, uniqueness, freshness, validity, and consistency checks
  • Produces a structured report with a schema table, key statistics, quality scores, potential issues, and recommended queries
  • Designed for analysts who need to understand an unfamiliar table, and requires a table name to run

Install

$ npx -y skills add astronomer/agents --skill profiling-tables -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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:

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:

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

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>

Details

Repository
github.com/astronomer/agents
Categories
Databases, Data Science & Analytics
First seen
Apr 16, 2026

More from astronomer/agents

All 24

Similar to Profiling Tables

More Databases