diff --git a/.changes/unreleased/Fixes-20230830-164611.yaml b/.changes/unreleased/Fixes-20230830-164611.yaml new file mode 100644 index 000000000..ba8d47c01 --- /dev/null +++ b/.changes/unreleased/Fixes-20230830-164611.yaml @@ -0,0 +1,6 @@ +kind: Fixes +body: Fix to support removal of hologram, remove unused IAMDuration encoder +time: 2023-08-30T16:46:11.83975-04:00 +custom: + Author: gshank + Issue: "591" diff --git a/dbt/adapters/redshift/connections.py b/dbt/adapters/redshift/connections.py index 500de430f..83d05b587 100644 --- a/dbt/adapters/redshift/connections.py +++ b/dbt/adapters/redshift/connections.py @@ -1,7 +1,7 @@ import re from multiprocessing import Lock from contextlib import contextmanager -from typing import NewType, Tuple, Union, Optional, List +from typing import Tuple, Union, Optional, List from dataclasses import dataclass, field import agate @@ -12,7 +12,7 @@ from dbt.adapters.sql import SQLConnectionManager from dbt.contracts.connection import AdapterResponse, Connection, Credentials from dbt.contracts.util import Replaceable -from dbt.dataclass_schema import FieldEncoder, dbtClassMixin, StrEnum, ValidationError +from dbt.dataclass_schema import dbtClassMixin, StrEnum, ValidationError from dbt.events import AdapterLogger from dbt.exceptions import DbtRuntimeError, CompilationError import dbt.flags @@ -36,18 +36,6 @@ def get_message(self) -> str: drop_lock: Lock = dbt.flags.MP_CONTEXT.Lock() # type: ignore -IAMDuration = NewType("IAMDuration", int) - - -class IAMDurationEncoder(FieldEncoder): - @property - def json_schema(self): - return {"type": "integer", "minimum": 0, "maximum": 65535} - - -dbtClassMixin.register_field_encoders({IAMDuration: IAMDurationEncoder()}) - - class RedshiftConnectionMethod(StrEnum): DATABASE = "database" IAM = "iam"