From ffe6c15c9ea8ebbaf1b451ff45bc96a4364a4a00 Mon Sep 17 00:00:00 2001 From: Peter Allen Webb Date: Fri, 26 Apr 2024 14:36:51 -0400 Subject: [PATCH] Update for changes in namespace conventions. --- dbt/{ => adapters}/record.py | 6 ++++-- dbt/adapters/sql/connections.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) rename dbt/{ => adapters}/record.py (93%) diff --git a/dbt/record.py b/dbt/adapters/record.py similarity index 93% rename from dbt/record.py rename to dbt/adapters/record.py index 7a45d107a..3fdc027b7 100644 --- a/dbt/record.py +++ b/dbt/adapters/record.py @@ -2,7 +2,7 @@ from io import StringIO import json import re -from typing import Any, Optional, Mapping, Tuple +from typing import Any, Optional, Mapping from agate import Table @@ -32,7 +32,9 @@ def _clean_up_sql(sql: str) -> str: return sql.replace(" ", "").replace("\n", "") def _matches(self, other: "QueryRecordParams") -> bool: - return self.node_unique_id == other.node_unique_id and self._clean_up_sql(self.sql) == self._clean_up_sql(other.sql) + return self.node_unique_id == other.node_unique_id and self._clean_up_sql( + self.sql + ) == self._clean_up_sql(other.sql) @dataclasses.dataclass diff --git a/dbt/adapters/sql/connections.py b/dbt/adapters/sql/connections.py index 9f1914429..9adaafce5 100644 --- a/dbt/adapters/sql/connections.py +++ b/dbt/adapters/sql/connections.py @@ -20,7 +20,7 @@ SQLQuery, SQLQueryStatus, ) -from dbt.record import QueryRecord +from dbt.adapters.record import QueryRecord if TYPE_CHECKING: import agate