I have metadata activity which helps me to find the file based on the regex. When I have the matched pattern I am able to retrieve the child items but when not matched it simply returns empty childitems list and the timeout is not working as expected. I want to rerun the metadata activity if no child items are found and put time out for a maximum of 2 days for searching.
Available Filename in blob :
- SampleStores_multi
- SampleStores_single
- Stores.txt
Input Filename: Sales_*
Could you please help me with the solution?
CodePudding user response:
You can create storage event trigger for your pipeline and provide the wild card file path to trigger the pipeline when the required file is uploaded in the folder path.
You can loop the Get Metadata activity inside until loop.
• Create a variable to enable the flag when the file is found.
• Loop the Until loop by checking if the flag is enabled.
• Inside loop, check if the file is found in the child items of getting metadata activity output and update the variable using set variable activity.