Skip to content

Commit

Permalink
Adding
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachin-Thakur committed Dec 18, 2023
1 parent 565f207 commit 50833c5
Showing 1 changed file with 13 additions and 20 deletions.
33 changes: 13 additions & 20 deletions dbt/include/vertica/macros/adapters/catalog.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

)

{{vertica__get_catalog_results_sql ()}}
{{vertica__get_catalog_results_sql ()}}

{%- endset -%}
{{ return(run_query(query)) }}
Expand Down Expand Up @@ -95,18 +95,17 @@
select * from ( select
'{{ information_schema.database }}' table_database ,
table_schema
,table_name,
column_name
, ordinal_position column_index
, data_type column_type
,table_name
, column_name
, ordinal_position column_index
, data_type column_type


from v_catalog.columns
from v_catalog.columns

union all

select
'{{ information_schema.database }}' table_database ,
'{{ information_schema.database }}' table_database ,
table_schema
,table_name
, column_name
Expand All @@ -125,21 +124,15 @@
{%- endmacro %}

{% macro vertica__get_catalog_schemas_where_clause_sql(schemas) -%}
where not(tab.is_system_table) and
where
(
{%- for schema in schemas -%}
lower(tab.table_schema) = lower('{{ schema }}') {%- if not loop.last %} or {% endif %}
{%- endfor -%}
)
where not(vw.is_system_view) and


(
{%- for schema in schemas -%}
lower(vw.table_schema) = lower('{{ schema }}') {%- if not loop.last %} or {% endif %}
{%- for schema in schemas -%}


lower(table_schema) = lower('{{ schema }}') {%- if not loop.last %} or {% endif %}
{%- endfor -%}
)

order by table_schema, table_name, column_index

{%- endmacro %}
Expand Down

0 comments on commit 50833c5

Please sign in to comment.