diff --git a/ods_dlh_data_processing/dbt_project.yml b/ods_dlh_data_processing/dbt_project.yml index 5be375c..fa01989 100644 --- a/ods_dlh_data_processing/dbt_project.yml +++ b/ods_dlh_data_processing/dbt_project.yml @@ -23,7 +23,9 @@ clean-targets: # directories to be removed by `dbt clean` - "target" - "dbt_packages" - +vars: + # The `start_date` variable will be accessible in all resources + db_fdw_rrs: fdw_ods_rrs_replication # Configuring models # Full documentation: https://docs.getdbt.com/docs/configuring-models diff --git a/ods_dlh_data_processing/models/example/road_tenure_type_code_agg.sql b/ods_dlh_data_processing/models/example/road_tenure_type_code_agg.sql index 47a01c1..74797e2 100644 --- a/ods_dlh_data_processing/models/example/road_tenure_type_code_agg.sql +++ b/ods_dlh_data_processing/models/example/road_tenure_type_code_agg.sql @@ -11,7 +11,8 @@ with source_data as ( - select a.*,26 as Total_Count from fdw_ods_rrs_replication.road_tenure_type_code a + --select a.*,26 as Total_Count from fdw_ods_rrs_replication.road_tenure_type_code a + select a.*,26 as Total_Count from {{ var('db_fdw_rrs') }}.road_tenure_type_code a )