From 61bab1773e4080a03cebbfd54f19cb4965da2669 Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Mon, 12 Feb 2024 16:48:35 -0500 Subject: [PATCH] Support initial load date format clickhouse --- flow/model/qvalue/avro_converter.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flow/model/qvalue/avro_converter.go b/flow/model/qvalue/avro_converter.go index 1f8aac253..8aeaff19c 100644 --- a/flow/model/qvalue/avro_converter.go +++ b/flow/model/qvalue/avro_converter.go @@ -82,7 +82,7 @@ func GetAvroSchemaFromQValueKind(kind QValueKind, targetDWH QDWHType, precision }, nil case QValueKindTime, QValueKindTimeTZ, QValueKindDate, QValueKindTimestamp, QValueKindTimestampTZ: if targetDWH == QDWHTypeClickhouse { - if kind == QValueKindTime { + if kind == QValueKindTime || kind == QValueKindDate { return "string", nil } return "long", nil @@ -258,7 +258,8 @@ func (c *QValueAvroConverter) ToAvroValue() (interface{}, error) { if err != nil || t == nil { return t, err } - if c.TargetDWH == QDWHTypeSnowflake { + + if c.TargetDWH == QDWHTypeSnowflake || c.TargetDWH == QDWHTypeClickhouse { if c.Nullable { return c.processNullableUnion("string", t.(string)) } else {