Skip to content

Commit

Permalink
Discard changes to dbt/include/snowflake/macros/catalog.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
aranke authored May 28, 2024
1 parent bfe8cb1 commit be990e1
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions dbt/include/snowflake/macros/catalog.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@


{% macro snowflake__get_catalog_tables_sql(information_schema) -%}
{%- set enable_stats = env_var('DBT_CATALOG_TABLE_ENABLE_STATS', 'true') == 'true' -%}

select
table_catalog as "table_database",
table_schema as "table_schema",
Expand All @@ -48,10 +46,11 @@
else table_type
end as "table_type",
comment as "table_comment",
table_owner as "table_owner"

{%- if enable_stats %}
,'Clustering Key' as "stats:clustering_key:label",
-- note: this is the _role_ that owns the table
table_owner as "table_owner",

'Clustering Key' as "stats:clustering_key:label",
clustering_key as "stats:clustering_key:value",
'The key used to cluster this table' as "stats:clustering_key:description",
(clustering_key is not null) as "stats:clustering_key:include",
Expand All @@ -70,8 +69,6 @@
to_varchar(convert_timezone('UTC', last_altered), 'yyyy-mm-dd HH24:MI'||'UTC') as "stats:last_modified:value",
'The timestamp for last update/change' as "stats:last_modified:description",
(last_altered is not null and table_type='BASE TABLE') as "stats:last_modified:include"
{%- endif %}

from {{ information_schema }}.tables
{%- endmacro %}

Expand Down

0 comments on commit be990e1

Please sign in to comment.