Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Databricks handler for get_table_types_sql.sql #769

Merged
merged 3 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
## Contributors:
--->

# Unreleased
## Fixes
- get_relations_by_pattern for Databricks connection with Unity catalog #768 ([#768](https://github.com/dbt-labs/dbt-utils/issues/768), [#769](https://github.com/dbt-labs/dbt-utils/pull/769))

## Contributors:
@Harmuth94, [#768](https://github.com/dbt-labs/dbt-utils/issues/768)


# dbt utils v1.0

## Migration Guide
Expand Down
10 changes: 10 additions & 0 deletions macros/sql/get_table_types_sql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,13 @@
else lower(table_type)
end as {{ adapter.quote('table_type') }}
{% endmacro %}


{% macro databricks__get_table_types_sql() %}
case table_type
when 'MANAGED' then 'table'
when 'BASE TABLE' then 'table'
when 'MATERIALIZED VIEW' then 'materializedview'
else lower(table_type)
end as {{ adapter.quote('table_type') }}
{% endmacro %}