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

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

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
Labels (2)
11 Replies
Anonymous
Not applicable
Author

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
0683p000009MCVW.png
_AnonymousUser
Specialist III
Specialist III

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
Anonymous
Not applicable
Author

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.
_AnonymousUser
Specialist III
Specialist III

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.
Anonymous
Not applicable
Author

Hi rktalend1,
Could you elaborate your case with an example with input and expected output values? Screenshots will be preferred.
Best regards
Sabrina
_AnonymousUser
Specialist III
Specialist III

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..
Anonymous
Not applicable
Author

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?
_AnonymousUser
Specialist III
Specialist III

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.
Anonymous
Not applicable
Author

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.