An example of metadata management by dbt on BigQuery
- replace
{YOUR_DATASET_NAME}
- replace
{YOUR_PROJECT_ID}
- Pull image
docker pull ghcr.io/dbt-labs/dbt-bigquery:1.2.0
- Running a dbt Docker image in a container
bash/zsh
docker run --rm \
--network=host \
--platform linux/amd64 \
--mount type=bind,source=`PWD`,target=/usr/app \
--mount type=bind,source=`PWD`/profiles.yml,target=/root/.dbt/profiles.yml \
--mount type=bind,source=$HOME/.config/gcloud/application_default_credentials.json,target=/root/.config/gcloud/application_default_credentials.json \
ghcr.io/dbt-labs/dbt-bigquery:1.2.0 \
ls
fish
docker run --rm \
--network=host \
--platform linux/amd64 \
--mount type=bind,source=$(PWD),target=/usr/app \
--mount type=bind,source=$(PWD)/profiles.yml,target=/root/.dbt/profiles.yml \
--mount type=bind,source=$HOME/.config/gcloud/application_default_credentials.json,target=/root/.config/gcloud/application_default_credentials.json \
ghcr.io/dbt-labs/dbt-bigquery:1.2.0 \
ls
bash/zsh
docker run --rm \
--network=host \
--platform linux/amd64 \
--mount type=bind,source=`PWD`,target=/usr/app \
--mount type=bind,source=`PWD`/profiles.yml,target=/root/.dbt/profiles.yml \
--mount type=bind,source=$HOME/.config/gcloud/application_default_credentials.json,target=/root/.config/gcloud/application_default_credentials.json \
ghcr.io/dbt-labs/dbt-bigquery:1.2.0 \
docs generate
fish
docker run --rm \
--network=host \
--platform linux/amd64 \
--mount type=bind,source=$(PWD),target=/usr/app \
--mount type=bind,source=$(PWD)/profiles.yml,target=/root/.dbt/profiles.yml \
--mount type=bind,source=$HOME/.config/gcloud/application_default_credentials.json,target=/root/.config/gcloud/application_default_credentials.json \
ghcr.io/dbt-labs/dbt-bigquery:1.2.0 \
docs generate
python generate_static_html.py
Open target/index2.html
by your browser.
Done