Version control your dbt Cloud jobs with YML.
Project description
dbt-cloud-jobs
Version control your dbt Cloud jobs with YML.
Installation
pip install dbt-cloud-jobs
Quickstart
-
Create an API token in dbt Cloud:
- Generate a service account token, make sure to grant the
Jobs Admin
permission set. - If you do not have access to create a service account token you can create a User API token. Note that the service account method is preferred.
- Generate a service account token, make sure to grant the
-
Set an environment variables with the value of the token:
export DBT_API_TOKEN="<VALUE_FROM_PREVIOUS_STEP>"
-
Import your existing dbt Cloud jobs:
dbt_cloud_jobs --import --account_id 123456 --file dbt_cloud_jobs.yml
-
Edit the definition of your jobs in
dbt_cloud_jobs.yml
. -
Sync the updated definitions to dbt Cloud:
dbt_cloud_jobs --sync --file dbt_cloud_jobs.yml
Recommended usage in CI/CD
CI
In CI dbt_cloud_jobs
should be used to verify that the provided YML file is valid. For example:
- name: Install dbt_cloud_jobs
run: pip install dbt_cloud_jobs
- name: Validate `dbt_cloud_jobs.yml`
run: dbt_cloud_jobs --validate --file dbt_cloud_jobs.yml
CD
In CD dbt_cloud_jobs
should be used to sync the provided YML file to dbt Cloud. For example:
- name: Install dbt_cloud_jobs
run: pip install dbt_cloud_jobs
- name: Sync `dbt_cloud_jobs.yml`
run: dbt_cloud_jobs --sync --file dbt_cloud_jobs.yml
Development
Release
Trigger the Publish
workflow, inputting the version to publish to PyPi. This workflow will:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dbt_cloud_jobs-0.0.0a3.tar.gz
(9.9 kB
view hashes)
Built Distribution
Close
Hashes for dbt_cloud_jobs-0.0.0a3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18eb56f7b39cc79d99faa689b2f430d0f6acd99ab07eed86cd50e2f48cc00263 |
|
MD5 | 124ec4f6c6121e68acb3958ad25d5330 |
|
BLAKE2b-256 | 66e73d45eccc3e2ecc8df1f42fc6e62b808aa4b5f43900f3b5b2a47f4bae0ba2 |