Skip to content

Download the latest artifacts from a Job

Better than looking at the Run ID which is not static all the time, we're able to implicitly tell dbterd to retrieve the latest artifacts from a Job (latest run) by using the Retrieve Job Artifact endpoint.

The Prerequisites and Steps will be pretty similar to Download artifacts from a Job Run, mostly everything is the same but we will specify JOB ID instead of the JOB RUN ID.


JOB RUN ID takes precedence to JOB ID if specified

Our dbt Cloud's Job will have the URL constructed as:


In the above:

URL Part Environment Variable CLI Option Description
job_id DBTERD_DBT_CLOUD_JOB_ID --dbt-cloud-job-id dbt Cloud job ID
  • Fill your_value and set the environment variable as below:
export DBTERD_DBT_CLOUD_JOB_ID=your_value
export DBTERD_DBT_CLOUD_HOST_URL=your_value # optional, default =
export DBTERD_DBT_CLOUD_API_VERSION=your_value # optional, default = v2
  • Generate ERD:
dbterd run --dbt-cloud [-s <dbterd selection>]

And the sample logs:

dbterd - INFO - Run with dbterd==1.0.0 (
dbterd - INFO - Using dbt project dir at: C:\Sources\dbterd (
dbterd - INFO - Downloading...[URL: https://hidden/api/v2/accounts/hidden/jobs/hidden/artifacts/manifest.json] (
dbterd - INFO - Completed [status: 200] (
dbterd - INFO - Downloading...[URL: https://hidden/api/v2/accounts/hidden/jobs/hidden/artifacts/catalog.json] (
dbterd - INFO - Completed [status: 200] (
dbterd - INFO - Using dbt artifact dir at: hidden (
dbterd - INFO - Collected 4 table(s) and 3 relationship(s) (
dbterd - INFO - C:\Sources\dbterd\target/output.dbml (