Collate dbt Artifacts Parser is a Python library that provides a structured way to parse dbt artifacts like `manifest.json` and `run_results.json` into Pydantic models. It leverages `dbt-artifacts-parser` and simplifies access to dbt project metadata. The current version is 0.1.4, and its release cadence is tied to internal dbt-labs development, though it's publicly available.
pip install collate-dbt-artifacts-parserVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to parse a dbt `manifest.json` file using `DbtArtifactParser`. It creates a mock manifest file, initializes the parser with the correct artifact type and schema version, and then parses the file into a Pydantic model. Remember to replace the mock content and path with your actual dbt artifact file.
Always check the `dbt_schema_version` field within your dbt artifact JSON and use the corresponding `vX` in the `DbtArtifactParser` constructor. Consult the `dbt-artifacts-parser` documentation for a mapping of schema URLs to `vX` identifiers.
Be mindful of explicit version pinning for both `collate-dbt-artifacts-parser` and its dependency `dbt-artifacts-parser`. If encountering unexpected parsing issues, verify the compatibility of your installed `dbt-core` version with the `dbt-artifacts-parser` library.
Exercise caution and thorough testing when upgrading versions, especially in critical pipelines. Rely primarily on the documented API and assume the primary goal is to serve dbt-labs' internal needs first.