Wednesday, February 29, 2012

Patching Talend Components

We were having problems today with the Talend tFileInputJSON component which basically sends to the stderr an error message when it cannot find a key specified in a JSONPath, The error for which there is at least a reported talend bug looks like:
Can't find any data with JSONPath ...
To solve this issue you can edit yourself a simple file in my case /Users/nestor/Downloads/TOS-All-r67267-V4.2.3//plugins/org.talend.designer.components.localprovider_4.2.3.r67267/components/tFileInputJSON/tFileInputJSON_begin.javajet. Just comment out the System.out.println():
}else{
  //System.err.println("Can't find any data with JSONPath " + query);
  //add null to take a place in List(buffer)
  jsonResultList.add(null);
}

Then you will need to restart Talend GUI.

IMO a better patch would be of course to just ignore the null if the schema is defined as "Allow Null".

No comments:

Followers