Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dlt/destinations/impl/mssql/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class MsSqlTypeMapper(TypeMapperImpl):

dbt_to_sct = {
"nvarchar": "text",
"varchar": "text",
"float": "double",
"bit": "bool",
"datetimeoffset": "timestamp",
Expand Down
9 changes: 9 additions & 0 deletions tests/load/mssql/test_type_mapper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from dlt.destinations import mssql


def test_from_destination_type_mssql_text_types() -> None:
caps = mssql().capabilities()
mapper = caps.get_type_mapper()

assert mapper.from_destination_type("nvarchar", None, None) == {"data_type": "text"}
assert mapper.from_destination_type("varchar", None, None) == {"data_type": "text"}