Can I load the files based on the data in my table as variable without iterating through each row?

zll_0091
New Contributor III

Hi,

I have created this table which contains the data that I need for my source path and target table. 

zll_0091_2-1722958875477.png

source_path: /data/customer/sid={sid}/abc=1/attr_provider={attr_prov}/source_data_provider_code={src_prov}/

zll_0091_1-1722958858553.png

So basically, the value of each row are connected so I don't need to iterate all over them anymore. I wan to load only the files that are in the folder that is greater than my max(key). These is the sample structure of my storage:

zll_0091_3-1722958975973.png

For this example, using the first row of my table, my code should only load the files from folder10023 & folder10054.

Is there any way not to iterate through each rows of the table?