Open rmoff opened 3 years ago
@Josca any suggestions on how to resolve this error? Thanks :)
@maorfr It seems the source field is missing in your input data. Maybe only in one row.
Ah, that might make sense, given the data. Do you think condition could be handled by the SMT?
@rmoff definitelly could be. But someone would have to implement that :smile: . Feel free to create PR! Maybe we could add defaultValue
for that case?
Feel free to create PR!
😁 I would love to but I'm not a Java coder. Shall we leave this issue open for now for others to help with if they can?
@rmoff sure, keep it open if you want
I'm just revisiting this now. Looking at the connect Record, I noticed that the field I'm interested in is a JSON array:
text=[{"header":{"msg_type":"0003","source_dev_id":"","user_id":"","original_data_source":"SMART","msg_queue_timestamp":"1616084988000","source_system_id":"TRUST"},"body":{"event_type":"DEPARTURE","gbtt_timestamp":"","original_loc_stanox":"","planned_timestamp":"1616084910000","timetable_variation":"1","original_loc_timestamp":"","current_train_id":"","delay_monitoring_point":"true","next_report_run_time":"4","reporting_stanox":"16495","actual_timestamp":"1616084940000","correction_ind":"false","event_source":"AUTOMATIC","train_file_address":null,"platform":"","division_code":"20","train_terminated":"false","train_id":"151K781Q18","offroute_ind":"false","variation_status":"LATE","train_service_code":"21734000","toc_id":"20","loc_stanox":"16495","auto_expected":"true","direction_ind":"UP","route":"2","planned_event_type":"DEPARTURE","next_report_stanox":"16602","line_ind":"L"}},{"header":{"msg_type":"0003","source_dev_id":"","user_id":"","original_data_source":"SMART","msg_queue_timestamp":"1616084988000","source_system_id":"TRUST"},"body":{"event_type":"ARRIVAL","gbtt_timestamp":"","original_loc_stanox":"","planned_timestamp":"","timetable_variation":"0","original_loc_timestamp":"","current_train_id":"","delay_monitoring_point":"false","next_report_run_time":"","reporting_stanox":"","actual_timestamp":"1616085000000","correction_ind":"false","event_source":"AUTOMATIC","train_file_address":null,"platform":"","division_code":"20","train_terminated":"false","train_id":"129M301P18","offroute_ind":"true","variation_status":"OFF ROUTE","train_service_code":"21731000","toc_id":"20","loc_stanox":"18441","auto_expected":"","direction_ind":"","route":"","planned_event_type":"ARRIVAL","next_report_stanox":"","line_ind":""}}]
So could the NPE seen above be caused by that?
Using version 0.0.7 I get:
with config
TransformationChain:
📎 Debug SMT output: com.github.jcustenborder.kafka.connect.transform.common.Debug.txt