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

get all file names in one tsend mail

Hi

I have job to check bad files( having wrong format)

tfilelist---->tfileinputdelimited---->tschemacompliancecheck---->tmap---->tmysqloutput---->tfilecolpy---->tsendmail

I have list of files in tfilelist directory. Where file stores in .csv format. And I'm converting files into .csv.bad format if it doesnt match with the criteria set in tschemacompliancecheck.

All is working fine, wrong files are being rejected and converted from csv to .csv.bad. At the same time am sending an email for rejected file.

Problem is if there are 5 bad files am getting 5 mails, Is there any way so that I could get one mail for currently all rejected files.

Any help or suggestion ?

Labels (2)
8 Replies
Anonymous
Not applicable
Author

Hi Roy,

I think you have to add a subjob collecting the '.bad' files and aggregate that list into a single output.
tfilelist---->tfileinputdelimited---->tschemacompliancecheck---->tmap---->tmysqloutput---->tfilecolpy---->
on subjob ok -> tfilelist -> titeratetoflow -> taggregaterow -> tsendmail

To do this you need to to change the file iterator to a flow using the tInterateToFlow component. This flow can be used in a tAggregateRow component:

0683p000009MGv0.png

In the tIterateTolow component define the elements you want to use (at least 2 because you need an extra parent level to do the aggregation). For example:
Column: Folder / Value: ((String)globalMap.get("tFileList_1_CURRENT_FILEDIRECTORY"))
Column: File / Value: ((String)globalMap.get("tFileList_1_CURRENT_FILE"))


In the aggregation group by 'Folder' field and perform a 'list' operation on the 'Filename' field

The out put of the tAggregateRow is a Filename field containing the list of filenames!

Regards, Rolf.
Anonymous
Not applicable
Author

Nice !!
Anonymous
Not applicable
Author

Hey Rolf
Thanks for amazing flow.
But there is one problem. It gives list of all bad files which were converted day back. I need only those files which processed in current job.
Best !! 
Anonymous
Not applicable
Author

Hi roy123,
What's the connector you are using between your tFileCopy and tSendmail(OncomponentOk)? Would you mind posting your job design screenshot into forum?
Best regards
Sabrina
Anonymous
Not applicable
Author

same thing to be known. how ?
Anonymous
Not applicable
Author

xdshi, May I know how can i configure tsendmail for to get currently processed bad files in tsendmail after taggregaterow component ?
Anonymous
Not applicable
Author

Hi xdshi 

Here is my job

http://prntscr.com/9n33zp
Anonymous
Not applicable
Author

Hi,
We have replied to your another topic: http://community.talend.com:80/t5/Talend-Tech-Internal/Kinda-Sorta-Urgent-DSC-Data-Task-Assigning-an...
Could you please have a look at it?
Best regards
Sabrina