Hello ,
I am performing cdc copying from Oracle to Postgresql.
In Oracle, the date column in all tables goes to postgresql as unix timestamp.
I added the following parameters to the json file.
“transforms.start_date.type”:“org.apache.kafka.connect.transforms.TimestampConverter$Value”,
“transforms.start_date.target.type”: “Date”,
“transforms.start_date.field”: “start_date”,
“transforms.start_date.format”: “dd-MM-yyyy”, “transforms.end_date.type”:“org.apache.kafka.connect.transforms.TimestampConverter$Value”,
“transforms.end_date.target.type”: “Date”,
“transforms.end_date.field”: “end_date”,
“transforms.end_date.format”: “dd-MM-yyyy”,
in Oracle
EMPLOYEE_ID START_DATE END_DATE JOB_ID DEPARTMENT_ID
100 11-JUN-13 02-DEC-16 AC_ACCOUNT 30
100 11-JUN-11 06-MAR-18 AD_ASST 110
in PostgreSQL
EMPLOYEE_ID START_DATE END_DATE JOB_ID DEPARTMENT_ID
100 1370908800000 1480636800000 “AC_ACCOUNT” 30
100 1307750400000 1520294400000 “AD_ASST” 110
then I added additional time.precision.mode: “connect”.
The Date column in Oracle appears as timestamp in postgres.
Why is the confluent jdbc sink connector copying and transforming in this way even though I have formatted it?
Where am I doing wrong?
Thanks
Sönmez