Overview
The Paradime Python SDK Metadata module helps you query and analyze dbt™ metadata from Bolt runs. Use it to monitor model health, analyze dbt test results, track source freshness, and explore upstream/downstream lineage. It uses a local DuckDB database and returns results as high-performance polars DataFrames.- Query dbt artifacts like
manifest.json,run_results.json, and source freshness results - Build reliability checks around failing models, failing tests, and stale sources
- Run ad-hoc SQL with
query_sql()against the DuckDB metadata schema
The Metadata SDK is available in Python SDK version 4.18.0+ and requires a Paradime account with access to dbt metadata.
These examples authenticate with an account API key (
api_secret="prdm_cmp_..." plus workspace_uid), which requires paradime-io 6.0.0 or later. Legacy workspace API keys (api_key + api_secret) are still supported. See Getting Started.Quick Start
Basic SetupModel Health Monitoring
Get Model Health Status Monitor the health of all models in a dbt run, including execution status, test results, and performance metrics.- Failing models
- Slowest models
Test Results
Source Freshness
Custom SQL Queries
The metadata SDK exposes a DuckDB database you can query directly using SQL. Results are returned as polars DataFrames.query_sql returns a polars.DataFrame. Use .iter_rows(named=True) to iterate with dict-style row access.Dependency Analysis
Upstream DependenciesHealth Dashboard
Advanced Features
Performance SummaryConfiguration
Custom Database Connection By default the SDK uses an in-memory DuckDB instance. Use a file path for persistent storage across sessions.Complete Example
Database Schema
The Metadata SDK loads dbt artifacts into a local DuckDB database. You can query any of these tables directly viaquery_sql.
Core Tables
dbt_run_results
Main table containing execution results for all dbt resources (models, tests, seeds, snapshots).
dbt_source_freshness_results
model_metadata
Extended model metadata and lineage information from manifest.json.
Specialized Tables
Optimized Views
- models_with_tests
- latest_model_results
- dashboard_metrics
Pre-calculated model health with test counts.
- Failed tests
- Performance by schema
- Source freshness alerts
- Downstream lineage
API Reference
MetadataClient
Data Models
- ModelHealth
- HealthDashboard
- SourceFreshness
Troubleshooting
Common Issues- Schedule not found
- No sources returned
- Performance issues
- Stale data
For advanced use cases, use
query_sql to run custom SQL directly against the DuckDB metadata database and return results as a polars DataFrame.