Skip to content

Commit e96439d

Browse files
committed
Fix to perform case insensitive joins in catalog generation. This way all columns are fetched in dbt documentation
1 parent 731be29 commit e96439d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

dbt/include/oracle/macros/catalog.sql

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,16 @@
105105
all_col_comments.comments as "column_comment",
106106
tables.table_schema as "table_owner"
107107
from tables
108-
inner join columns on columns.table_catalog = tables.table_catalog
109-
and columns.table_schema = tables.table_schema
110-
and columns.table_name = tables.table_name
108+
inner join columns on upper(columns.table_catalog) = upper(tables.table_catalog)
109+
and upper(columns.table_schema) = upper(tables.table_schema)
110+
and upper(columns.table_name) = upper(tables.table_name)
111111
left join all_tab_comments
112-
on all_tab_comments.owner = tables.table_schema
113-
and all_tab_comments.table_name = tables.table_name
112+
on upper(all_tab_comments.owner) = upper(tables.table_schema)
113+
and upper(all_tab_comments.table_name) = upper(tables.table_name)
114114
left join all_col_comments
115-
on all_col_comments.owner = columns.table_schema
116-
and all_col_comments.table_name = columns.table_name
117-
and all_col_comments.column_name = columns.column_name
115+
on upper(all_col_comments.owner) = upper(columns.table_schema)
116+
and upper(all_col_comments.table_name) = upper(columns.table_name)
117+
and upper(all_col_comments.column_name) = upper(columns.column_name)
118118
where (
119119
{%- for schema in schemas -%}
120120
upper(tables.table_schema) = upper('{{ schema }}'){%- if not loop.last %} or {% endif -%}

0 commit comments

Comments
 (0)