Skip to main content

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 Setup
Simple Health Check

Model Health Monitoring

Get Model Health Status Monitor the health of all models in a dbt run, including execution status, test results, and performance metrics.
Filter by Health Status

Test Results

Source Freshness

Sources are loaded from a dedicated source freshness schedule (e.g. one running dbt source freshness), not from your main dbt run schedule.

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 Dependencies
Downstream Impact

Health Dashboard

Advanced Features

Performance Summary
Streaming Large Datasets For large metadata datasets, stream results in batches to avoid memory pressure.
Cache Management

Configuration

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 via query_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
Pre-calculated model health with test counts.
Example Queries

API Reference

MetadataClient Data Models

Troubleshooting

Common Issues
Error Handling
For advanced use cases, use query_sql to run custom SQL directly against the DuckDB metadata database and return results as a polars DataFrame.