Skip to content

Commit 14c3c71

Browse files
committed
Use DPE own type_string
1 parent 9bb9031 commit 14c3c71

4 files changed

Lines changed: 8 additions & 12 deletions

File tree

File renamed without changes.
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
{%- endmacro -%}
44

55
{%- macro default__type_string() -%}
6-
{{ return(api.Column.string_type(600)) }}
6+
{{ return(dbt.type_string()) }}
77
{%- endmacro -%}
88

9-
{%- macro bigquery__type_string() -%}
10-
{{ return("STRING") }}
9+
{%- macro redshift__type_string() -%}
10+
{{ return(api.Column.string_type(600)) }}
1111
{%- endmacro -%}
12-
13-
{%- macro databricks__type_string() -%}
14-
{{ return("STRING") }}
15-
{%- endmacro -%}

macros/unpack/get_relationship_values.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
{%- set values_line =
2525
[
26-
"cast('" ~ node.unique_id ~ "' as " ~ dbt.type_string() ~ ")",
27-
"cast(NULL as " ~ dbt.type_string() ~ ")",
26+
"cast('" ~ node.unique_id ~ "' as " ~ dbt_project_evaluator.type_string() ~ ")",
27+
"cast(NULL as " ~ dbt_project_evaluator.type_string() ~ ")",
2828
"FALSE",
2929
]
3030
%}
@@ -37,8 +37,8 @@
3737

3838
{%- set values_line =
3939
[
40-
"cast('" ~ node.unique_id ~ "' as " ~ dbt.type_string() ~ ")",
41-
"cast('" ~ parent ~ "' as " ~ dbt.type_string() ~ ")",
40+
"cast('" ~ node.unique_id ~ "' as " ~ dbt_project_evaluator.type_string() ~ ")",
41+
"cast('" ~ parent ~ "' as " ~ dbt_project_evaluator.type_string() ~ ")",
4242
"" ~ loop.last ~ "" if node.unique_id.split('.')[0] == 'test' else "FALSE"
4343
]
4444
%}

macros/wrap_string_with_quotes.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% macro wrap_string_with_quotes(str) %}
22
{% if str is none %}
3-
{{ return('cast(NULL as ' ~ dbt.type_string() ~ ')') }}
3+
{{ return('cast(NULL as ' ~ dbt_project_evaluator.type_string() ~ ')') }}
44
{% else %}
55
{{ dbt.string_literal(str) }}
66
{% endif %}

0 commit comments

Comments
 (0)