@@ -60,7 +60,7 @@ def dbt_diff(
6060 config_prod_database = datadiff_variables .get ("prod_database" )
6161 config_prod_schema = datadiff_variables .get ("prod_schema" )
6262 datasource_id = datadiff_variables .get ("datasource_id" )
63- custom_schema = datadiff_variables .get ("custom_schema " )
63+ disable_custom_schemas = datadiff_variables .get ("disable_custom_schemas " )
6464
6565 if not is_cloud :
6666 dbt_parser .set_connection ()
@@ -72,7 +72,7 @@ def dbt_diff(
7272
7373 for model in models :
7474 diff_vars = _get_diff_vars (
75- dbt_parser , config_prod_database , config_prod_schema , model , datasource_id , custom_schema
75+ dbt_parser , config_prod_database , config_prod_schema , model , datasource_id , disable_custom_schemas
7676 )
7777
7878 if is_cloud and len (diff_vars .primary_keys ) > 0 :
@@ -98,7 +98,7 @@ def _get_diff_vars(
9898 config_prod_schema : Optional [str ],
9999 model ,
100100 datasource_id : int ,
101- custom_schema : Optional [bool ],
101+ disable_custom_schemas : Optional [bool ],
102102) -> DiffVars :
103103 dev_database = model .database
104104 dev_schema = model .schema_
@@ -107,10 +107,10 @@ def _get_diff_vars(
107107 prod_database = config_prod_database if config_prod_database else dev_database
108108 prod_schema = config_prod_schema if config_prod_schema else dev_schema
109109
110- # if project has custom_schemas: True
110+ # if project has not disabled custom schemas
111111 # need to construct the prod schema as <prod_target_schema>_<custom_schema>
112112 # https://docs.getdbt.com/docs/build/custom-schemas
113- if custom_schema and model .config .schema_ :
113+ if not disable_custom_schemas and model .config .schema_ :
114114 prod_schema = prod_schema + "_" + model .config .schema_
115115
116116 if dbt_parser .requires_upper :
0 commit comments