Count of rejected rows in tFileinputdelimited component

One Star

Count of rejected rows in tFileinputdelimited component

hi
I want to capture the number of rejected rows from tfileinputdelimited component my workflow is as follows
tfilelist----->tfileinputdelimited----->tlogrow
|
|
tfileoutputdelimited(reject row) file is in appending mode

Now if two files are listed ,the rejected rows from 2 file will be written to tfileoutputdelimited in appending mode , i want to find out rejected rows for individual listed files. How to get the rejected values.

Does value for ((Integer)globalMap.get("tFileOutputDelimited_2_NB_LINE")) won't propagate on on component ok link
Moderator

Re: Count of rejected rows in tFileinputdelimited component

Hi,
What the expected rejected values looks like(see my pic)? Could you elaborate your case with an example with input and expected output values.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Count of rejected rows in tFileinputdelimited component

Hi
 I want to catch reject record by tFileinputdelimited into tfileoutputdelimited,
but i want rejected record as it is originally present in input file.
generally i am getting rejected record with adding/removing extra delimiter.
can anyone help on this
Seventeen Stars

Re: Count of rejected rows in tFileinputdelimited component

You can send the reject flow to a tMap and build an output flow for the rejected records with the same schema like the original input component. To do that connect the reject flow to a tMap. Add to your job and tFileOutputDelimited (for the rejected records) and the as schema the schema of the tFileInputDelimited (origin of your data) by copy and paste the columns in the schema editors.
Now connect the tMap with the new tFileOutputDelimited and accept the target schema for this flow.
Within the tMap you can adapt the reject flow schema to the new output.
One Star

Re: Count of rejected rows in tFileinputdelimited component

yes i did same but if we have extra delimiter in between record so reject is automatically deleting number of extra delimiter from end of record.
Moderator

Re: Count of rejected rows in tFileinputdelimited component

Hi rktalend1,
Could you elaborate your case with an example with input and expected output values? Screenshots will be preferred.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Count of rejected rows in tFileinputdelimited component

hi xdshi,
don't know why talendforge not working that's why unable to login to forum so unable to post screen shot.
my log something like tfileinputdelimited---->tmap------>tmssqloutput
                                        |
                                        |rejectflow
                                      tfileoutputdelimited.
file
1|xyz|123|assada4646|india|29
2|xyz|123|ass|ada|4646|india|29
3|xyz|123|assada4646|india|29
4|xyz|123|assada4646|india|29
                                       
in by reject flow second record will reject
it will be in tfileoutputdelimited something like that
2|xyz|123|ass|ada|4646
because it match schema with tfileinputdelimited in this case in reject floe we are loosing valie of last 2 column.
i want reject record as it is in original file..
Seventeen Stars

Re: Count of rejected rows in tFileinputdelimited component

Whats wrong with my suggestion you set a tMap in the reject flow and build in this way your reject output flow as you need?
One Star

Re: Count of rejected rows in tFileinputdelimited component

thanks jlolling but i am not getting desired o/p record as i mentioned i want rejected record as it it which originally present in source file.
Seventeen Stars

Re: Count of rejected rows in tFileinputdelimited component

OK, in this case you have to read the lines of the input file not with a tFileInputDelimited instead use the component tFileInputRow and read the whole line at once. After reading it into one schema column you need to separate the fields with tExtractDelimitedFields and of there is something wrong you can use the original input line for the reject flow. 
One Star

Re: Count of rejected rows in tFileinputdelimited component

Hi, I need to counts the records that are loaded successfully  and rejected records as well and also those failed records should be back to file landing zone. 
Seventeen Stars

Re: Count of rejected rows in tFileinputdelimited component

Why not, every input and output component has similar counters.