A pipeline returning a 'Success' exit code doesn't guarantee the data it loaded is current. Using dlt's built-in metadata table `_dlt_loads`, you can join `load_id` with your source table and compare the source's native timestamp against dlt's `inserted_at` to detect stale data. A step-by-step example using a mock lemonade stand data source and DuckDB demonstrates how to build a freshness check that distinguishes between 'pipeline ran' and 'data is actually up to date'.

3m read timeFrom dlthub.com
Post cover image
Table of contents
Introduction Link iconThe setup: a source with a native timestamp Link iconStep 1: Check when the pipeline ran - not what it loaded Link iconStep 2: Load stale data and watch the pipeline check miss it Link iconStep 3: Check data freshness by joining on load_id Link icon

Sort: