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 quote identifier adapter #211

Merged
merged 1 commit into from
Apr 18, 2024
Merged
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
14 changes: 11 additions & 3 deletions macros/utils.sql
Original file line number Diff line number Diff line change
Expand Up @@ -191,22 +191,22 @@
{% endif %}
{%- endmacro %}

{% macro spark__quote_identifier(identifier) %}
{% macro bigquery__quote_identifier(identifier) %}
{% if identifier.startswith('`') %}
{{ return(identifier) }}
{% else %}
{{ return('`' ~ identifier ~ '`') }}
{% endif %}
{% endmacro %}

{% macro bigquery__quote_identifier(identifier) %}
{% macro databricks__quote_identifier(identifier) %}
{% if identifier.startswith('`') %}
{{ return(identifier) }}
{% else %}
{{ return('`' ~ identifier ~ '`') }}
{% endif %}
{% endmacro %}

{% macro snowflake__quote_identifier(identifier) %}
{% if identifier.startswith('"') %}
{{ return(identifier) }}
Expand All @@ -215,6 +215,14 @@
{% endif %}
{% endmacro %}

{% macro spark__quote_identifier(identifier) %}
{% if identifier.startswith('`') %}
{{ return(identifier) }}
{% else %}
{{ return('`' ~ identifier ~ '`') }}
{% endif %}
{% endmacro %}

{% macro cache(scope_key, key, value) %}
{% if dbt_unit_testing.config_is_true('disable_cache') %}
{{ return (nil) }}
Expand Down
Loading