Sometimes It Has To Be a Special Order ... Block Until Done

Sometimes It Has To Be a Special Order ... Block Until Done

The sequence of tools in the workflow determines the order of execution. In this example, data is read from a file, processed and finally the result is written to an output file.

Es wurde kein Alt-Text für dieses Bild angegeben.

In this example we have sales per customer, product, sales representative and day for two years. In our report, we want to compare the two years per customer, so we create the corresponding totals and then write them to the Excel file.

But what to do if we need a comparison not only for customers, but also for product and sales representatives? And all three resulting tables should be on the first sheet of our Excel workbook as an overview sheet?

Es wurde kein Alt-Text für dieses Bild angegeben.

Okay, let's just make the appropriate totals and write in the areas reserved on the sheet for each table. However, we are creating a problem with this. The steps after Dynamic Rename can be executed in parallel, the result is that parallel writing to the Excel file can occur.?

And a simultaneous write access leads to an error.

Es wurde kein Alt-Text für dieses Bild angegeben.

To prevent this, we need to make sure that these steps are not executed in parallel, but one after the other.?

We can achieve this by adding a Block Until Done tool. This tool has one input anchor and three output anchors that are numbered. The steps associated with the output anchors are then executed in the given order, first the complete branch connected to output anchor 1, then the one connected to anchor 2, finally the one connected to anchor 3.

Es wurde kein Alt-Text für dieses Bild angegeben.

This way we have resolved the "competition" between the writing processes and put them in an order.

But - what can we do if more actions are needed? Unfortunately, there is no possibility to add more output anchors.

In the not so unlikely case that our report is to be sent automatically by mail afterwards, or in the even highly probable case that further tables are to be added to the file, three output anchors are not enough.

Now, we can "cascade", that is, insert another Block Until Done tool that first separates into the two areas "Sum and Write" and "Send Email". The first area (which we had before) is then separated into individual steps again.

Es wurde kein Alt-Text für dieses Bild angegeben.

So first everything behind the yellow (1) is executed, in the order given by the Block Until Done tool highlighted in red. Then, the step behind the yellow (2) follows.

Of course, this could be extended even further, i.e. additional branches could be added.


要查看或添加评论,请登录

Roland Schubert的更多文章

  • Time For Summary

    Time For Summary

    When I receive a new table or file, I always try to first get an overview. Usually by bringing an INPUT DATA tool onto…

  • A Little Bit More: Oversampling

    A Little Bit More: Oversampling

    When selecting data records, it is often simply a matter of selecting only the first (or last) data from a table…

    1 条评论
  • Building Groups Based on Relations

    Building Groups Based on Relations

    Grouping is not necessarily a very unusual task - customer groups always come to my mind spontaneously. Common…

  • Different Types of Correlation

    Different Types of Correlation

    I have to admit it - I intuitively tend to look for relationships between different data. And indeed, I often recognize…

  • Grouping Data

    Grouping Data

    Grouping data in some way is an essential part of day-to-day business for data analysts. Many people immediately think…

  • Comparing To Lists

    Comparing To Lists

    Long years ago, a DIY chain in Germany launched a discount campaign entitled "20% discount on all items - except pet…

  • Famous (or Not-So-Famous) Last Words

    Famous (or Not-So-Famous) Last Words

    Sometimes you just have to have the last word - the last word from a text field, of course. When it comes to "breaking…

    1 条评论
  • Break on Error

    Break on Error

    An error has occurred in a workflow and it continues to run anyway? Sometimes that's all right, but only sometimes…

  • Year-To-Date Calculations

    Year-To-Date Calculations

    If you are working in Finance/FP&A/Controlling, calculating "Year to Date" (YTD) values is an essential part of your…

  • Compare Date and Time

    Compare Date and Time

    We often need data only for a specific period of time - a year, a month or a week, sometimes just a few hours, but the…

社区洞察

其他会员也浏览了