diff --git a/.changes/unreleased/Features-20220913-084758.yaml b/.changes/unreleased/Features-20220913-084758.yaml new file mode 100644 index 000000000..0a405cd97 --- /dev/null +++ b/.changes/unreleased/Features-20220913-084758.yaml @@ -0,0 +1,7 @@ +kind: Features +body: Array macros +time: 2022-09-13T08:47:58.706618-06:00 +custom: + Author: graciegoheen dbeatty10 + Issue: "255" + PR: "257" diff --git a/dbt/include/snowflake/macros/utils/array_construct.sql b/dbt/include/snowflake/macros/utils/array_construct.sql new file mode 100644 index 000000000..90db28e00 --- /dev/null +++ b/dbt/include/snowflake/macros/utils/array_construct.sql @@ -0,0 +1,3 @@ +{% macro snowflake__array_construct(inputs, data_type) -%} + array_construct( {{ inputs|join(' , ') }} ) +{%- endmacro %} diff --git a/tests/functional/adapter/utils/test_utils.py b/tests/functional/adapter/utils/test_utils.py index ae1aadcbc..d4a24afa8 100644 --- a/tests/functional/adapter/utils/test_utils.py +++ b/tests/functional/adapter/utils/test_utils.py @@ -1,5 +1,8 @@ import pytest -from dbt.tests.adapter.utils.base_utils import BaseUtils + +from dbt.tests.adapter.utils.test_array_append import BaseArrayAppend +from dbt.tests.adapter.utils.test_array_concat import BaseArrayConcat +from dbt.tests.adapter.utils.test_array_construct import BaseArrayConstruct from dbt.tests.adapter.utils.test_any_value import BaseAnyValue from dbt.tests.adapter.utils.test_bool_or import BaseBoolOr from dbt.tests.adapter.utils.test_cast_bool_to_text import BaseCastBoolToText @@ -28,6 +31,18 @@ class TestAnyValue(BaseAnyValue): pass +class TestArrayAppend(BaseArrayAppend): + pass + + +class TestArrayConcat(BaseArrayConcat): + pass + + +class TestArrayConstruct(BaseArrayConstruct): + pass + + class TestBoolOr(BaseBoolOr): pass