I am working on a flat Bill of Material data set (left to right) that can be from 2 levels to 12 levels (currently).

Level 1 is a SQL call to the database and contains a field that defines the # of Levels of the BOM.
Note - the db I am using does not allow for recursive CTE or this would have been solved via SQL.
Level 2 for each is a unique join to Level 1 and not considered for the macro.
Level 3 - 12 are identical. Level 2 joins to Level 3, Level 3 to Level 4, Level 4 to Level 5, etc.

I thought initially the Iterative Macro would be a good option, but all of the tools would need to updated.
Never building an Iterative macro before and never knew adding a Control Parameter tool automatically changed it to a batch macro until after the fact.





Although the current workflow (very top image) is quick (Total run time is 1min 30 seconds) there are 3 issues
1) Each part is run through all 12 levels.
2) Not dynamic - what if the Levels exceed 12 (in the future)
3) There is a summarization record at the end of each BOM that I do not want. Example a 5 level BOM actually has 6 levels so it needs to stop before the 6th join.
*Note a dynamic select at the end could solve #3 above.
A batch macro could be built to include a detour at each level 3-12
This would solve issue 1 & 3
Not looking specifically for an "answer" per se, but how you did or would approach a scenario like this.
Puff
Below are some hideous examples I was playing with:

