Install
Create a connection
- Account API key (recommended)
- Workspace API key (legacy)
An account API key (Every request with an account API key needs a workspace UID. Set it on the task with
prdm_cmp_...) can access one or more workspaces. One Airflow connection is enough to trigger schedules in all of them.- In Paradime, create an account API key with the Bolt schedules admin capability and select the workspaces it can access. Copy the key, the API endpoint, and the workspace UID listed next to each workspace.
- In Airflow, create a connection of type Paradime with these fields:
Leave API Key (legacy) and API Secret (legacy) blank.To create the connection from an environment variable instead:
workspace_uid=, or set a default on the connection. The task value wins. If neither is set, the task fails with an error that says so.conn_id.
ParadimeBoltDbtScheduleRunOperator identifies the schedule with either slug (stable) or schedule_name, and also accepts commands, branch, retry_from_failure, and workspace_uid. ParadimeBoltDbtScheduleRunSensor and ParadimeBoltDbtScheduleRunArtifactOperator also accept workspace_uid. It is a templated field.Trigger schedules in several workspaces
This DAG uses one account API key connection to trigger schedules in two workspaces, wait for the runs, and download theirmanifest.json. Each task sets workspace_uid to the workspace that owns its schedule.
The sensor and the artifact operator must use the same
workspace_uid as the task that triggered the run. A run id only exists in its own workspace.Trigger a Bolt schedule
This DAG triggers a run for a Bolt schedule, checks the run’s status, and extracts the dbt™ artifacts. It needs noworkspace_uid: use it with a workspace API key, or with an account API key that has a default workspace UID on the connection.
Trigger a Bolt schedule with custom commands
This DAG overrides the dbt™ commands the run executes at runtime, then checks the run’s status and extracts the artifacts.Migrate from the dbt Cloud™ operators
If your DAGs trigger dbt Cloud™ jobs with theapache-airflow-providers-dbt-cloud provider, the DAG structure stays the same: swap each operator for its Paradime equivalent, and the job ID for a schedule slug.
A few things work differently:
- The run operator never waits.
ParadimeBoltDbtScheduleRunOperatortriggers the run and returns its run ID as the XCom value, likeDbtCloudRunJobOperatorwithwait_for_termination=False. To wait for the run, addParadimeBoltDbtScheduleRunSensor. - The sensor fails on a failed run. It succeeds when the run succeeds, and fails the task when the run fails, errors, is canceled, or is skipped. It is a standard Airflow sensor, so
timeout,poke_interval,mode, andsoft_failwork as usual. - Trigger rules, retries, and dependencies stay in Airflow.
trigger_rule, taskretriesandretry_delay, and the order of your tasks behave exactly as before. - A sensor timeout doesn’t stop the run. When the sensor times out, the Bolt run carries on. Bolt has no job-level timeout: set
sla_minuteson the schedule to be alerted when a run takes too long. - Retry from the point of failure. With
retry_from_failure=True, the operator resumes the schedule’s last failed run from the failed command instead of starting a new run.
Before and after
A trigger-and-sensor pair on dbt Cloud™:Switch one project at a time
To move projects over one at a time, keep both setups in the DAG and choose one per project with a flag. Switching a project, or rolling it back, is then a one-line change. The task IDs are the same on both sides, so the DAG’s graph and history don’t change.Cut over
When you migrate step by step, switch the project’s jobs to Bolt and change its flag in the same window:- Switch the project’s groups to Bolt on the migration page. This turns off the jobs’ schedules and Git triggers in dbt Cloud™.
- Set the project’s
platformto"paradime"and deploy the DAG.
platform back to "dbt_cloud", deploy the DAG, and roll the group back on the migration page.