Skip to content

Schema ToolsΒΆ

schema_inspectΒΆ

Get column details for any table.

> schema_inspect orders --warehouse prod-snowflake

Table: ANALYTICS.PUBLIC.ORDERS

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Column       β”‚ Type         β”‚ Nullable β”‚ Primary Key β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ order_id     β”‚ NUMBER(38,0) β”‚ NO       β”‚ YES         β”‚
β”‚ customer_id  β”‚ NUMBER(38,0) β”‚ NO       β”‚ NO          β”‚
β”‚ order_date   β”‚ TIMESTAMP_NTZβ”‚ NO       β”‚ NO          β”‚
β”‚ amount       β”‚ DECIMAL(12,2)β”‚ YES      β”‚ NO          β”‚
β”‚ status       β”‚ VARCHAR(50)  β”‚ YES      β”‚ NO          β”‚
β”‚ _loaded_at   β”‚ TIMESTAMP_NTZβ”‚ NO       β”‚ NO          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
6 columns

Parameters: - table (required): Table name (schema-qualified: schema.table or just table) - schema_name (optional): Schema to search in - warehouse (optional): Connection name


schema_indexΒΆ

Index your warehouse metadata into a local SQLite cache for fast searching.

> schema_index prod-snowflake

Indexing ANALYTICS warehouse...
  Schemas indexed: 12
  Tables indexed: 847
  Columns indexed: 15,293

Cache saved to ~/.altimate/cache/prod-snowflake.db

Run this once per warehouse (or periodically to refresh). Enables schema_search and powers schema-aware autocomplete.


Search indexed metadata by keyword to find tables, columns, and schemas.

> schema_search "revenue" --warehouse prod-snowflake

Tables:
  1. ANALYTICS.MARTS.FCT_REVENUE (42 columns), "Monthly revenue fact table"
  2. ANALYTICS.STAGING.STG_REVENUE_EVENTS (18 columns)

Columns:
  1. ANALYTICS.MARTS.FCT_ORDERS.total_revenue (DECIMAL)
  2. ANALYTICS.MARTS.DIM_PRODUCTS.revenue_category (VARCHAR)
  3. ANALYTICS.RAW.STRIPE_CHARGES.revenue_amount (FLOAT)

Parameters: - query (required): Search term - warehouse (optional): Limit to one connection - limit (optional): Max results


schema_cache_statusΒΆ

Check cache freshness across all warehouses.

> schema_cache_status

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Warehouse       β”‚ Schemas  β”‚ Tables β”‚ Columns β”‚ Last Indexed        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ prod-snowflake  β”‚ 12       β”‚ 847    β”‚ 15,293  β”‚ 2026-02-26 14:30:00 β”‚
β”‚ dev-duckdb      β”‚ 2        β”‚ 23     β”‚ 156     β”‚ 2026-02-25 09:15:00 β”‚
β”‚ bigquery-prod   β”‚ n/a      β”‚ n/a    β”‚ n/a     β”‚ Never               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

schema_detect_piiΒΆ

Scan columns for potential PII (personally identifiable information).

> schema_detect_pii --warehouse prod-snowflake --schema PUBLIC

PII Findings:

  ⚠ ANALYTICS.PUBLIC.USERS.email (VARCHAR)
    Category: EMAIL_ADDRESS
    Confidence: high
    Recommendation: Apply masking policy

  ⚠ ANALYTICS.PUBLIC.USERS.phone_number (VARCHAR)
    Category: PHONE_NUMBER
    Confidence: high

  ⚠ ANALYTICS.PUBLIC.USERS.ip_address (VARCHAR)
    Category: IP_ADDRESS
    Confidence: medium

  ⚠ ANALYTICS.PUBLIC.ORDERS.shipping_address (VARCHAR)
    Category: PHYSICAL_ADDRESS
    Confidence: medium

4 potential PII columns found in PUBLIC schema

Detection categories: email, phone, SSN, credit card, IP address, physical address, date of birth, name patterns


schema_tagsΒΆ

Read metadata tags on warehouse objects (Snowflake object tagging, BigQuery labels).

> schema_tags --warehouse prod-snowflake --object_name USERS

Tags on ANALYTICS.PUBLIC.USERS:
  data_classification: CONFIDENTIAL
  pii_level: HIGH
  owner_team: platform
  retention_days: 365

schema_diffΒΆ

Compare schema changes between two SQL versions to understand migration impact.

> schema_diff \
    --old_sql "CREATE TABLE orders (id INT, amount FLOAT, status TEXT)" \
    --new_sql "CREATE TABLE orders (id INT, amount DECIMAL(12,2), status TEXT, created_at TIMESTAMP)"

Schema Changes:
  ~ Modified: amount (FLOAT β†’ DECIMAL(12,2)), severity: medium
  + Added: created_at (TIMESTAMP), severity: low

Impact: Type change on 'amount' may affect downstream consumers expecting FLOAT