From c42fc0f22b781d6fd1adaa0b861e3ca7d46ce2f7 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 23 Apr 2024 11:24:20 -0700 Subject: [PATCH 1/2] Stop adding aliases to render_limited output --- dbt/adapters/redshift/relation.py | 1 + tests/functional/adapter/empty/test_empty.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dbt/adapters/redshift/relation.py b/dbt/adapters/redshift/relation.py index e120a2fac..eaf60f54c 100644 --- a/dbt/adapters/redshift/relation.py +++ b/dbt/adapters/redshift/relation.py @@ -27,6 +27,7 @@ class RedshiftRelation(BaseRelation): include_policy = RedshiftIncludePolicy # type: ignore quote_policy = RedshiftQuotePolicy # type: ignore + require_alias: bool = False relation_configs = { RelationType.MaterializedView.value: RedshiftMaterializedViewConfig, } diff --git a/tests/functional/adapter/empty/test_empty.py b/tests/functional/adapter/empty/test_empty.py index 3368a90f9..27f36f1df 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 TestRedshiftEmpty(BaseTestEmpty): pass + + +class TestRedshiftEmptyInlineSourceRef(BaseTestEmptyInlineSourceRef): + pass From 4f9ad04515728ab039b76644edeae162958d7c84 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 23 Apr 2024 13:15:18 -0700 Subject: [PATCH 2/2] add changie --- .changes/unreleased/Fixes-20240423-131503.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Fixes-20240423-131503.yaml diff --git a/.changes/unreleased/Fixes-20240423-131503.yaml b/.changes/unreleased/Fixes-20240423-131503.yaml new file mode 100644 index 000000000..8b5b82b38 --- /dev/null +++ b/.changes/unreleased/Fixes-20240423-131503.yaml @@ -0,0 +1,6 @@ +kind: Fixes +body: Stop adding aliases to subqueries when calling with `--empty` +time: 2024-04-23T13:15:03.118968-07:00 +custom: + Author: colin-rogers-dbt + Issue: "782"