From 01a33bc763c00426628cd8a872dfbea4fc444660 Mon Sep 17 00:00:00 2001 From: Vinh Pham Date: Sun, 24 Sep 2023 21:52:53 +0700 Subject: [PATCH] Add spark identifier --- macros/utils.sql | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/macros/utils.sql b/macros/utils.sql index 744cf05..7dbccf2 100644 --- a/macros/utils.sql +++ b/macros/utils.sql @@ -144,6 +144,14 @@ {% endif %} {%- endmacro %} +{% macro spark__quote_identifier(identifier) %} + {% if identifier.startswith('`') %} + {{ return(identifier) }} + {% else %} + {{ return('`' ~ identifier ~ '`') }} + {% endif %} +{% endmacro %} + {% macro bigquery__quote_identifier(identifier) %} {% if identifier.startswith('`') %} {{ return(identifier) }}