Skip to content

Commit

Permalink
fix: use string when text is passed (#498)
Browse files Browse the repository at this point in the history
Co-authored-by: Jeremy Guiselin <jeremy.guiselin@jobteaser.com>
  • Loading branch information
nicor88 and Jrmyy authored Nov 10, 2023
1 parent 673b9a7 commit 3d6e488
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dbt/adapters/athena/column.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from dataclasses import dataclass
from typing import ClassVar, Dict

from dbt.adapters.athena.relation import TableType
from dbt.adapters.base.column import Column
Expand All @@ -9,6 +10,11 @@
class AthenaColumn(Column):
table_type: TableType = TableType.TABLE

TYPE_LABELS: ClassVar[Dict[str, str]] = {
"STRING": "VARCHAR",
"TEXT": "VARCHAR",
}

def is_iceberg(self) -> bool:
return self.table_type == TableType.ICEBERG

Expand Down
1 change: 1 addition & 0 deletions dbt/adapters/athena/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ class AthenaAdapter(SQLAdapter):
ConnectionManager = AthenaConnectionManager
Relation = AthenaRelation
AdapterSpecificConfigs = AthenaConfig
Column = AthenaColumn

# There is no such concept as constraints in Athena
CONSTRAINT_SUPPORT = {
Expand Down

0 comments on commit 3d6e488

Please sign in to comment.