Add skill + exporter for dbt Cloud job completion DAG - #110
Draft
patkearns10 wants to merge 3 commits into
Draft
Conversation
Author
|
Added to this:
|
Author
Contributor
|
The thing is |
b-per
marked this pull request as draft
May 4, 2026 11:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Description
This PR adds a new dbt-extras Agent Skill that documents how to build a job-level DAG from dbt Cloud Admin API data—specifically
job_completion_trigger_condition(run when another job completes)—which is separate from model lineage. It also ships a small Python exporter and a sample Mermaid file so the diagram can be opened in [Mermaid Live](https://mermaid.live/) or other renderers.Motivation
Orchestration between jobs (including cross-project completion triggers) is easy to miss when looking only at model DAGs or schedules. The skill standardizes how agents gather jobs via
dbtp([dbt Rust SDK](https://github.com/dbt-labs/dbt-rust-sdk)), extract edges, and present results as JSON plus a styledflowchart LRdiagram.What’s included
mapping-dbt-cloud-job-dagskill (SKILL.md): workflow for listing jobs, resolving project names, fetching full job definitions, building edges, sanitizing labels, and emitting Mermaid with ELK-friendly%%{init}%%,classDef/classstyling, solid same-project links, and labeled dashed cross-project links.scripts/export_job_dag.py: optional CLI to generate a.mmdfromdbtp(env:DBT_TOKEN,DBT_ACCOUNT_ID,DBT_HOSTas needed); supports-cross-project-label,-renderer, andDBTP_PATH.job-dag-export.mmd: checked-in example output (regenerate with the script for your projects).dbt-extrasplugin version to 1.2.0 to reflect the new skill.How to verify
Install
dbtpper [dbt-rust-sdk](https://github.com/dbt-labs/dbt-rust-sdk) and configureDBT_*env vars.Run (adjust project IDs / paths as needed):
python3 skills/dbt-extras/skills/mapping-dbt-cloud-job-dag/scripts/export_job_dag.py
--project-id <upstream_project_id> --project-id <downstream_project_id>
-o /tmp/job-dag.mmd
Paste
/tmp/job-dag.mmdinto Mermaid Live and confirm subgraph colors, three completion edges, and the cross-project label render as expected.Notes
job-dag-export.mmdis illustrative; consumers can delete it or replace it with a neutral fixture if the repo prefers not to ship account-flavored samples.Checklist
changie newto create a changelog entry