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 aa29442 commit 69c2d58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target_clickhouse/sinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def _pre_validate_for_string_type(self, record: dict) -> dict:
for key, value in record.items():
# Checking if the schema expects a string for this key.
expected_type = self.schema.get("properties", {}).get(key, {}).get("type")
if expected_type == "string" and not isinstance(value, str):
if "string" in expected_type and not isinstance(value, str):
# Convert the value to string if it's not already a string.
record[key] = (
json.dumps(record[key])
Expand Down

0 comments on commit 69c2d58

Please sign in to comment.