Skip to content
Latchkey

How to Generate Catalog and Lineage in CI

dbt docs generate builds manifest.json and catalog.json, the inputs catalog and lineage tools consume.

Run dbt docs generate in CI to produce the manifest and catalog, then hand those artifacts to a lineage or catalog tool.

Steps

  • Run dbt docs generate after a build.
  • Publish manifest.json and catalog.json as artifacts.
  • Feed them to a catalog or lineage tool (for example OpenLineage or a static docs site).

Workflow

.github/workflows/lineage.yml
on:
  push:
    branches: [main]
jobs:
  lineage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: pip install dbt-snowflake==1.8.0
      - run: dbt docs generate --target prod
      - uses: actions/upload-artifact@v4
        with:
          name: dbt-docs
          path: |
            target/manifest.json
            target/catalog.json
            target/index.html

Gotchas

  • catalog.json requires warehouse access; docs generate queries column metadata.
  • Column-level lineage needs the manifest compiled with the same models you deployed.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →