Support Questions
Find answers, ask questions, and share your expertise

Pass additional parameters to NiFi CDC's JDBC connection

New Contributor

Hey!

I'm a totally fresh NiFi user, so any help and tips are more than welcome.


I want to read newly added data from MySQL, convert it to json and send as a Kafka message. And I believe I know how to achieve this, however... right now I'm struggling with connection to database. More precisely, I get:

 

 

Caused by: java.sql.SQLException: The server time zone value 'CEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

 

 

And I totally understand this, as indeed all databases in my company have Time Zone set to CEST and... for some unknown for me reason, we can't change it to specific TimeZone like Rome, Warsaw, Berlin, etc.


When I saw this error message for the very first time, I was like: 
Hey! That's not a problem. JDBC connector accepts many additional parameters and one of them is serverTimezone So, I'll add specific Timezone and that's it. Everything will be fine. But... then I realized that CDC doesn't allow to pass any additional parameter to JDBC connector.
I have tried to pass this parameter to Database/Schema Name Pattern property like this: schema_name?serverTimezone=UTC, however it seems to be ignored. So... my question is:


How can I pass additional JDBC parameters in CaptureChangeMySQL processor?

Or maybe there is some magic Nifi setting/property which will allow me to apply serverTimezone parameter to all connections, in all processors. You know, some kind of global change on NiFi level?

Or... more general questions: How to make it CaptureChangeMySQL working, if you can't change server timezone on MySQL level?

I use Nifi in version 1.13.2


Thank you!

 

0 REPLIES 0
; ;