From 8c7fef47a47bfc3c2ba27a91d5548bc81c1554fd Mon Sep 17 00:00:00 2001 From: Jacob Beck Date: Tue, 31 Mar 2020 14:28:20 -0600 Subject: [PATCH 1/2] do not double-quote the database name --- CHANGELOG.md | 1 + core/dbt/include/global_project/macros/adapters/common.sql | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c421690f79d..39795839377 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Fixes - Fix a redshift-only issue that caused an error when `dbt seed` found a seed with an entirely empty column that was set to a `varchar` data type. ([#2250](https://github.com/fishtown-analytics/dbt/issues/2250), [#2254](https://github.com/fishtown-analytics/dbt/pull/2254)) +- Fix a bug where third party plugins that used the default `list_schemas` and `information_schema_name` macros with database quoting enabled double-quoted the database name in their queries ([#2267](https://github.com/fishtown-analytics/dbt/issues/2267), [#2281](https://github.com/fishtown-analytics/dbt/pull/2281)) ### Under the hood - Pin google libraries to higher minimum values, add more dependencies as explicit ([#2233](https://github.com/fishtown-analytics/dbt/issues/2233), [#2249](https://github.com/fishtown-analytics/dbt/pull/2249)) diff --git a/core/dbt/include/global_project/macros/adapters/common.sql b/core/dbt/include/global_project/macros/adapters/common.sql index 1d2ec0ca250..878b07e85e4 100644 --- a/core/dbt/include/global_project/macros/adapters/common.sql +++ b/core/dbt/include/global_project/macros/adapters/common.sql @@ -189,7 +189,7 @@ {% macro default__information_schema_name(database) -%} {%- if database -%} - {{ adapter.quote_as_configured(database, 'database') }}.INFORMATION_SCHEMA + database.INFORMATION_SCHEMA {%- else -%} INFORMATION_SCHEMA {%- endif -%} From e3ac64d14aabb906a638d521f43faa5ab0961640 Mon Sep 17 00:00:00 2001 From: Jacob Beck Date: Wed, 1 Apr 2020 08:37:07 -0600 Subject: [PATCH 2/2] PR feedback --- core/dbt/include/global_project/macros/adapters/common.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/dbt/include/global_project/macros/adapters/common.sql b/core/dbt/include/global_project/macros/adapters/common.sql index 878b07e85e4..97a17599939 100644 --- a/core/dbt/include/global_project/macros/adapters/common.sql +++ b/core/dbt/include/global_project/macros/adapters/common.sql @@ -189,7 +189,7 @@ {% macro default__information_schema_name(database) -%} {%- if database -%} - database.INFORMATION_SCHEMA + {{ database }}.INFORMATION_SCHEMA {%- else -%} INFORMATION_SCHEMA {%- endif -%}