From fb5320f7bc49cafa89f670302b5d0f4c836ccb19 Mon Sep 17 00:00:00 2001 From: Drew Banin Date: Wed, 6 May 2020 10:08:17 -0400 Subject: [PATCH] (#2406) Fix for error in error handler for duped data tests --- CHANGELOG.md | 3 ++- core/dbt/exceptions.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f7a2387daf..2c0b12568f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Fixes - When tracking is disabled due to errors, do not reset the invocation ID ([#2398](https://github.com/fishtown-analytics/dbt/issues/2398), [#2400](https://github.com/fishtown-analytics/dbt/pull/2400)) +- Fix for logic error in compilation errors for duplicate data test names ([#2406](https://github.com/fishtown-analytics/dbt/issues/2406), [#2407](https://github.com/fishtown-analytics/dbt/pull/2407)) ## dbt 0.17.0b1 (May 5, 2020) @@ -2230,4 +2231,4 @@ profile: "side-project" model-defaults: .... -``` \ No newline at end of file +``` diff --git a/core/dbt/exceptions.py b/core/dbt/exceptions.py index 23332fd0012..eda38b64512 100644 --- a/core/dbt/exceptions.py +++ b/core/dbt/exceptions.py @@ -729,6 +729,8 @@ def raise_duplicate_resource_name(node_1, node_2): get_func = 'doc("{}")'.format(duped_name) elif node_1.resource_type == NodeType.Test and 'schema' in node_1.tags: return + else: + get_func = '"{}"'.format(duped_name) raise_compiler_error( 'dbt found two resources with the name "{}". Since these resources '