Hi Team,
I am using Flink CSV Decoder with AVSC generated java Object and facing issue
if the field name contains underscore(_) or fieldname starts with Capital case.
Sample Schema:
{
"namespace": "avro.employee",
"type": "record",
"name": "EmployeeTest",
"fields": [
{
"name": "emp_id",
"type": ["null","long"]
},
{
"name": "Name",
"type": ["null","string"]
}
]
}
Generated Java Object getters/setters:
public void setEmpId(java.lang.Long value) {
this.emp_id = value;
}
.........................................................................................................................
.........................................................................................................................
public java.lang.CharSequence getName() {
return Name;
}
Input record:
emp_id,Name
1,peter
Exception:
Caused by:
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:
Unrecognized field "emp_id" (class avro.person.EmployeeTest), not marked as
ignorable (2 known properties: "empId", "name"])
I have also found an old JIRA regarding this:
https://issues.apache.org/jira/browse/FLINK-2874
Any help would be appreciated!
Regards,
Kirti Dhar