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: 
diggi86
Contributor
Contributor

Check for a particular file on S3 and then execute a python code if the file is found

I have requirement to run a python code. The python code takes data from S3 bucket and does some processing on it.

I have to execute the python code only if found a trigger file in bucket. 

I have build following design. I am running tsystem with Runif condition as

 

file_list == "u.data" 

 

but then I am getting error as "file_list cannot be resolved to a variable"

 

My S3 bucket contains multiple files but I need to check if my trigger file (in this case) u.data is present. If present then execute the python code through tsystem else give an output as "File Not Found"

0683p000009M7ID.png

Labels (2)
1 Reply
Anonymous
Not applicable

Hello,

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.

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

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

Best regards

Sabrina