Skip to content

Latest commit

 

History

History
112 lines (67 loc) · 3.19 KB

README.md

File metadata and controls

112 lines (67 loc) · 3.19 KB

DBT Docs

Content:

Prerequisites:

Warning

You have to put credentials.json into credentials folder in project directory.

Create Project and Service Account following the instructions.

Warning

Before start working with dbt you have to run Airflow DAGs that download source data and create BigQuery tables

Start DAGs with Airflow following the instructions.

Install dbt: pip install dbt-bigquery

Local setup and run:

  1. Change project name value in profiles.yml:

    img.png

  2. Run cd dbt:

    img.png

  3. Run dbt build:

    img.png

  4. Run dbt run:

    img.png img.png

  5. To generate docs and see it in browser run dbt docs generate and then dbt docs serve --port <port> and open link localhost:<port>:

    img.png img.png img.png

Setup in DBT Cloud:

  1. Create account in getdbt.com or login if you have one.
  2. After login create a new account:

img.png

  1. Choose a BigQuery connection:

img.png

  1. Configure environment by uploading Service Account JSON file:

img.png

  1. Choose dataset for models build and test connection:

img.png img.png

  1. Choose your repository on Setup a Repository step in dbt cloud:

img.png

  1. Project is ready:

img.png

  1. Due to existence of dbt project inside a subdirectory you need to set Project subdirectory setting:
  • Go to the Account Settings:

    img.png

  • Tap on your project name:

    img.png

  • Click Edit button and set Project subdirectory to dbt:

    img.png

  • Click on Save button:

    img.png

  1. Go to Develop section and create new branch:

    img.png

  2. Enjoy:

    img.png

Resources:

  • Learn more about dbt in the docs
  • Check out Discourse for commonly asked questions and answers
  • Join the dbt community to learn from other analytics engineers
  • Find dbt events near you
  • Check out the blog for the latest news on dbt's development and best practices