Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BTheunissen committed Nov 21, 2023
1 parent 0fc50cd commit f3f6ed5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions target_clickhouse/sinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ def _pre_validate_for_string_type(self, record: dict) -> dict:
expected_type = self.schema.get("properties", {}).get(key, {}).get("type")
if expected_type is None:
continue
if not isinstance(expected_type, list):
expected_type = [expected_type]
if "string" in expected_type and not isinstance(value, str):
# Convert the value to string if it's not already a string.
record[key] = (
Expand Down

0 comments on commit f3f6ed5

Please sign in to comment.