1. If you have a table with records for the RUN_IDs then you can create a variable with a list of those IDs.
Temp: Load concat(RUN_ID & '@',',') as RunList from analytics_table; LET vRunList = peek('RunList'); Drop table Temp;
2. See this discussion: loop through to load all files from a folder and its subfolders?
In the loop you check if the folder name is in the list of RUN_IDs.
for each SubDirectory in dirlist( Root & '\*' ) if(substringcount('$(SubDirectory)' & '@', '$(vRunList)') then call ScanFolder(SubDirectory) end if next SubDirectory
Sorry am not clear with your requirement.
I have attached an example that fetches files from different folders as they are listed in a master file.
Can u please explain your requirement?
looping while loading.zip 169.0 K