Course overview/Build the pipeline3 of 3

Dependencies and the graph

Dependencies and the graph

Read the retail pipeline graph and distinguish run order from quality checks.

Checks do not create run edges

The pipeline flows from eight generated input tables through staging, shared models, and two reporting tables. A depends entry controls run order. A relationships check validates keys, but it does not tell Bruin to run the referenced table first.

In this pipeline, fct_order_lines checks its keys against raw products but has no direct depends: products entry. Its query reaches product data through stg_products, but Bruin does not treat that indirect path as the check's run dependency. The check and the query path are related but not interchangeable. Use bruin lineage to inspect which assets come before and after another asset. mode: symbolic, --downstream, and selectors let you run only the relevant part of the graph.

Your task

Write the target pipeline graph as text in docs/dag.md, including every generated table, staging asset, shared model, and reporting table. Identify the longest chain, the branches that can run at the same time, and the deliberately missing explicit depends: products entry associated with the fct_order_lines relationships check. Explain why the indirect stg_products query path does not make the quality-check relationship a run dependency.

Verify your graph with:

bruin lineage pipeline/assets/mart/weekly_category_revenue.sql --full

Check your understanding

  • Does a relationships check create a run dependency?
  • Why can staging branches run in parallel?
  • What should verify a graph you inferred from file names?

Do it with your agent

Say next lesson, write the graph and run the lineage command, then say review my work.

Rubric

  • Includes all 8 generated tables, 4 staging assets, 3 shared models, and 2 reporting tables.
  • Shows the flow from staging to shared models to reporting tables, including both reporting branches.
  • Distinguishes the missing direct products edge from the indirect stg_products query path and records the CLI lineage result.

Sign up to our newsletter

Practical updates on open-source data pipelines, AI analysts, governance, and what we are shipping at Bruin.

The signup form is hosted by Brevo. Allow marketing cookies to load it.