dbt Cloud

Use dbt Cloud for transformations while Weld syncs your data and sends it on with reverse ETL. Once connected, Weld can trigger a dbt Cloud job as soon as the syncs it depends on have finished, so your dbt models always run on fresh data.

Before you start

  • A dbt Cloud account with at least one project and job.
  • Permission to create a service token in dbt Cloud.
  • Triggering dbt jobs from Weld is part of orchestration, which is included in the Premium plan and above.

Step 1: Create a service token in dbt Cloud

  1. In dbt Cloud, open Account settings and then Service tokens.
  2. Click + Create service token and give it a name.
  3. Add a permission set: Member on the Team plan, or Developer on the Enterprise plan.
  4. Under Project, choose All projects.
  5. Click Save and copy the token. You'll need it in step 3.

See dbt's guide to service tokens for details.

Step 2: Choose dbt as your transform tool

  1. In Weld, open Settings → Transform.
  2. Click Select on the dbt row.
  1. Click Confirm.

Weld Transform is switched off and disappears from the sidebar. You can switch back to it under Settings → Transform at any time.

Step 3: Connect dbt Cloud

On the dbt card under Settings → Transform, click Connect dbt and fill in:

  • Name: a name for the connection.

  • Token: the service token from step 1.

  • dbt region: where your dbt Cloud account is hosted:

    Regiondbt Cloud URL
    ushttps://cloud.getdbt.com
    euhttps://emea.dbt.com
    auhttps://au.dbt.com
  • Account prefix: only for a custom dbt Cloud URL. For https://ti014.us1.dbt.com, enter ti014. Leave it empty otherwise.

Click Connect.

Step 4: Trigger a dbt job after your syncs

  1. Create an orchestration that contains the data source syncs your dbt project reads from. See Orchestration.
  2. Open the orchestration and click the Webhooks tab, then Create webhook.
  1. Fill in the webhook and click Save:
  • (1) Name, for example run_dbt_after_ad_syncs.
  • (2) External System: dbt Cloud.
  • (3) Select dbt job: the dbt Cloud job to trigger.
  • (4) Select job(s) to run after: the syncs in this orchestration that must finish first.

From then on, each time the orchestration runs, Weld triggers the dbt job once the chosen syncs have finished. The job's runs and logs stay visible in dbt Cloud, and the webhook's last run shows on the Webhooks tab.

Troubleshooting

The Webhooks tab shows Set up connection instead of Create webhook. dbt Cloud isn't connected yet. Do step 3 first.

Select dbt job is empty. Weld can't see any jobs with this token. Check that the token has the right permission set and access to All projects, and that the project has at least one job.

Transform is gone from the sidebar. That's expected while dbt is your transform tool. To use Weld Transform again, select it under Settings → Transform.

Was this page helpful?