Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
As you see in code snippet below, I am just printing the defaultInput.
Turns out all keys are duplicated as you see in the log snippet I have added
@ElementListener
public void onNext(
@Input final JsonObject defaultInput,
@Output final OutputEmitter<JsonObject> defaultOutput) {
// this is the method allowing you to handle the input(s) and emit the output(s)
// after some custom logic you put here, to send a value to next element you can use an
// output parameter and call emit(value).
logger.info("Object as string is " + defaultInput.toString());
, INFO: Object as string is {"Age":20.0,"No_of_Parents_or_Children_on_Board":0.0,"No_of_Siblings_or_Spouses_on_Board":1.0,"Passenger_Class":"\"First\"","Passenger_Fare":77.95829772949219,"Sex":"\"Female\"","Survived":"\"Yes\"","age":20.0,"no_of_Parents_or_Children_on_Board":0.0,"no_of_Siblings_or_Spouses_on_Board":1.0,"passenger_Class":"\"First\"","passenger_Fare":77.95829772949219,"sex":"\"Female\"","survived":"\"Yes\""}
My schema is as below, but all keys are duplicated, once as you see in schema and then with lower case
Anybody else running into this ?
Hi @bhu,
This issue has been identified and fixed for the coming version of the studio which will come with Talend Component Kit >= 1.1.0. It comes from the fact some columns don't respect Java POJO convention and therefore their getter and field names don't match and lead to a duplicate mapping between the rowStruct and JSON model.
Romain
Thank you!!
I was losing my mind over this for some time