diff --git a/.github/workflows/cloud_run.yml b/.github/workflows/cloud_run.yml index 17fa0d6..d9d6af4 100644 --- a/.github/workflows/cloud_run.yml +++ b/.github/workflows/cloud_run.yml @@ -8,7 +8,7 @@ on: env: #TODO(developer): update PROJECT_ID, REGION, IMAGE - PROJECT_ID: "wam-bam-258119" + PROJECT_ID: "dvc-demo-297316" REGION: "us-central1" IMAGE: "dbt-docs-cloud-run" DBT_PROFILES_DIR: ./ @@ -32,7 +32,7 @@ jobs: # Setup dbt configs - uses: actions/setup-python@v1 with: - python-version: "3.7.x" + python-version: "3.8.x" - run: pip3 install -r ./requirements.txt - run: dbt --version - run: 'echo "$KEYFILE" > ./service_account.json' # persist file in root dir diff --git a/.github/workflows/dbt_operations.yml b/.github/workflows/dbt_operations.yml index 3be09ed..75eec27 100644 --- a/.github/workflows/dbt_operations.yml +++ b/.github/workflows/dbt_operations.yml @@ -8,7 +8,7 @@ on: env: #TODO(developer): update PROJECT_ID - PROJECT_ID: "wam-bam-258119" + PROJECT_ID: "dvc-demo-297316" DBT_PROFILES_DIR: ./ DBT_GOOGLE_BIGQUERY_KEYFILE: ./service_account.json @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@master - uses: actions/setup-python@v1 with: - python-version: "3.7.x" + python-version: "3.8.x" - run: pip3 install -r ./requirements.txt - run: dbt --version - run: 'echo "$KEYFILE" > ./service_account.json' # persist file in root dir diff --git a/README.md b/README.md index 3bb658e..204a9b1 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ export DBT_PROFILES_DIR=$(pwd) export PROJECT_ID="your-project-id" # connect to GCP -gcloud auth application-default login --scopes=https://www.googleapis.com/auth/userinfo.email,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/drive.readonly +gcloud auth login # check if the dbt files and connection work using oauth as the default dbt debug @@ -159,7 +159,7 @@ gcloud services enable run.googleapis.com # build the docker image locally and tag it to eventually push to container registry # does not take into account gitignore constraints given it's built locally # ex: docker build . --tag gcr.io/wam-bam-258119/dbt-docs-cloud-run -export PROJECT_ID="wam-bam-258119" +export PROJECT_ID="dvc-demo-297316" export IMAGE="dbt-docs-cloud-run" export REGION="us-central1" diff --git a/dbt_project.yml b/dbt_project.yml index 6432e53..af3a07b 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,6 +1,6 @@ name: "jaffle_shop" # Specify a requirement on an _exact_ version of dbt -require-dbt-version: 0.18.0 +require-dbt-version: 0.19.0 version: 1.0.0 config-version: 2 profile: "jaffle_shop" diff --git a/models/sources/sources.yml b/models/sources/sources.yml index fb5ecf0..2a0bbf8 100644 --- a/models/sources/sources.yml +++ b/models/sources/sources.yml @@ -2,7 +2,7 @@ version: 2 sources: - name: dbt_bq_example - database: wam-bam-258119 + database: "{{ env_var('PROJECT_ID', 'dvc-demo-297316') }}" schema: dbt_bq_example freshness: diff --git a/requirements.txt b/requirements.txt index bb7a973..38e8ae6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -dbt==0.18.0 \ No newline at end of file +dbt==0.19.0 \ No newline at end of file diff --git a/snapshots/orders_snapshot.sql b/snapshots/orders_snapshot.sql index 7450ce0..e4a4bae 100644 --- a/snapshots/orders_snapshot.sql +++ b/snapshots/orders_snapshot.sql @@ -13,7 +13,6 @@ {{ config ( - target_database='wam-bam-258119', target_schema='dbt_bq_example', unique_key='id',