Skip to content

Commit

Permalink
chore(reporting): dbt configuration for meltano and dummy transformat…
Browse files Browse the repository at this point in the history
…ion (#1272)

* chore(reporting): dbt configuration for meltano and dummy transformation

Run `meltano invoke debt-bigquery:run` to execute.

* chore(reporting): dummy dbt transformation
  • Loading branch information
jireva authored and bodymindarts committed Jan 17, 2025
1 parent 015c549 commit 92fc6c2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ export DATAFORM_SCHEMA_SUFFIX=${TF_VAR_name_prefix}
export DATAFORM_VARS="executionEnv=lana-dev,devUser=${TF_VAR_name_prefix}"
export SA_CREDS_BASE64="${TF_VAR_sa_creds}"
export DEV_ENV_NAME_PREFIX="${TF_VAR_name_prefix}"

export TARGET_BIGQUERY_CREDENTIALS_JSON="$(echo $TF_VAR_sa_creds | base64 -d)"
export TARGET_BIGQUERY_DATASET="${USER}_dataset"
export TARGET_BIGQUERY_LOCATION="EU"
export DBT_BIGQUERY_DATASET="dataform_${USER}"
export DBT_BIGQUERY_KEYFILE="/lana/keyfile.json"
echo $TARGET_BIGQUERY_CREDENTIALS_JSON > meltano/keyfile.json

alias meltano='docker compose run meltano --'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ node_modules/
.bacon-locations

*.tgz
meltano/keyfile.json
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,5 @@ services:
- TARGET_BIGQUERY_CREDENTIALS_JSON=${TARGET_BIGQUERY_CREDENTIALS_JSON}
- TARGET_BIGQUERY_DATASET=${TARGET_BIGQUERY_DATASET}
- TARGET_BIGQUERY_LOCATION=${TARGET_BIGQUERY_LOCATION}
- DBT_BIGQUERY_DATASET=${DBT_BIGQUERY_DATASET}
- DBT_BIGQUERY_KEYFILE=${DBT_BIGQUERY_KEYFILE}
3 changes: 3 additions & 0 deletions meltano/meltano.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ plugins:
- name: dbt-bigquery
variant: dbt-labs
pip_url: dbt-core~=1.3.0 dbt-bigquery~=1.3.0
config:
auth_method: service-account
project: lana-dev-440721
3 changes: 3 additions & 0 deletions meltano/transform/models/credit_facility_events.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SELECT *

FROM `{{ env_var('TARGET_BIGQUERY_DATASET') }}.public_credit_facility_events`

0 comments on commit 92fc6c2

Please sign in to comment.