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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

If a file exists in S3, send an email alert

Hey everyone,

 

I'm creating a simple job that creates a file from an SQL query and puts that Excel file into S3 that will run once a day.  Then if that files gets generated, I want an email alert to be sent out.  My Excel file component is set to Don't generate empty file.  I'm then using a tS3List component to list the file that is generated.  The file name is a database table name + TalendDate.getDate("yyyy-MM-dd").  I'm then using an If with ((Boolean)globalMap.get("tS3List_3")) condition to trigger a tSendMail component.  Will this work or do I need anything else after the tS3List component to complete my check and trigger the email component?

 

0683p000009M7Ye.jpg

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

 

    You can change the flow as per the below skeleton flow.

0683p000009M7Yt.png

 

After creating the file, you can verify whether its present using tFileExists component. If the file is present, the If condition will work as true (you need to add the condition in If clause) and then use tS3Put. If the tS3Put is successful, you can trigger the email flow.

 

Please also verify the sample scenario mentioned below to understand the if clause verification method.

 

https://help.talend.com/reader/TxjSzmlJzD3vwT56FYszSA/o5dpZBnobRXdYU1S4wqupg

 

Since you are using OnSubJobOk method, it will be more robust.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Hi,

 

    You can change the flow as per the below skeleton flow.

0683p000009M7Yt.png

 

After creating the file, you can verify whether its present using tFileExists component. If the file is present, the If condition will work as true (you need to add the condition in If clause) and then use tS3Put. If the tS3Put is successful, you can trigger the email flow.

 

Please also verify the sample scenario mentioned below to understand the if clause verification method.

 

https://help.talend.com/reader/TxjSzmlJzD3vwT56FYszSA/o5dpZBnobRXdYU1S4wqupg

 

Since you are using OnSubJobOk method, it will be more robust.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved