I will post the article about detection of the errors in Alteryx.
In a workflow that is used repeatedly, you must be checking some things whether there is any errors or not, but it is common to forget checking them. Sometimes, those errors is not shown as the Designer. For example, L anchor in the Join tool should not be output. In this case, you might forget checking.
Use case
For example, when the product master is not updated, the calculation results will be strange. In this article, I explain how to check these things automatically by Designer.
Input data is following transaction data.
And we use this data as the Product Master.
To summarize the transaction data, you have to join those data by Product ID and multyply the Unit Price and Qty and then summarize them.
How to detect the errors
In this case, the check point is L anchor of the Join tool. If there is the data which is not registered at the Product Master, those data will be output at the L anchor.
You have to check this anchor.
Error detecting by Test tool
In this post, I would explain about the Test tool. This tool is in Developer tool category. This tool makes you show the error when the set conditions are met.
It is difficult to understand the setting of the Test tool when you look first.
Add the Add button to make test case.
In this case, you want to check whether the record count is 0 or not, enter as follows. The “Test Name” will be used as the error name, so you need to write it easy to understand.
Let’s run with part of the Product Master missing.
The Test tool showed the error as we want.
Test Tool Error Detection Logic
By the way, you can choose the error detection logic in the Test Tool.
In this article, I explained the compare the record count test, you can also test the all logical expressions are true or not. Additionaly, you can connect multiple data source to the Test tool, so you can check the record count of the different data stream each other. Furthermore, you can check multiple way and data source at one Test tool.
But, note that you can’t modify the error messages which you want to show.
Conclusion
- I explained how to detect the errors by the Test tool.
- The Test tool can be done multiple tests by one Test tool.
- You can test…
- Does it match the specified record count?
- Does it match the record counts in each data?
- Are the all results of expressions “True” in the specified expression?
- Is the result of expression “True” at the first row?
- This auto detect of the error should be inserted, so you don’t need to check actively.
- This kind of automatic error detection is a technique that you should definitely take advantage of, as it is done automatically without you having to worry about checking the output of each tool after the workflow is executed.
- The Test tool could be reckoned as containing some test case. But if you want to detect more complex check, you have to use the Message tool so that you can do more flexible tests.
Sample workflow download
The next blog post is…
The next blog is about error detection by Designer.
コメント