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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Talend Architecture Multiple Output

Hi,
For my project, I have to control a txt file as input and do some checks on each line. There are controls on the format but also functional controls, so I did not use the component tSchemaCompliance because I want to customize the wording from my mistakes.
I decided to use a tMap controls with one output for each control (with filter output) :
0683p000009MFky.png



tMap : 
0683p000009MFl3.png



And for each controls, i add a ligne into my db like this :
0683p000009MFl8.png  



My problem : Java code/ parameters are all the same for each tJavaRow(PARAM_FLUX_ANO)/tOracleSP(ADD_ANOMALIE) for each output of my tMap... I want to combine all my output into one, which perform one tJavaRow --> tOracleSP. Because i have a lot of output (20) and i have to copy past all the process if want to add one control...

Thanks for your help

Labels (2)
6 Replies
Anonymous
Not applicable
Author

Hi,
Have you already checked this article about:TalendHelpCenter:Can I create a Job with multiple paths from a single source to the same target?
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi,

Sorry but it doesn't reply at my question, it's not the same architecture.

Thanks,
Anonymous
Not applicable
Author

You could use a tHashOutput with a link on each other since they have the same schema.

At the end of your file, put a SubjobOk linked to a tHashInput, and then insert to Oracle.

You migght need to "initialise" the tHashOutput with a tFlowToIterate since you can't know which one will be the first to be called.

Morgan.
cterenzi
Specialist
Specialist

Pushing all the outputs into a hash will let you have 1 tJavaRow and tOracleSP, but I wonder if you wouldn't be better off checking the various error conditions in a tJavaRow instead of a tMap.  You could control the value of LIB_ERROR based on the incoming values with nested conditionals, and have just one output.  A tFilterRow would let you separate error records from non-errors, if necessary.
Anonymous
Not applicable
Author

tHashoutput is not available in latest versions of the talend. 
I suggest you to get rid of tMap and put all the validations in a tJavaRow component. You can have multiple if else conditions in the tJavaRow and have a single output. Your job  UI will become simple but your complexity will go inside tJavarow component. 
Anonymous
Not applicable
Author

@sankalp.verma : It is available, it is just hide in the component because it's a technical one, you have to display it (loot at the doc).
@cterenzi : I've run to the same problem, if one line can produce several error (missing field), doing it with a tjavarow force you to have one error line, which you then have to normalize and then extract the field. But it's easier to read than a large tmap with several output.