diff --git a/target_clickhouse/sinks.py b/target_clickhouse/sinks.py index b3f9c3a..5b73b1d 100644 --- a/target_clickhouse/sinks.py +++ b/target_clickhouse/sinks.py @@ -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] = (