Registry / data / dbt-artifacts-parser

dbt-artifacts-parser

JSON →
library0.13.2pypypiunverified

A Python library for parsing dbt artifacts (like `manifest.json`, `run_results.json`, `catalog.json`) into strongly-typed Pydantic objects. It provides Python representations for various dbt artifact schemas, enabling easy programmatic access and manipulation of dbt project metadata and execution results. The library is actively maintained and frequently updated to support the latest stable dbt artifact versions.

pip install dbt-artifacts-parser
INSTALL
IMPORT
SIG · DBT-ARTIFACTS-PARS
D
dbt-artifacts-parser
datapythonv0.13.2
Install
3.3s avg
Import
Disk
28MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.13.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 29.4MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 3.3s · import 0.000s · 29MB
28MB installed
● package 28MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parse_artifact
from dbt_artifacts_parser import parse_artifact
from dbt_artifacts_parser import parse_artifact

This quickstart demonstrates how to load a dbt artifact JSON (here, a minimal manifest) and parse it into a Pydantic object using `parse_artifact` and the appropriate schema class (e.g., `ManifestV10`). You can then access artifact data via dot notation.

import json from dbt_artifacts_parser.parser import parse_artifact from dbt_artifacts_parser.schema.manifest import ManifestV10 # In a real scenario, you'd load your manifest.json file, e.g.: # with open('path/to/manifest.json', 'r') as f: # manifest_dict = json.load(f) # Example minimal valid manifest structure for demonstration manifest_json_str = """ { "metadata": { "dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v10.json", "dbt_version": "1.7.0", "generated_at": "2023-10-27T10:00:00.000000Z", "invocation_id": "test_invocation", "env": {}, "adapter_type": "postgres", "project_id": "test_project", "user_id": "test_user", "send_anonymous_usage_stats": false, "cdd_id": "" }, "nodes": {}, "sources": {}, "macros": {}, "docs": {}, "exposures": {}, "metrics": {}, "selectors": {}, "disabled": {}, "files": {}, "unit_tests": {}, "artifacts": {} } """ manifest_dict = json.loads(manifest_json_str) # Parse the dictionary into a strongly-typed Pydantic object manifest = parse_artifact(manifest_dict, ManifestV10) print(f"Parsed dbt Manifest (dbt version: {manifest.metadata.dbt_version})") print(f"Schema version: {manifest.metadata.dbt_schema_version}") print(f"Number of nodes: {len(manifest.nodes)}")
Debug
Known issues
gotchaUsing an incorrect dbt artifact schema version (e.g., `ManifestV10` when your dbt project output `ManifestV11`). The `dbt-artifacts-parser` library supports specific dbt artifact schema versions. Using a schema class that doesn't match the `dbt_schema_version` found within your artifact JSON will lead to `ValidationError` or incomplete/incorrect parsing.
fix
Always check the `dbt_schema_version` field in your artifact JSON (e.g., `"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v10.json"`) and use the corresponding Pydantic schema class (e.g., `ManifestV10`) from `dbt_artifacts_parser.schema.manifest`.
affects: All versions
breakingBreaking changes due to upstream dbt artifact schema updates. As dbt Labs releases new dbt versions, the underlying artifact schemas (like manifest.json structure) can change. While `dbt-artifacts-parser` aims to keep pace, if you upgrade your dbt project version, you may need to upgrade `dbt-artifacts-parser` and potentially update the specific schema class used in your parsing code (e.g., from `ManifestV10` to `ManifestV11`).
fix
After upgrading dbt, check the `dbt-artifacts-parser` changelog or documentation for compatible versions and required schema class updates. Upgrade `dbt-artifacts-parser` and adjust your imports/parsing logic accordingly.
affects: All versions, especially with major dbt upgrades (e.g., dbt v1.0 to v1.1)
gotchaPerformance and memory usage with very large dbt artifact files. Parsing extremely large `manifest.json` or `run_results.json` files from complex dbt projects can be memory-intensive as the entire artifact is loaded into Python objects. This might lead to high memory consumption or slow processing times.
fix
If performance or memory becomes an issue, consider pre-processing large artifact files (e.g., using `jq` or streaming JSON parsers) to extract only the necessary parts before feeding them to `dbt-artifacts-parser`, or optimize your dbt project to reduce artifact size.
affects: All versions
Upgrade
Version history
0.13.2latest on PyPI · released May 7, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
2
Resources
dbt-artifacts-parser — pip install dbt-artifacts-parser · libregistry