mirror of
https://github.com/dbt-labs/dbt-project-evaluator.git
synced 2025-12-18 02:11:27 +00:00
Use DPE own type_string
This commit is contained in:
@@ -3,13 +3,9 @@
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro default__type_string() -%}
|
||||
{{ return(dbt.type_string()) }}
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro redshift__type_string() -%}
|
||||
{{ return(api.Column.string_type(600)) }}
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro bigquery__type_string() -%}
|
||||
{{ return("STRING") }}
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro databricks__type_string() -%}
|
||||
{{ return("STRING") }}
|
||||
{%- endmacro -%}
|
||||
@@ -23,8 +23,8 @@
|
||||
|
||||
{%- set values_line =
|
||||
[
|
||||
"cast('" ~ node.unique_id ~ "' as " ~ dbt.type_string() ~ ")",
|
||||
"cast(NULL as " ~ dbt.type_string() ~ ")",
|
||||
"cast('" ~ node.unique_id ~ "' as " ~ dbt_project_evaluator.type_string() ~ ")",
|
||||
"cast(NULL as " ~ dbt_project_evaluator.type_string() ~ ")",
|
||||
"FALSE",
|
||||
]
|
||||
%}
|
||||
@@ -37,8 +37,8 @@
|
||||
|
||||
{%- set values_line =
|
||||
[
|
||||
"cast('" ~ node.unique_id ~ "' as " ~ dbt.type_string() ~ ")",
|
||||
"cast('" ~ parent ~ "' as " ~ dbt.type_string() ~ ")",
|
||||
"cast('" ~ node.unique_id ~ "' as " ~ dbt_project_evaluator.type_string() ~ ")",
|
||||
"cast('" ~ parent ~ "' as " ~ dbt_project_evaluator.type_string() ~ ")",
|
||||
"" ~ loop.last ~ "" if node.unique_id.split('.')[0] == 'test' else "FALSE"
|
||||
]
|
||||
%}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% macro wrap_string_with_quotes(str) %}
|
||||
{% if str is none %}
|
||||
{{ return('cast(NULL as ' ~ dbt.type_string() ~ ')') }}
|
||||
{{ return('cast(NULL as ' ~ dbt_project_evaluator.type_string() ~ ')') }}
|
||||
{% else %}
|
||||
{{ dbt.string_literal(str) }}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user