Skip to content

Commit ddb6439

Browse files
committed
Parametriza warehouse por ambiente
1 parent be41905 commit ddb6439

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

dabdbt/databricks.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ variables:
1919
prod_owner_user:
2020
description: User principal that will retain CAN_MANAGE in production
2121
default: anselmoborges@gmail.com
22+
sql_warehouse_id:
23+
description: Serverless warehouse utilizado pelas tasks dbt
24+
default: f38fa7279458bb21
2225

2326
# Deployment targets.
2427
# The default schema, catalog, etc. for dbt are defined in dbt_profiles/profiles.yml
@@ -34,3 +37,5 @@ targets:
3437
workspace:
3538
host: https://adb-2533506717590470.10.azuredatabricks.net
3639
root_path: /Workspace/Shared/.bundle/${bundle.name}/${bundle.target}
40+
variables:
41+
sql_warehouse_id: 7a2b912f6c29d8a8

dabdbt/resources/dabdbt.job.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ resources:
3232
project_directory: dabdbt
3333
commands:
3434
- 'dbt seed --target=${bundle.target} --select ibge_municipios --profiles-dir=dbt_profiles'
35-
warehouse_id: f38fa7279458bb21
35+
warehouse_id: ${var.sql_warehouse_id}
3636
catalog: rescue_${bundle.target}
3737
schema: rescue_b
3838
source: GIT
@@ -46,7 +46,7 @@ resources:
4646
commands:
4747
- 'dbt run --target=${bundle.target} --select tag:silver --profiles-dir=dbt_profiles'
4848
source: GIT
49-
warehouse_id: f38fa7279458bb21
49+
warehouse_id: ${var.sql_warehouse_id}
5050
catalog: rescue_${bundle.target}
5151
schema: rescue_s
5252
environment_key: dbt-default
@@ -59,7 +59,7 @@ resources:
5959
commands:
6060
- 'dbt run --target=${bundle.target} --select tag:gold --profiles-dir=dbt_profiles'
6161
source: GIT
62-
warehouse_id: f38fa7279458bb21
62+
warehouse_id: ${var.sql_warehouse_id}
6363
catalog: rescue_${bundle.target}
6464
schema: rescue_g
6565
environment_key: dbt-default
@@ -71,7 +71,7 @@ resources:
7171
commands:
7272
- 'dbt docs generate --target=${bundle.target} --target-path=/Volumes/rescue_${bundle.target}/rescue_b/vol_docs/${bundle.name} --profiles-dir=dbt_profiles'
7373
source: GIT
74-
warehouse_id: f38fa7279458bb21
74+
warehouse_id: ${var.sql_warehouse_id}
7575
catalog: rescue_${bundle.target}
7676
environment_key: dbt-default
7777

0 commit comments

Comments
 (0)