https://github.com/sungchun12/dbt_cloud_api_examples
Hub for my dbt Cloud API code snippets
https://github.com/sungchun12/dbt_cloud_api_examples
Last synced: 8 months ago
JSON representation
Hub for my dbt Cloud API code snippets
- Host: GitHub
- URL: https://github.com/sungchun12/dbt_cloud_api_examples
- Owner: sungchun12
- Created: 2021-07-29T18:07:45.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-20T13:57:05.000Z (about 4 years ago)
- Last Synced: 2025-01-08T17:22:15.043Z (9 months ago)
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dbt_cloud_api_examples
This repo is a hub for API examples that'll help you programmatically interact with dbt Cloud!
## Setup your development environment
```bash
# setup a venv
python3 -m venv venv
source venv/bin/activate
pip3 install --upgrade pip
pip3 install -r requirements.txt```
```bash
# create environment variables related to your dbt Cloud account
# in a .env file, example below# You can find this token in your dbt Cloud profile or Account Settings
DBT_CLOUD_API_TOKEN=# https://cloud.getdbt.com/#/accounts/16173/projects/26588/dashboard/
# you can find this number in the cloud.getdbt.com url
ACCOUNT_ID=```
## How to Run
```bash
# prints account and user activity in a snapshot to terminal output
# exports csv and json local files to persist results
python3 account_activity.py
```