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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Collect rejects from tFileInputDelimited

Hello Team,
I need to process delimited file and collect all the rejects.
To do so I use tFileInputDelimited -> Rejects -> tFileOutputDelimited where tFileOutputDelimited is configured to output to a .txt file. Unfortunately in this output .txt file I collect partially parsed rejected lines along with error message. What I really need to collect in this file is the original line(s) from input file that were rejected without any additional information. 
Here is an example. in the input file I have the following line:
"AAA|BBB"|Literacy 9 Student Book A|NSB2B/NSB2C|Softcover|Softcover|1024118|0176398163|9780176398163|Literacy 9 Student Book A|ITEM-B2B|Online Student Centre, 5 year||Literacy 9 Student Book A Online Student Centre, 5 year|31|PRDONLYSUP|158
this line will be rejected since it is not properly formed according to csv schema that I defined. In output file, instead of this full line above, I only get the following:
"AAA|BBB"|Literacy 9 Student Book A|NSB2B/NSB2C|Softcover|||||||||||||For input string: "Softcover" - Line: 0
Is there any way that I can collect original input lines?
Thank you!
Svetlana
Labels (2)
12 Replies
Anonymous
Not applicable
Author

Take a look at this documentation: https://help.talend.com/search/all?query=tExtractDelimitedFields&content-lang=en
This is what it says about field Separator:
Since this component uses regex to split a filed and the regex syntax uses special characters as operators, make sure to precede the regex operator you use as a field separator by a double backslash. For example, you have to use "\\|" instead of "|".
TRF
Champion II
Champion II

Hi,
Did you try to join input data file with the reject file on a separate subjob after the 1st one is finished?
A little transformation plus playing with separators should works.
Regards,
TRF
Anonymous
Not applicable
Author

Hi TRF,
my problem was to get rejects file. The rejected lines returned by tFileInputDelimited were not complete original lines. It would return partially processed lines, so if parsing failed on the very first column of the line, I would not have anything that I could compare with the input data. My backup plan was however to compare input data with successfully processed data to find out what was rejected. Solution with tExtractDelimitedFields works fine for my puposes.
Cheers,
Svetlana