
Loading...
Portfolio piece — no longer accepting signups. See what I'm building now
Connect DataChonk to dbt Cloud to trigger runs, monitor status, and close the loop between building models and running them in production.
After pushing your DataChonk-generated code to Git, you can optionally trigger a dbt Cloud run to validate and materialize your models. This creates a seamless build-push-run workflow.
Git repository required
You need two pieces of information to connect DataChonk to dbt Cloud: your Account ID and an API token.
Your Account ID is in the URL when you're logged into dbt Cloud:
https://cloud.getdbt.com/accounts/12345/projects/...
^^^^^
This is your Account IDClick 'Create Service Token' and give it a descriptive name like 'DataChonk Integration'.
Select the following permissions:
Keep your token secure
After pushing code to Git, you'll see the dbt Cloud connection step:
Configure dbt Cloud in your project's datachonk.yaml or use environment variables:
deploy:
dbt_cloud:
account_id: 12345
project_id: 67890
job_id: 11111
# Optional: auto-trigger after push
auto_trigger: trueOr use environment variables:
export DBT_CLOUD_API_TOKEN="dbtc_your_token_here"
export DBT_CLOUD_ACCOUNT_ID="12345"
export DBT_CLOUD_PROJECT_ID="67890"
export DBT_CLOUD_JOB_ID="11111"
datachonk push --trigger-dbt-runOnce connected, DataChonk can trigger dbt Cloud jobs and monitor their status.
After selecting a job, click Trigger Run. DataChonk will:
# Push and trigger run
datachonk push --trigger-dbt-run
# Trigger run without pushing (if code is already in Git)
datachonk dbt-run --job-id 11111
# Trigger run with custom cause message
datachonk push --trigger-dbt-run --cause "New customer dimension model"
# Wait for run to complete
datachonk push --trigger-dbt-run --wait| Status | Meaning | Action |
|---|---|---|
| Queued | Waiting for available runner | Wait for processing |
| Running | Job is executing | Monitor progress |
| Success | All steps completed successfully | Models are live! |
| Error | One or more steps failed | Check logs in dbt Cloud |
| Cancelled | Run was manually cancelled | Re-trigger if needed |
Set up your dbt Cloud jobs to work well with DataChonk's workflow.
Create a dedicated job for validating new models without running the entire project:
commands:
- dbt build --select state:modified+ --defer --state ./prod-manifestMake sure your job has "Triggers: API" enabled in the job settings. This allows DataChonk to start runs programmatically.
Consider separate jobs for development/staging vs production environments. Trigger dev jobs for quick validation, production jobs for final deployment.
If you're integrating programmatically, here are the endpoints DataChonk uses.
| Property | Type | Default | Description |
|---|---|---|---|
| POST /api/dbt-cloud/connect* | JSON | - | Connect to dbt Cloud with API token and account ID |
| GET /api/dbt-cloud/status | - | - | Check connection status and list projects |
| GET /api/dbt-cloud/projects/:id/jobs | - | - | List jobs for a specific project |
| POST /api/dbt-cloud/trigger-run* | JSON | - | Trigger a job run with optional metadata |
| GET /api/dbt-cloud/runs/:id | - | - | Get run status by run ID |