Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
Hi,
You can change the flow as per the below skeleton flow.
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
Hi,
You can change the flow as per the below skeleton flow.
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