Skip to content

Commit

Permalink
Support initial load date format clickhouse
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed Feb 12, 2024
1 parent 69b5d33 commit 61bab17
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions flow/model/qvalue/avro_converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 61bab17

Please sign in to comment.