Skip to content

Commit 2579747

Browse files
authored
Ele 4931 dremio types mapping (#844)
* changed dremio datatypes to lowercase * fixed dremio types in integration tests
1 parent 178e57c commit 2579747

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

integration_tests/tests/test_exposure_schema_validity.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_exposure_schema_validity_correct_columns_and_types(
5757
):
5858
explicit_target_for_bigquery = (
5959
"other"
60-
if dbt_project.dbt_runner.target in ["bigquery", "snowflake", ""]
60+
if dbt_project.dbt_runner.target in ["bigquery", "snowflake", "dremio", ""]
6161
else "string"
6262
)
6363
DBT_TEST_ARGS = {
@@ -130,6 +130,7 @@ def test_exposure_schema_validity_invalid_type_name_present_in_error(
130130
"databricks_catalog": "int",
131131
"athena": "int",
132132
"trino": "int",
133+
"dremio": "int",
133134
}.get(dbt_project.dbt_runner.target, "numeric")
134135
DBT_TEST_ARGS = {
135136
"node": "models.exposures_test",

macros/utils/data_types/data_type_list.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@
153153
{% endmacro %}
154154

155155
{% macro dremio__data_type_list(data_type) %}
156-
{% set string_list = ['VARCHAR', 'CHARACTER VARYING'] | list %}
157-
{% set numeric_list = ['INT','INTEGER','BIGINT','DOUBLE','DECIMAL','FLOAT','SMALLINT','TINYINT'] | list %}
158-
{% set timestamp_list = ['DATE','TIME','TIMESTAMP', 'TIME WITH TIME ZONE', 'TIMESTAMP WITH TIME ZONE'] | list %}
159-
{% set boolean_list = ['BOOLEAN', 'BIT'] | list %}
156+
{% set string_list = ['varchar', 'character varying'] | list %}
157+
{% set numeric_list = ['int','integer','bigint','double','decimal','float','smallint','tinyint'] | list %}
158+
{% set timestamp_list = ['date','time','timestamp', 'time with time zone', 'timestamp with time zone'] | list %}
159+
{% set boolean_list = ['boolean', 'bit'] | list %}
160160

161161
{%- if data_type == 'string' %}
162162
{{ return(string_list) }}

0 commit comments

Comments
 (0)