|
| 1 | +{# These macros have been moved into dbt-core #} |
| 2 | +{# Here for backwards compatibility ONLY #} |
| 3 | + |
1 | 4 | {# string ------------------------------------------------- #}
|
2 | 5 |
|
3 | 6 | {%- macro type_string() -%}
|
|
8 | 11 | {{ return(adapter.dispatch('type_string', 'dbt')()) }}
|
9 | 12 | {% endmacro %}
|
10 | 13 |
|
11 |
| --- This will return 'text' by default |
12 |
| --- On Postgres + Snowflake, that's equivalent to varchar (no size) |
13 |
| --- Redshift will treat that as varchar(256) |
14 |
| - |
15 | 14 |
|
16 | 15 | {# timestamp ------------------------------------------------- #}
|
17 | 16 |
|
|
23 | 22 | {{ return(adapter.dispatch('type_timestamp', 'dbt')()) }}
|
24 | 23 | {% endmacro %}
|
25 | 24 |
|
26 |
| -<<<<<<< HEAD |
27 |
| -======= |
28 |
| -/* |
29 |
| -POSTGRES |
30 |
| -https://www.postgresql.org/docs/current/datatype-datetime.html: |
31 |
| -The SQL standard requires that writing just `timestamp` |
32 |
| -be equivalent to `timestamp without time zone`, and |
33 |
| -PostgreSQL honors that behavior. |
34 |
| -`timestamptz` is accepted as an abbreviation for `timestamp with time zone`; |
35 |
| -this is a PostgreSQL extension. |
36 |
| -
|
37 |
| -SNOWFLAKE |
38 |
| -https://docs.snowflake.com/en/sql-reference/data-types-datetime.html#timestamp |
39 |
| -The TIMESTAMP_* variation associated with TIMESTAMP is specified by the |
40 |
| -TIMESTAMP_TYPE_MAPPING session parameter. The default is TIMESTAMP_NTZ. |
41 |
| -
|
42 |
| -BIGQUERY |
43 |
| -TIMESTAMP means 'timestamp with time zone' |
44 |
| -DATETIME means 'timestamp without time zone' |
45 |
| -TODO: shouldn't this return DATETIME instead of TIMESTAMP, for consistency with other databases? |
46 |
| -e.g. dateadd returns a DATETIME |
47 |
| -
|
48 |
| -/* Snowflake: |
49 |
| -https://docs.snowflake.com/en/sql-reference/data-types-datetime.html#timestamp |
50 |
| -The TIMESTAMP_* variation associated with TIMESTAMP is specified by the TIMESTAMP_TYPE_MAPPING session parameter. The default is TIMESTAMP_NTZ. |
51 |
| -*/ |
52 |
| - |
53 |
| ->>>>>>> caf0388 (Refactor tests, passing on BQ) |
54 | 25 |
|
55 | 26 | {# float ------------------------------------------------- #}
|
56 | 27 |
|
@@ -94,6 +65,3 @@ The TIMESTAMP_* variation associated with TIMESTAMP is specified by the TIMESTAM
|
94 | 65 | {% macro default__type_int() %}
|
95 | 66 | {{ return(adapter.dispatch('type_int', 'dbt')()) }}
|
96 | 67 | {% endmacro %}
|
97 |
| - |
98 |
| --- returns 'int' everywhere, except BigQuery, where it returns 'int64' |
99 |
| --- (but BigQuery also now accepts 'int' as a valid alias for 'int64') |
0 commit comments