Skip to content

Commit 8d74675

Browse files
committed
Parameterize source database by target
1 parent 75f36ea commit 8d74675

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

dabdbt/databricks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ variables:
1313
prod_root_path:
1414
description: Workspace path for production bundle deployment
1515
default: /Workspace/Users/anselmoborges@gmail.com/.bundle/${bundle.name}/${bundle.target}
16+
source_olist_env:
17+
description: Target suffix used by Unity Catalog foreign catalog
18+
default: ${bundle.target}
1619
prod_owner_user:
1720
description: User principal that will retain CAN_MANAGE in production
1821
default: anselmoborges@gmail.com

dabdbt/src/models/silver/schema.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
sources:
44
- name: olist
55
description: "{{ doc('source_olist_catalog') }}"
6-
database: "{{ env_var('DBT_SOURCE_DATABASE', 'sqlolistdev') }}"
6+
database: "{{ var('source_olist_database', 'sqlolist' ~ (target.name | default('dev'))) }}"
77
schema: olist
88
tables:
99
- name: customers

0 commit comments

Comments
 (0)