CertSafari
    DBT Architect· Lessons

    Domain 4 · Lesson 22/39

    Populating dbt Catalog from job runs

    Generating documentation on a job that populates the dbt Catalog page

    13 min read
    2.56% of exam
    7 sources
    Published 13 Oct 2026
    Docs as of 12 Oct 2026

    What you will be able to do

    • Identify which jobs and environments feed metadata into dbt Catalog, and why CI jobs do not
    • Predict what happens when dbt docs generate is added as a step in a dbt platform job running v2
    • Choose job commands so that Catalog shows lineage, test results, source freshness and column statistics
    • Keep Catalog metadata from being removed by model deletion or environment inactivity

    Key concept

    Catalog is populated by job runs — In the dbt platform, nobody builds or hosts documentation. Each run of a v2 job in a production or staging environment refreshes the metadata that Catalog displays, and the job's commands decide which metadata exists.

    1.Which jobs feed Catalog

    Catalog is the documentation experience in the dbt platform, available on Starter, Enterprise and Enterprise+ plans. In Catalog you search resources, follow the lineage graph, and open a model to see its description, columns, tests and recent run results. It always shows your project's latest production state. Because of that, "generating documentation" here means running the right job in the right environment. There is no site to build and nothing to deploy.

    The environment matters first. Catalog reads metadata through the Discovery API, and that metadata comes from the deployment environments you have designated as production or staging. After every job run in one of those environments, Catalog fetches the update automatically. Before anything appears, you need at least one successful job run there. Setting up such an environment is covered in [creating a deployment environment](lesson:3.5).

    The job type matters as well. Deploy jobs and merge jobs both update Catalog. CI jobs never do, even when they run against the same project. A CI run builds a pull request's changes into a temporary schema, so its results describe code that has not shipped. Letting it overwrite production documentation would make Catalog describe a state that does not exist. For the same reason, a team that only runs [CI jobs with deferral](lesson:4.1) on a new project will find Catalog empty until a deploy job runs.

    Anyone with a Developer or read-only seat can open Catalog. To share documentation with stakeholders who never write dbt code, give them read-only seats. You don't need a separate docs site.

    Checkpoint 1 of 8· Check yourself

    A team has a staging environment with a nightly deploy job, a merge job on main, and a CI job that runs on every pull request. Which runs refresh what Catalog shows?

    Checkpoint 2 of 8· Exam question

    A dbt Cloud project has three deploy jobs, each running `dbt build` and each configured with the "Generate docs on run" setting enabled. The admin team wants exactly one job's output to be treated as the authoritative source for the project's Catalog page, instead of whichever job happens to finish last. Where should the admin designate that job?

    Sources12

    2.What a docs step does inside a platform job

    A v2 job doesn't need a docs command. Every run already refreshes Catalog metadata. This includes catalog.json, the artifact that holds warehouse details such as column types and table statistics. Locally you would produce it by adding the --write-catalog flag to dbt build, dbt run, dbt parse or dbt compile. In platform jobs on v2, the flag is added for you.

    Checkpoint 3 of 8· Fill the gap

    When you run dbt v2 on your own machine, which flag makes this build also produce catalog.json?

    dbt build  ? 

    dbt docs generate has a different job: it builds dbt Docs v2, a static site of HTML plus Parquet artifacts that you serve yourself. That only works locally or in your own pipeline. In the dbt platform, the step is silently replaced by dbt compile --write-catalog, and the run has no index.html to show. Teams migrating old job definitions are often surprised by this. The step still passes, but the static site it used to produce no longer exists.

    The --write-catalog flag compared with the dbt docs generate command
    Aspect--write-catalog flagdbt docs generate command
    What it producescatalog.json, plus the artifacts the command already generatesindex.html, assets/, and the index files
    What it's forMetadata for Catalog and the metadata APIsA static site you can preview with dbt docs serve or host anywhere
    Where it worksLocally and in dbt platform; added automatically in platform jobs on v2Locally only in v2; platform job runs use dbt compile --write-catalog instead

    Sometimes you want Catalog's warehouse metadata refreshed without rebuilding anything. Say a table was altered outside dbt and its column list in Catalog is stale. For that case, put dbt compile --write-catalog in the job's Commands section. It refreshes metadata without materialising a single model.

    Checkpoint 4 of 8· Check yourself

    A column was added directly in the warehouse to a table that dbt manages. You want Catalog to show the new column tonight without rebuilding any models. What should the job run?

    Checkpoint 5 of 8· Exam question

    Which two artifacts does running `dbt docs generate` produce, and which together power the dbt Catalog and dbt Docs pages?(Select 2)

    Sources314

    3.Choosing commands so Catalog is complete

    Every run refreshes Catalog, but the commands decide what it refreshes. A model gets lineage, details and results in Catalog when two conditions both hold. It must exist in the manifest, and it must appear in the run_results of a dbt build, dbt run or dbt clone. That second condition holds whether the run succeeded or failed. Data test results appear only when tests ran. Freshness results appear only when freshness was checked.

    What each kind of Catalog metadata needs a job to run
    To view in CatalogThe job must run
    All metadatadbt build and dbt source freshness together, in the same job
    Model lineage, details, or resultsdbt run or dbt build on that model
    Columns and statistics for models, sources, and snapshotsAny job run in the environment (v2 refreshes this automatically)
    Data test and unit test resultsdbt test or dbt build
    Source freshness resultsdbt source freshness
    Snapshot details / Seed detailsdbt snapshot or dbt build / dbt seed or dbt build

    The first row explains a common gap. A production job that runs only dbt build still populates lineage and tests, but freshness never appears in Catalog. You can add dbt source freshness to the command list, or enable the Run source freshness checkbox, which invokes the command before the rest of the job. The two differ when freshness fails. Built-in commands are [chained run steps](lesson:4.2), so a failing command stops the chain and the job ends in Error. A failure from the checkbox step does not stop the job, which can still succeed if the later steps pass.

    Unit test results rarely appear in a production Catalog, even with dbt build in the job. Unit tests usually run in development or CI environments, and CI runs don't reach Catalog.

    Checkpoint 6 of 8· Match them up

    Match each kind of Catalog metadata to the command a job needs to run for it to appear

    Tap a term, then the definition that fits it.

    Checkpoint 7 of 8· Exam question

    A production job runs `dbt build` across the full project and also has "Generate docs on run" enabled. The team notices this job frequently runs out of memory and takes a long time to complete, and the docs step sometimes never gets reached. Following recommended job design, what should the admin do to reliably populate the Catalog page without destabilizing the production build?

    Sources25

    4.When Catalog metadata disappears

    Catalog metadata is removed in two ways, and only one of them is something you intend. The first is deleting a model from the project. Its entry stays in Catalog until the next job run that no longer includes it, and then it is gone. So a deleted model still showing in Catalog usually means no production job has run since the merge.

    The second is inactivity. If a production or staging environment has had no job runs for 3 months, all of that environment's metadata is purged. This can hit environments that only run on demand, such as a quarterly finance project or a staging environment nobody triggers. The protection is a [scheduled job](lesson:4.3) that runs at least once every 3 months. Once metadata is in place, [exploring lineage in Catalog](lesson:8.1) depends on these runs continuing.

    Checkpoint 8 of 8· Check yourself

    A staging environment's only job was paused in January. In mid-April, users report that Catalog shows nothing for that environment. What happened?

    Sources26

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.A CI job that builds every model on each pull request keeps Catalog up to date.Why is that wrong?

      CI jobs never update Catalog, because they don't reflect the production state. Only deploy and merge job runs in production or staging environments do.

      Covered in Which jobs feed Catalog

    2. 2.A platform job needs a dbt docs generate step, or Catalog will not be populated.Why is that wrong?

      v2 jobs refresh Catalog metadata on every run. A dbt docs generate step is unnecessary, and the platform replaces it with dbt compile --write-catalog.

      Covered in What a docs step does inside a platform job

    3. 3.Adding dbt docs generate to a platform job produces a static docs site you can open from the run.Why is that wrong?

      dbt Docs v2 static sites are local or self-hosted only. In a platform job, the step produces no static site and no index.html.

      Covered in What a docs step does inside a platform job

    4. 4.A job that runs only dbt build gives Catalog all of its metadata.Why is that wrong?

      Complete metadata needs dbt build and dbt source freshness together in the same job. Without the freshness command, Catalog has no freshness results.

      Covered in Choosing commands so Catalog is complete

    Practise it for real

    Configure a production deploy job so that its runs populate Catalog with complete metadata, then confirm the result in Catalog.

    1. 1.Click Deploy in the top left and select Jobs. Then open (or create) a job whose environment is production or staging, and click Settings.

      Why: Catalog only reads metadata from production or staging deployment environments.

      You should see: The job's settings page shows its environment as production or staging.

    2. 2.Under Execution settings, set the commands to dbt build, and enable Run source freshness (or add dbt source freshness as a command). Click Save.

      Why: Running build and source freshness together is what gives Catalog all of its metadata. No docs command is needed on v2.

      You should see: The command list shows dbt build, with freshness enabled, and no dbt docs generate step.

    3. 3.Trigger a run of the job and wait for it to finish.

      Why: Catalog fetches metadata after each run in the environment.

      You should see: The run history shows a new run with its run steps and artifacts.

    4. 4.Click Catalog in the navigation, select your project, click View lineage, and open a model.

      Why: This confirms that lineage, descriptions, columns and test results arrived from the run.

      You should see: The model shows its description, columns, tests and recent run results. Its sources show freshness results.

    Stuck? Get a nudge

    If freshness results are missing, check whether the source freshness command actually ran in the same job as dbt build.

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “The default documentation experience in dbt is Catalog, available on Starter, Enterprise, or Enterprise+ plans.”
      ↩︎ Which jobs feed Catalog
      “Catalog is available to Developer and read-only users.”
      ↩︎ Which jobs feed Catalog
      “dbt Docs v2 isn't available in the dbt platform.”
      ↩︎ What a docs step does inside a platform job
      “Jobs running v2 generate this metadata automatically on every job run”
      ↩︎ Key concept
      “If you add dbt docs generate as a run step, dbt runs dbt compile --write-catalog instead and displays a banner directing you to Catalog.”
      ↩︎ Prediction
      “To refresh Catalog metadata without building models, add dbt compile --write-catalog in the Commands section.”
      ↩︎ Checkpoint
    2. 2.
      “Catalog automatically retrieves the metadata updates after each job run in the production or staging deployment environment”
      ↩︎ Which jobs feed Catalog
      “Catalog uses the metadata provided by the Discovery API to display the details about the state of your dbt project.”
      ↩︎ Which jobs feed Catalog
      “You have at least one successful job run in the deployment environment.”
      ↩︎ Which jobs feed Catalog
      “The model appears in the run_results of a dbt build, dbt run, or dbt clone command, regardless of the run's success or failure status.”
      ↩︎ Choosing commands so Catalog is complete
      “Unit tests are typically run in development or CI environments, so their results rarely appear in production Catalog.”
      ↩︎ Choosing commands so Catalog is complete
      “its metadata is removed after a subsequent job run in which the model is no longer included.”
      ↩︎ When Catalog metadata disappears
      “To prevent this, schedule jobs to run at least once every 3 months.”
      ↩︎ When Catalog metadata disappears
      “This is because they don't reflect the production state and don't provide the necessary metadata updates.”
      ↩︎ Exam trap 1
      “dbt build and dbt source freshness together as part of the same job in the environment”
      ↩︎ Exam trap 4
      “This includes deploy and merge jobs. Note that CI jobs don't update Catalog.”
      ↩︎ Checkpoint
      “The resulting metadata depends on the commands executed by the jobs.”
      ↩︎ Checkpoint
      “If an environment has had no job runs in the past 3 months, all metadata for that environment is purged.”
      ↩︎ Checkpoint
    3. 3.
      “dbt v2 jobs in dbt platform refresh Catalog metadata automatically on every run, so you don't need to add the --write-catalog flag there.”
      ↩︎ What a docs step does inside a platform job
      “The job doesn't produce the static site or index.html.”
      ↩︎ Exam trap 3
    4. 4.
      “Check the Generate docs on run checkbox to configure the job to automatically generate project docs each time this job runs.”
      ↩︎ What a docs step does inside a platform job
    5. 5.
      “Enable this option to invoke the dbt source freshness command before running the deploy job.”
      ↩︎ Choosing commands so Catalog is complete
      “If the step fails, the job can succeed if subsequent steps pass.”
      ↩︎ Choosing commands so Catalog is complete
    6. 6.
      “The following steps are for legacy dbt Docs only.”
      ↩︎ When Catalog metadata disappears
      “you should only associate one production job with a given project to produce the project's artifacts.”
      ↩︎ When Catalog metadata disappears

    Also cited

    Spotted a mistake, or was something unclear? Tell us.