The latest Designer has the Control Container to mange the execution order, so you don’t need the Block Until Done(BUD) tool anymore. But I sometimes had a bug and have to go to workaround and have to use the older Designer. So, I would like to verify the behavior of the Block Until Done tool.
The Block Until Done tool is very long name, so I would like to shorten this tool’s name to BUD in this post.
Order of data flow in Designer
First of all, how does Designer decide the order in which to flow data?
According to the help document, those orders are depends on the “Tool ID”, which is determined by the order in which they were placed. Indeed, when you decide the executing order, you have to select the first tool something. In my experience for Designer, I feel that it is almost followed this rule ( I sometimes don’t feel it).
Deeply speaking, E1 Engine is to move data one record at a time and process it until it is blocked by a Blocking tool. AMP Engine is to move data 4M Bytes packets at a time in parallel by multi-thread. But the how to decide the processing order is the same as the E1 Engine, maybe.
Confirm it by simple sample workflows
Let’s confirm the behavior of the Designer and BUD tool by simple samples. Tool ID is the number in parentheses on the tool annotation.

What I want to see is what order these tools will work. If the processing order is the same as Tool ID, the order should be as follows number that are in rectangle.

The result is as follows.

As the result logs, the processing order is not the Tool ID order, but it is the order of the BUD anchor number. The screen shot below is the actual processing order, which is in the yellow rectangle.

Two BUD tools sample
The next workflow have 2 BUD tools. The 2 inividual datastream is in one workflow. In this case, the upper Text Input tool have the smallest tool ID, so it should be processed at first.

The actual processing order is the number in the rectangle and the log is as follows.

This means that upper data stream work first and complete the processing. And then, lower data stream begins.
This is when there are some BUD tools, the tool ID order on the upper stream of the BUD tools is the same as the processing order, just as it says in the Help.
This was XX, just as it says in the Help.
Join with other data downstream of BUD tool
The next is more complex workflow, which is to join with another datastream under the BUD tool.

The number in the rectangle is actual processing order. The result logs are as follows.

According to this log, the Output Data (8) connected to the BUD anchor 2 finished before Output Data(11) tool connected to the BUD anchor 1. Why? Normally, the BUD output anchor 1 should be completed first.
Let’s see the log carefully. First, Text Input tool (1)(2) is loaded and the data goes to the BUD tool. And then, the data on the output anchor 1 of the BUD move to the Summarize(9) tool. But the data stop at there and the Message tool (7) connected to the output anchor 2 of the BUD tool work and the data is saved at the Output Data(8) tool. After that, the Text Input (12) tool is loaded and go through the Append Fields. Finally, the data is saved at the Output Data (11) tool.
It is true that BUD output anchor 1 worked before BUD 2, but it appears to have stopped at the Summarize tool. This is caused by no data was coming into the S input of the Append Fields tool. So next, the BUD output anchor 2 was started. I think so.
How is the E1 Engine?
However, I did the confirmation by using AMP Engine. How is the E1 Engine? The result is different from AMP Engine result. All the Text Input tools worked first, so the processing scenario was different from AMP Engine result. I don’t know the reason why all Text Input tools work first by E1 Engine. So the data connected to the BUD output anchor 1 completed first. E1 Engine has the algorithm that the all input data load first? I’m not sure.

Conclusion
- I have confirmed how to flow the data by the Designer.
- The BUD output appears to flow in numerical order of the anchor.
- When there are some BUD tools, the tools have smaller tool ID on the upper stream of the BUD tool would be processed in the smaller order.
- When the workflow is complex, for example, the workflow have blocking tools or Join tool under the BUD tool, the processing order could be unintended. For example, the processing could not be completed in the Output Data tool and move the processing to another datastream.
- When you want to ensure processing in the order that you like, please see my blog “WeeklyAlteryxTips#61 Save data with the different schema to the different sheets in one Excel book – Part1“.
Sample Workflow Download
The next blog post is …
The next post is about invisible strings. I wrote this blog, but I did not post. However, it was handled as Weekly Challenge “Challenge #443: Mystery of the Unjoined Records“, so I would like to post this blog.
コメント