Skip to content

Commit 6f675f1

Browse files
Update get_table_types_sql.sql
treat CLONE type tables in BigQuery as 'table'
1 parent f13a392 commit 6f675f1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

macros/sql/get_table_types_sql.sql

+10
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,13 @@
3030
else lower(table_type)
3131
end as {{ adapter.quote('table_type') }}
3232
{% endmacro %}
33+
34+
{% macro bigquery__get_table_types_sql() %}
35+
case table_type
36+
when 'BASE TABLE' then 'table'
37+
when 'CLONE' then 'table'
38+
when 'EXTERNAL TABLE' then 'external'
39+
when 'MATERIALIZED VIEW' then 'materializedview'
40+
else lower(table_type)
41+
end as {{ adapter.quote('table_type') }}
42+
{% endmacro %}

0 commit comments

Comments
 (0)