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

Checking Freshness

Quick data freshness check that reports how recently a table was updated and whether it is stale.

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

What it does

  • Covers timestamp column discovery, last-update queries, and recent row counts by day over a 7-day window
  • Includes a four-level status scale (Fresh, Stale, Very Stale, Unknown) keyed to hours since the last update
  • Guides a follow-up Airflow check of DAG pauses, failed runs, and in-progress runs when data is stale
  • Designed for verifying data currency before a user relies on a table, with a clear yes or no answer

Install

$ npx -y skills add astronomer/agents --skill checking-freshness -y

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

Files

Data Freshness Check

Quickly determine if data is fresh enough to use.

Freshness Check Process

For each table to check:

1. Find the Timestamp Column

Look for columns that indicate when data was loaded or updated:

  • _loaded_at, _updated_at, _created_at (common ETL patterns)
  • updated_at, created_at, modified_at (application timestamps)
  • load_date, etl_timestamp, ingestion_time
  • date, event_date, transaction_date (business dates)

Query INFORMATION_SCHEMA.COLUMNS if you need to see column names.

2. Query Last Update Time

SELECT
    MAX(<timestamp_column>) as last_update,
    CURRENT_TIMESTAMP() as current_time,
    TIMESTAMPDIFF('hour', MAX(<timestamp_column>), CURRENT_TIMESTAMP()) as hours_ago,
    TIMESTAMPDIFF('minute', MAX(<timestamp_column>), CURRENT_TIMESTAMP()) as minutes_ago
FROM <table>

3. Check Row Counts by Time

For tables with regular updates, check recent activity:

SELECT
    DATE_TRUNC('day', <timestamp_column>) as day,
    COUNT(*) as row_count
FROM <table>
WHERE <timestamp_column> >= DATEADD('day', -7, CURRENT_DATE())
GROUP BY 1
ORDER BY 1 DESC

Freshness Status

Details

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

More from astronomer/agents

All 24

Similar to Checking Freshness

More Data Science & Analytics