On the connector documentation is referred that types Decimal
and Timestamp
are supported (Amazon Redshift Sink Connector for Confluent Platform | Confluent Documentation).
Although it’s not specified I guess this include AVRO Schemas (registered on Schema Registry).
I’m trying this connector on Clonfluent Cloud but I’m not able to understand how this type is specified on the AVRO schema.
I created a dummy topic with the following schema for the Value:
{
"type": "record",
"name": "AvroPayments",
"namespace": "com.code.data.domain.generated",
"fields": [
.....
{
"name": "chargedAt",
"type": {
"type": "long",
"logicalType": "timestamp-micros",
"connect.name": "org.apache.kafka.connect.data.Timestamp"
},
"doc": "Charge's charge timestamp in UTC."
},
{
....
And produced a message for the topic with the connector Active.
{
...
"chargedAt": -782801317000000,
...
}
Another thing that I find unexpected is that the same message on KafkaUI appears differently:
{
...
"chargedAt": "1945-03-12T19:11:23Z",
...
}
Although the message is consumed from the topic no record is written on the database (Redshift) where the table DDL goes like this:
chargedat bigint
I’m not sure that I’m specifying the type correctly but I also don’t see how to do so on the documentation.
Not sure if the connector code is accessible so I can better understand what is being done.
Thanks