U-SQL does not support While or For. You can use WHERE statements to filter the extracted data and virtual columns to filter based on paths / file names ( example ).
For output to multiple files, you can write a unique set of lines and a WHERE clause for each output, if its a reasonable number of files.
As you said, you can also script using Powershell or U-SQL ( example ).
Dynamic output for multiple files is currently limited to private previews. Please send usql email to microsoft dot com with your script if you are interested in this feature, as this might work for your script based on your description.
Hope this helps, and let me know if you have more questions about implementing any of these solutions.
source share