Skip to content

Commit

Permalink
Add databricks quote identifier adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
cdiniz authored Apr 17, 2024
1 parent bc33159 commit 5a8e1f1
Showing 1 changed file with 11 additions and 3 deletions.
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

0 comments on commit 5a8e1f1

Please sign in to comment.