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

Analyzing Data

Answers business questions by querying the data warehouse with SQL and caching reusable query strategies.

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

What it does

  • Covers the full analysis loop: pattern lookup, concept lookup, table discovery, query execution, and caching of results
  • Provides run_sql, run_sql_pandas, and run_sql_many kernel functions, with run_sql_many executing independent queries concurrently
  • Enforces cache-first lookups and records concept-to-table mappings and query outcomes before presenting findings
  • Designed for ad-hoc counts, metrics, trends, joins, and lookups that need live warehouse data

Install

$ npx -y skills add astronomer/agents --skill analyzing-data -y

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

Files

Data Analysis

Answer business questions by querying the data warehouse. The kernel auto-starts on first exec call.

All CLI commands below are relative to this skill's directory. Before running any scripts/cli.py command, cd to the directory containing this file.

Workflow

  1. Pattern lookup — Check for a cached query strategy:

    uv run scripts/cli.py pattern lookup "<user's question>"
    

    If a pattern exists, follow its strategy. Record the outcome after executing:

    uv run scripts/cli.py pattern record <name> --success  # or --failure
    
  2. Concept lookup — Find known table mappings:

    uv run scripts/cli.py concept lookup <concept>
    
  3. Table discovery — If cache misses, search the codebase (Grep pattern="<concept>" glob="**/*.sql") or query INFORMATION_SCHEMA. See reference/discovery-warehouse.md.

  4. Execute query:

    uv run scripts/cli.py exec "df = run_sql('SELECT ...')"
    uv run scripts/cli.py exec "print(df)"
    

Details

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

More from astronomer/agents

All 24

Similar to Analyzing Data

More Data Science & Analytics