Skip to content

Commit

Permalink
Update snowflake test
Browse files Browse the repository at this point in the history
  • Loading branch information
steinitzu committed Sep 21, 2023
1 parent 6f4f16f commit 3b7d231
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions dlt/destinations/type_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ def wei_precision(self, precision: Optional[int] = None, scale: Optional[int] =
precision if precision is not None else default_precision, scale if scale is not None else default_scale
)

def timestamp_precision(self, precision: Optional[int]) -> Optional[int]:
return precision or self.capabilities.timestamp_precision

def from_db_type(self, db_type: str, precision: Optional[int], scale: Optional[int]) -> TColumnType:
return without_none(dict( # type: ignore[return-value]
data_type=self.dbt_to_sct.get(db_type, "text"),
Expand Down
4 changes: 2 additions & 2 deletions tests/load/snowflake/test_snowflake_table_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_create_table(snowflake_client: SnowflakeClient) -> None:
assert '"COL1" NUMBER(19,0) NOT NULL' in sql
assert '"COL2" FLOAT NOT NULL' in sql
assert '"COL3" BOOLEAN NOT NULL' in sql
assert '"COL4" TIMESTAMP_TZ NOT NULL' in sql
assert '"COL4" TIMESTAMP_TZ(9) NOT NULL' in sql
assert '"COL5" VARCHAR' in sql
assert '"COL6" NUMBER(38,9) NOT NULL' in sql
assert '"COL7" BINARY' in sql
Expand All @@ -59,7 +59,7 @@ def test_alter_table(snowflake_client: SnowflakeClient) -> None:
assert '"COL1" NUMBER(19,0) NOT NULL' in sql
assert '"COL2" FLOAT NOT NULL' in sql
assert '"COL3" BOOLEAN NOT NULL' in sql
assert '"COL4" TIMESTAMP_TZ NOT NULL' in sql
assert '"COL4" TIMESTAMP_TZ(9) NOT NULL' in sql
assert '"COL5" VARCHAR' in sql
assert '"COL6" NUMBER(38,9) NOT NULL' in sql
assert '"COL7" BINARY' in sql
Expand Down

0 comments on commit 3b7d231

Please sign in to comment.