-
Notifications
You must be signed in to change notification settings - Fork 127
/
type_helpers.sql
45 lines (33 loc) · 933 Bytes
/
type_helpers.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{#- BOOLEAN -#}
{% macro type_boolean() %}
{{ return(adapter.dispatch('type_boolean', 'dbt_artifacts')()) }}
{% endmacro %}
{% macro default__type_boolean() %}
{{ return(api.Column.translate_type("boolean")) }}
{% endmacro %}
{#- JSON -#}
{% macro type_json() %}
{{ return(adapter.dispatch('type_json', 'dbt_artifacts')()) }}
{% endmacro %}
{% macro default__type_json() %}
{{ return(api.Column.translate_type("string")) }}
{% endmacro %}
{% macro snowflake__type_json() %}
OBJECT
{% endmacro %}
{% macro bigquery__type_json() %}
JSON
{% endmacro %}
{#- ARRAY -#}
{% macro type_array() %}
{{ return(adapter.dispatch('type_array', 'dbt_artifacts')()) }}
{% endmacro %}
{% macro default__type_array() %}
{{ return(api.Column.translate_type("string")) }}
{% endmacro %}
{% macro snowflake__type_array() %}
ARRAY
{% endmacro %}
{% macro bigquery__type_array() %}
ARRAY<string>
{% endmacro %}