Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: list relations to include schema and caching tests #114

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions dbt/include/firebolt/macros/adapters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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) }}
Expand All @@ -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.
#}
Expand Down Expand Up @@ -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
#}

Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.*
Expand Down
29 changes: 29 additions & 0 deletions tests/functional/adapter/test_caching.py
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions tests/functional/adapter/utils/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Loading