An open API service indexing awesome lists of open source software.

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

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
```