Alteryx Designer allows you to implement functions that are not natively available. It makes you do many things by Alteryx with flexibility.
In this post, I would like to create the workflow that can only work in a specific time range. This is useful for connecting to a database only during low load times.
Basic Concept
Basically, you can use the Date Time Now tool.

You can get the date and time when the workflow runs by this tool. And also you can compare it and available time slots list, and then the Designer decide continuing to run the workflow. However, the method for stopping the workflow varies depending on whether you use AMP engine or E1 engine, prevent input, or prevent output. Let’s take a look at them one by one.
Cheking the available time slots
First, I would like to explain how to check the available time slots. The workflow is as follows.

Available time slots list is as follows.

This workflow doesn’t accept the input such as 23:00/25:00. The time should be set more than 0:00 and less than 23:59. If you want to accept those data, you have to create more complex expression. In this workflow, I change the data type to Time type at the Append Fields tool and compare the Between function at the Filter tool to create more simple workflow.

After the Filter tool above, count the records which match the filter at the Count Records tool. If the record count is zero, the workflow should not continue running, so the Message tool show the error and stop the records. That Message tool’s setting is as follows.

From now, I
From here, I will explain the way in AMP Engine on/off, input limit, and output limit separately.
for the AMP Engine ON
The AMP Engine, which is released at Designer 2020.2, is a data processing engine designed to run at high speed with multi-threading. The original E1 engine moves one record at once, the AMP engine divides the data to multiple packet and processes. The AMP engine processes the data at high speed and some functions of the Designer only works on the AMP engine, so it should be used more actively.
And you have to use the Control Container, which is released on the Designer 2023.1, you can use it with the AMP Engine to control the running order.
When the Control Container’s input anchor is connected to anything, it is enabled when any data coming, and then the data would be processed. On the other hand, when the input anchor ot the Control Container is not connected, it will always be enabled and processes.
So, the Control Container with AMP Engine makes you to control the processing order easily. The workflow is as follows.

In this workflow, I use the Message tool, but it is not needed strictly. You can connect the output of the Filter tool to the Control Container’s input anchor directly. In other words, you can remove the Count Records tool and the Message tool from the workflow above.
That’s all for this post. Other pattern(ANP off and etc.) would be posted in other posts.
Conclusion
- I have explained how to create the workflow that only works at a specific time slot.
- In this post, I have explained the way with AMP Engine on. This way is needed the Control Container, so it is able to use in 2023.1 and later. If you use the Designer from 2020.2 to 2022.3, you have to use the E1 Engine. It would be explained at the next post.
Sample Workflow Download
The next blog post is …
I will continue from tihs episode next time.
コメント