Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi community,
I do need to create a csv file with a colunm with the number of rows from other csv.
I'm able to get the number of rows using tfilerowcount - tjava System.out.println(globalMap.get("tFileRowCount_1_COUNT"));
but i dont know how to pass this variable to a tfileoutputdelimited so i can create a csv file with a colum called rowcount and the number.
i suppose this is easy but i dont know how to do it, any suggestions?
thanks a lot.
Add a new column in the output table on tMap before tFileOutputDelimited, set the expression of column as:
((Integer)globalMap.get("tFileRowCount_1_COUNT"))
Hi shong, thanks for the help, i'm trying to do that but i have no result.
my talend is.
tfilerowcount_1 (with the csv file attached to the tfilerow) - main connection - tmap_1 (no colums on the left side and in the right side i have your expression in a colum called rowcount) - main connection - tfileoutputdelimited (with the name of the resultant csv).
what i'm doing wrong?
@Javier Palomares the global variable should be used in next subjob, change your job to:
tFileRowCount
|onsubjobok
tFixedFlowInput (or any input component)--main--tMap--tFileOutputDelimeted.