FOR WHILE loops in dataflows

Options

Related to: https://dojo.domo.com/main/discussion/52378/is-it-possible-to-use-while-do-loops-in-mysql-in-domo-dataflows

There is no way to implement SQL Recursive Queries in Domo: https://www.sqlservertutorial.net/sql-server-basics/sql-server-recursive-cte/

Instead you have to guess the max depth and build as many JOINs and columns manually into your Queries / Dataflows.


----

It would be ideal to have a mechanism for executing a FOR / WHILE loop in dataflows.

Use cases for my organization include, we have a writeback connector that due to the vendor's API restraints can only receive 1M rows at a time.

If we knew our dataflow could have up to 7M rows, we'd have to implement 7 writeback connectors in the dataflow each with a LIMIT / OFFSET function built in.

Ideal state would be to do a FOR WHILE loop that would handle pagination.


---

If you were doing any sort of bill of materials reporting and you wanted to structure your data so that you knew "for each recipie which items are part of this recipie" you would have to know the maximum depth of all work-in-progress recipies.

ex. I want to know all the components of a Subaru Forester. I'd need to know the components of an engine. each engine is composed of pistons... and stuff. each piston is composed of ... gaskets and rods. each gasket is made from ... stuff. In order to build a report that captures the full BOM i'd have to know the depth each WIP goes to.

Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨‍💻

**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"
6
6 votes

Active · Last Updated

Comments