Skip to main content

Why SQL Server CDC client is converting datetime and date fields to String and where as the JDBC Consumer is keeping datetime to datetime and date to date in pipeline. Because of this we have to explicitly change the data types of fields from SQL SERVER CDC which is overhead and time taking. Could you please let us know if this is expected and how to fix it? We cannot use type converter as we have more than 500 tables and cannot hardcode the column names 

Hello @rayyan143786 ,

Thank you for reaching to us. I ran few tests internally with SQL Server CDC and found that it is preserving the DATE data-type to the next stage unless you enable the configuration “Convert Timestamp To String” to True.

I’m attaching the preview details to this threads which contains two screenshots:

Screenshot1: Ran when “Convert Timestamp To String” = False.

Screenshot2: Ran when “Convert Timestamp To String” = True.

 

Could you please check the screenshots and confirm if you have enable the configuration in the SQL Server CDC stage?

 

Thank you - AkshayJ


Thank you Akshay for your reply. The issue is because I am using JTDC driver instead of JDBC driver and JTDC driver is converting all date and datetime to String. When I changed to native JDBC driver it worked fine for me. Thanks!


Thank you @rayyan143786 for sharing the solution. You can mark the reply as best answer and close the loop here. 


Reply