Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

duplicate keys/columns in custom componennt inside @elementlistener

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 case0683p000009MPdh.png

 

 

Labels (3)
3 Replies
Anonymous
Not applicable
Author

Anybody else running into this ?

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

Thank you!!

I was losing my mind over this for some time