diff --git a/dbt/include/firebolt/macros/adapters.sql b/dbt/include/firebolt/macros/adapters.sql index 246d94027..3609fddac 100644 --- a/dbt/include/firebolt/macros/adapters.sql +++ b/dbt/include/firebolt/macros/adapters.sql @@ -173,12 +173,14 @@ '{{ relation.schema }}' AS "schema", 'table' AS type FROM information_schema.tables + WHERE table_schema = '{{ relation.schema }}' UNION ALL SELECT '{{ relation.database }}' AS "database", table_name AS "name", '{{ relation.schema }}' AS "schema", 'view' AS type FROM information_schema.views + WHERE table_schema = '{{ relation.schema }}' {% endcall %} {% set info_table = load_result('list_tables_without_caching').table %} {{ return(info_table) }} @@ -194,7 +196,7 @@ temporary (bool): Unused, included so macro signature matches that of dbt's default macro relation (dbt relation/dict) - select_sql (string): The SQL query that will be used to generate + select_sql (string): The SQL query that will be used to generate the internal query of the CTAS language (string): sql or python models. Firebolt only supports sql. #} @@ -239,7 +241,7 @@ Return SQL string to create view. Args: relation (dict): dbt relation - select_sql (string): The SQL query that will be used to generate + select_sql (string): The SQL query that will be used to generate the internal query of the CTAS #} diff --git a/setup.cfg b/setup.cfg index 5b712dc38..d13e72f46 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,7 +23,7 @@ project_urls = [options] packages = find_namespace: install_requires = - dbt-core~=1.4 + dbt-core~=1.5 firebolt-sdk>=1.1.0 python_requires = >=3.7 include_package_data = True @@ -37,7 +37,7 @@ include = dbt, dbt.* [options.extras_require] dev = allure-pytest==2.* - dbt-tests-adapter~=1.4 + dbt-tests-adapter~=1.5 mypy==0.910 pre-commit==2.15.0 pytest==7.* diff --git a/tests/functional/adapter/test_caching.py b/tests/functional/adapter/test_caching.py new file mode 100644 index 000000000..dbdfc9b31 --- /dev/null +++ b/tests/functional/adapter/test_caching.py @@ -0,0 +1,29 @@ +from dbt.tests.adapter.caching.test_caching import ( + TestCachingLowerCaseModel, + TestCachingSelectedSchemaOnly, + TestCachingUppercaseModel, + TestNoPopulateCache, +) +from pytest import fixture + + +# TODO: remove this override once schema support is added. +@fixture(scope='module') +def unique_schema() -> str: + return 'public' + + +class TestNoPopulateCacheFirebolt(TestNoPopulateCache): + pass + + +class TestCachingLowerCaseModelFirebolt(TestCachingLowerCaseModel): + pass + + +class TestCachingUppercaseModelFirebolt(TestCachingUppercaseModel): + pass + + +class TestCachingSelectedSchemaOnlyFirebolt(TestCachingSelectedSchemaOnly): + pass diff --git a/tests/functional/adapter/utils/test_utils.py b/tests/functional/adapter/utils/test_utils.py index a76129492..317f7b45f 100644 --- a/tests/functional/adapter/utils/test_utils.py +++ b/tests/functional/adapter/utils/test_utils.py @@ -376,6 +376,7 @@ def models(self): """ +@mark.xfail(reason='susbstr(text, bigint) is not supported, waiting on FIR-28289') class TestRight(BaseRight): @pytest.fixture(scope='class') def models(self):