File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 390390 schema= fk_model .schema ,
391391 identifier= fk_model .alias ) - %}
392392
393- {%- set pk_table_relation = adapter .get_relation (
394- database= pk_model .database ,
395- schema= pk_model .schema ,
396- identifier= pk_model .alias ) - %}
393+ {%- if pk_model .unique_id not in selected_resources - %}
394+ {%- set pk_table_relation = adapter .get_relation (
395+ database= (pk_model .config .database or pk_model .database ),
396+ schema= (pk_model .config .schema or pk_model .schema ),
397+ identifier= (pk_model .config .alias or pk_model .alias )) - %}
398+ {%- else - %}
399+ {%- set pk_table_relation = adapter .get_relation (
400+ database= pk_model .database ,
401+ schema= pk_model .schema ,
402+ identifier= pk_model .alias ) - %}
403+ {%- endif - %}
397404
398405 {%- if fk_table_relation and pk_table_relation and fk_table_relation .is_table and pk_table_relation .is_table - %}
399406 {# Attempt to identify parameters we can use for the column names #}
You can’t perform that action at this time.
0 commit comments