Skip to main content

A simple CLI to switch between dbt Cloud projects and hosts.

Project description

dbt-switch

A simple CLI to switch between dbt Cloud projects and hosts.

Usage

# Switch to a specific project and host
dbt-switch --proj proj_2 --host default

# Switch only the project (host stays the same)
dbt-switch --proj proj_1

# Switch only the host (project stays the same)
dbt-switch --host default

# See all available options
dbt-switch --list

Example

Given a dbt_cloud.yml file like this:

# dbt_cloud.yml
version: "1"
context:
  active-host: "cloud.getdbt.com" # default
  # active-host: "[identifier].us[#].dbt.com" # custom

  active-project: "123456" # proj_1
  # active-project: "234567" # proj_2
  # active-project: "345678" # proj_3

You can see the available options with dbt-switch --list:

$ dbt-switch --list

Available options in dbt_cloud.yml:

active-hosts:
  - default (active)
  - custom (inactive)

active-projects:
  - proj_1 (active)
  - proj_2 (inactive)
  - proj_3 (inactive)

Switch to the custom host and the proj_3 project:

$ dbt-switch --host custom --proj proj_3

✓ Deactivated active-host: default
✓ Activated active-host: custom
✅ Successfully updated dbt_cloud.yml
✓ Deactivated active-project: proj_1
✓ Activated active-project: proj_3
✅ Successfully updated dbt_cloud.yml

The dbt_cloud.yml file will be updated to:

# dbt_cloud.yml
version: "1"
context:
  # active-host: "cloud.getdbt.com" # default
  active-host: "[identifier].us[#].dbt.com" # custom

  # active-project: "123456" # proj_1
  # active-project: "234567" # proj_2
  active-project: "345678" # proj_3

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_switch-0.1.12.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbt_switch-0.1.12-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file dbt_switch-0.1.12.tar.gz.

File metadata

  • Download URL: dbt_switch-0.1.12.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.15

File hashes

Hashes for dbt_switch-0.1.12.tar.gz
Algorithm Hash digest
SHA256 8b4fa785face17dc89025e52cc27b5312e32e21148a330e604eaddf312c4db26
MD5 bb361bb438b7adf59824d1419c0fc771
BLAKE2b-256 b0b0105130a7ee5a7357f307181405543306f4815d784bb16da7a39138e5f523

See more details on using hashes here.

File details

Details for the file dbt_switch-0.1.12-py3-none-any.whl.

File metadata

File hashes

Hashes for dbt_switch-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 36b519a007525bb6dc0837210c91b6c95fad54e2d1b84ee74c9f5927abcf3854
MD5 f0ed6ef67631e8f3a2af21bb30838cdf
BLAKE2b-256 286951f75fa7e74db40b05cf3a8e202a5a879a559bb6fbe8358c2814ee4d4a8b

See more details on using hashes here.

Supported by

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