This is an example of using the while-do task from the toolbox in ETL studio.
The project loops through company table and for each entry in the table, the corresponding tables are loaded. (This is a special table structure that some ERP systems have with a set of tables per company).
The script can be downloaded below and be used as a starting point of making the same logic in your ETL flow.
Download: While-do loop.improj
Note: The project is missing the connection manager - so it can't be executed, but only used for inspiration out of the box.