Hi Everyone, I have flinksql job that reads from k...
# troubleshooting
f
Hi Everyone, I have flinksql job that reads from kafka topic that has data in json format representing a table. I came across a scenario where wrong data in one of date column in json cause serialization error and cause my flinksql job to fail. Identified this flag
'value.json.ignore-parse-errors' = 'true'
and this makes the job keep running but translates the column value to
null
. I would like to know the logs of such incidents so that i can communicate to my upstream to fix. Any suggestions ?? Flink Versions: 1.17 and 1.16 P.S: for broader support posted here
k
If the column isn't nullable, you can just check if it is set to null.
f
Before I get control this record is ignored in deserialization after the above configuration. I don't want to create another job to run In parallel just to identify bad records hence looking for if any class specific debug log that can help me.
k
Oh so the whole row is dropped? I haven't seen anything in the table API that exposes that sort of granularity.
j
If it's only a single date column that causes an error, it'd be easier to read it as string and parse it later. You may also consider a user defined function to parse it. It the json messages are unreliable, I guess the DataStream connector should be more useful as it is more flexible to handle messages. Besides, you can use a side output to keep mal-formatted messages.
f
Good suggestion Jaehyeon. I was thinking on similar lines where i can use columns as string data type and then use with try_cast. But why can't i simply get the warning log of such deserialization failure?? is it missing functionality or it is logged as debug/info somewhere ??