Skip to content

Commit e77db79

Browse files
upjohncclrcrl
authored andcommitted
Handle external tables in get_tables_by_pattern_sql (#351)
1 parent 10cc5d2 commit e77db79

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99

1010
## Fixes
1111
* Handle booleans gracefully in the unpivot macro ([#305](https://github.com/fishtown-analytics/dbt-utils/pull/305) [@avishalom](https://github.com/avishalom))
12+
* Fix a bug in `get_relation_by_prefix` that happens with Snowflake external tables. Now the macro will retrieve tables that match the prefix which are external tables ([#350](https://github.com/fishtown-analytics/dbt-utils/issues/350))
1213
## Under the hood
1314

15+
1416
# dbt-utils v0.6.4
1517

1618
### Fixes

macros/sql/get_tables_by_pattern_sql.sql

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
table_name as "table_name",
1111
case table_type
1212
when 'BASE TABLE' then 'table'
13+
when 'EXTERNAL TABLE' then 'external'
14+
when 'MATERIALIZED VIEW' then 'materializedview'
1315
else lower(table_type)
1416
end as "table_type"
1517
from {{ database }}.information_schema.tables

0 commit comments

Comments
 (0)