Hi,
I'am a beginner on Talend and Java language.
I do a job who request on Informix DB with two tMap and one tUnit for generate a Directory of personns. The Job works fine. But i have a problem for reverse column at the end of job in my csv.
in fact : My csv contain : Name - married name - FirstName. I just want : if married name is different of null, the name = married name.
At the end of my job, juste before generate my final csv, i have add between my tUnit and the cvs output file a tJavaRow coponent, who i haved generate the java code correctely
(exemple
utput_row.nom_pat = input_row.nom_pat; (name)
output_row.nma_pat = input_row.nma_pat; (married name)
And i have add this code :
if (input_row.nma_pat != null) {
output_row.nom_pat = input_row.nma_pat;
output_row.nma_pat = "";}
else { output_row.nom_pat = input_row.nom_pat;}
With that, the job runs correctly, when a line contains a married name, i have this married name in the collumn of name, but the others lines who havent married name (male) have a null name. This is my problem. I think my If - Else is not good.
I hope someone could help me !
Thanks before, and sorry for my poor english!
Hi, actually, I'm selecting value using simple Oracle query in one of oraclecomponent toracleInput_1 in talend. The possible Output of this query is 'Y'/'N'. I'd like to process further on value of 'Y' and want to raise error on value of 'N'. but the problem is - I don't know how to get value of previous component in Tdie_1 component or in warning component. I want to Display message and want my Job to stop on value of 'N'. can you pls help me with code.