From 791625ddf51af93bbba7ea6d7d57eeb65c7d5c5a Mon Sep 17 00:00:00 2001 From: Matthew McKnight <91097623+McKnight-42@users.noreply.github.com> Date: Mon, 13 Dec 2021 16:04:22 -0600 Subject: [PATCH] made change to test of str (#4463) (#4478) * made change to test of str * changelog update --- CHANGELOG.md | 1 + core/dbt/adapters/sql/connections.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6c2445368a..eaec334336f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Fixes - Fix wrong url in the dbt docs overview homepage ([#4442](https://github.com/dbt-labs/dbt-core/pull/4442)) +- Fix redefined status param of SQLQueryStatus to typecheck the string which passes on `._message` value of `AdapterResponse` or the `str` value sent by adapter plugin. ([#4463](https://github.com/dbt-labs/dbt-core/pull/4463#issuecomment-990174166)) Contributors: - [remoyson](https://github.com/remoyson) ([#4442](https://github.com/dbt-labs/dbt-core/pull/4442)) diff --git a/core/dbt/adapters/sql/connections.py b/core/dbt/adapters/sql/connections.py index 826dc1c74c6..b3984e04253 100644 --- a/core/dbt/adapters/sql/connections.py +++ b/core/dbt/adapters/sql/connections.py @@ -75,7 +75,7 @@ def add_query( fire_event( SQLQueryStatus( - status=self.get_response(cursor)._message, + status=str(self.get_response(cursor)), elapsed=round((time.time() - pre), 2) ) )