From 81678e229db9af259926949b1be10f7bb5d2d695 Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 21 Jul 2023 15:58:31 -0700 Subject: [PATCH 1/5] use dynamic schema in test_grant_access_to.py --- tests/functional/adapter/test_grant_access_to.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/functional/adapter/test_grant_access_to.py b/tests/functional/adapter/test_grant_access_to.py index 633cebe92..3ee7047d3 100644 --- a/tests/functional/adapter/test_grant_access_to.py +++ b/tests/functional/adapter/test_grant_access_to.py @@ -87,6 +87,14 @@ def test_grant_access_succeeds(self, project, setup_grant_schema, teardown_grant class TestAccessGrantFails: + @pytest.fixture(scope="class", autouse=True) + def setup(self, project): + with project.adapter.connection_named("__test_grants"): + relation = project.adapter.Relation.create( + database=project.database, schema=f"{project.test_schema}_seeds" + ) + yield relation + project.adapter.drop_relation(relation) @pytest.fixture(scope="class") def models(self): return { From 9a8d28ef0a2ab58bc1d8cda527e1491c058c708e Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 21 Jul 2023 15:58:51 -0700 Subject: [PATCH 2/5] use dynamic schema in test_grant_access_to.py --- tests/functional/adapter/test_grant_access_to.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/functional/adapter/test_grant_access_to.py b/tests/functional/adapter/test_grant_access_to.py index 3ee7047d3..77213bf26 100644 --- a/tests/functional/adapter/test_grant_access_to.py +++ b/tests/functional/adapter/test_grant_access_to.py @@ -95,6 +95,7 @@ def setup(self, project): ) yield relation project.adapter.drop_relation(relation) + @pytest.fixture(scope="class") def models(self): return { From 0a2d3ad61d35de6c175fb88439f539057f744109 Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 22 Sep 2023 11:45:24 -0700 Subject: [PATCH 3/5] revert setup --- tests/functional/adapter/test_grant_access_to.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/functional/adapter/test_grant_access_to.py b/tests/functional/adapter/test_grant_access_to.py index 77213bf26..633cebe92 100644 --- a/tests/functional/adapter/test_grant_access_to.py +++ b/tests/functional/adapter/test_grant_access_to.py @@ -87,15 +87,6 @@ def test_grant_access_succeeds(self, project, setup_grant_schema, teardown_grant class TestAccessGrantFails: - @pytest.fixture(scope="class", autouse=True) - def setup(self, project): - with project.adapter.connection_named("__test_grants"): - relation = project.adapter.Relation.create( - database=project.database, schema=f"{project.test_schema}_seeds" - ) - yield relation - project.adapter.drop_relation(relation) - @pytest.fixture(scope="class") def models(self): return { From b3d167049e6eb0cfe66706fe182a23084c9d9926 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 23 Apr 2024 11:16:42 -0700 Subject: [PATCH 4/5] Stop adding aliases to render_limited output --- dbt/adapters/bigquery/relation.py | 1 + tests/functional/adapter/empty/test_empty.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dbt/adapters/bigquery/relation.py b/dbt/adapters/bigquery/relation.py index 3a3a7fbe6..086b4a2aa 100644 --- a/dbt/adapters/bigquery/relation.py +++ b/dbt/adapters/bigquery/relation.py @@ -23,6 +23,7 @@ class BigQueryRelation(BaseRelation): quote_character: str = "`" location: Optional[str] = None + require_alias: bool = False renameable_relations: FrozenSet[RelationType] = field( default_factory=lambda: frozenset( diff --git a/tests/functional/adapter/empty/test_empty.py b/tests/functional/adapter/empty/test_empty.py index c224c51df..3bf47f35d 100644 --- a/tests/functional/adapter/empty/test_empty.py +++ b/tests/functional/adapter/empty/test_empty.py @@ -1,5 +1,9 @@ -from dbt.tests.adapter.empty.test_empty import BaseTestEmpty +from dbt.tests.adapter.empty.test_empty import BaseTestEmpty, BaseTestEmptyInlineSourceRef class TestBigQueryEmpty(BaseTestEmpty): pass + + +class TestBigQueryEmptyInlineSourceRef(BaseTestEmptyInlineSourceRef): + pass From 1efb2a877f4e80739b5fa5158f0c91210cc2da7b Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 23 Apr 2024 13:18:05 -0700 Subject: [PATCH 5/5] add changie --- .changes/unreleased/Fixes-20240423-131752.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Fixes-20240423-131752.yaml diff --git a/.changes/unreleased/Fixes-20240423-131752.yaml b/.changes/unreleased/Fixes-20240423-131752.yaml new file mode 100644 index 000000000..048c23d8a --- /dev/null +++ b/.changes/unreleased/Fixes-20240423-131752.yaml @@ -0,0 +1,6 @@ +kind: Fixes +body: Stop adding aliases to render_limited output +time: 2024-04-23T13:17:52.059553-07:00 +custom: + Author: colin-rogers-dbt + Issue: "1190"