From 69c2d581ba5386436ade60239bcb27a1285c322c Mon Sep 17 00:00:00 2001 From: Benjamin Theunissen Date: Tue, 21 Nov 2023 16:24:01 -0500 Subject: [PATCH] Fix --- target_clickhouse/sinks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target_clickhouse/sinks.py b/target_clickhouse/sinks.py index 56163a1..f3e30dd 100644 --- a/target_clickhouse/sinks.py +++ b/target_clickhouse/sinks.py @@ -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])