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" # prod
  # 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.1.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.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dbt_switch-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 7f0908f551a544bd3d147bdb49ac98b4e68c223630f85018d9904ee51a5ff897
MD5 8410ef0629e4b997f68368350e56541b
BLAKE2b-256 a381c63907f9fc71e6630c9926e013bbeba71011ac0cd722e5181517b7422c75

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbt_switch-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.15

File hashes

Hashes for dbt_switch-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 24148e547e999ebe15f2037a643d207e0edfb077fc1082c45c9be040bc7e6c0b
MD5 05aa9fb65f1975a10369b27aaa568f74
BLAKE2b-256 8677e9f0be9658e7119a1f11db090bcd372a180bd0ad2452775ca2d7224203a1

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