Skip to main content

Version control your dbt Cloud jobs with YML.

Project description

dbt-cloud-jobs

pypi version shield CI Publish Python versions License: MIT

Version control your dbt Cloud jobs with YML.

Installation

pip install dbt-cloud-jobs

Quickstart

  1. Create an API token in dbt Cloud:

  2. Set an environment variables with the value of the token:

    export DBT_API_TOKEN="<VALUE_FROM_PREVIOUS_STEP>"
    
  3. Import your existing dbt Cloud jobs:

    dbt_cloud_jobs --import --account_id 123456 --file dbt_cloud_jobs.yml
    
  4. Edit the definition of your jobs in dbt_cloud_jobs.yml.

  5. 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:

  • Publish the version to PyPi.
  • Tag the HEAD commit of the main branches (tags visible here).
  • Create a release (releases visible here).

Project details


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.1.tar.gz (9.9 kB view hashes)

Uploaded Source

Built Distribution

dbt_cloud_jobs-0.0.1-py3-none-any.whl (11.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page