Skip to content

Commit d02d426

Browse files
Repo-MainakMainak Das
andauthored
fixing code for relationship generic test macro which is failing with error SQL compilation error: duplicate column name 'REF_ID' (#48)
Co-authored-by: Mainak Das <madas@nextgen.com>
1 parent 130ad22 commit d02d426

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

macros/generic_tests/test_relationships_where_db.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
with left_table as (
8787

8888
select
89-
{{column_name}} as ref_id
89+
{{column_name}} as ref_id_left
9090

9191
from {{model}}
9292

@@ -99,7 +99,7 @@
9999
right_table as (
100100

101101
select
102-
{{field}} as ref_id
102+
{{field}} as ref_id_right
103103

104104
from {{to}}
105105

@@ -112,8 +112,8 @@
112112
*
113113
from left_table
114114
left join right_table
115-
on left_table.ref_id = right_table.ref_id
116-
where right_table.ref_id is null
115+
on left_table.ref_id_left = right_table.ref_id_right
116+
where right_table.ref_id_right is null
117117

118118

119119
{% endtest %}

0 commit comments

Comments
 (0)