This demo project showcases how to run dbt's core module on top of a BigQuery warehouse inside a Gitpod Cloud Development Environment. The project is based on the well-known jaffle_shop example.
In order to connect with BigQuery, the following environment variables need to be set inside inside the development environment:
DBT_SERVICE_ACCOUNT
: the content of a valid service account JSON. Required permissions are BigQuery User and BigQuery Data EditorDBT_PROJECT
: ID of the GCP project in which the models will be persistedDBT_DEV_DATASET
: Name of the dataset in which the models will be persisted, e.g.dbt_dev
DBT_LOCATION
: multi-regional or regional location of the data, e.g.:US
,EU
,us-west2
The easiest way to achieve this is by setting user-specific environment variables in Gitpod. Find out more about environment variables in Gitpod here.
The values of the environment variables are used inside dbt's profiles.yml
. For more information about setting up dbt with BigQuery, click here.
Click the button below to start a new development environment:
The validity of the dbt configuration will be tested inside the workspace. Run the following commands to test the functionality of the Jaffle shop demo:
dbt seed
: to materialize the CSVsdbt run
: to run the modelsdbt test
: to test all models
If all commands run succesfully, you have completed the setup of a working dbt development environment on a BigQuery warehouse with Gitpod!🎉
Click the above "Open in Gitpod" button to start a new workspace. Once you're ready to push your first code changes, Gitpod will guide you to fork this project so you own it.
To get started with dbt on Gitpod, add a .gitpod.yml
to any of your existing dbt projects. To learn more, please see the Getting Started documentation.