Error handling inside of batch macro
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello everyone,
Need advice on how to stop the execution of a particular part of the workflow by reach a condition.
I'm working under creating a batch macro where define product that has a necessary amount of periods for TS tools and then use the output to join with the original dataset.
When executing my macro I get an error message: Error: Batch_forecast (4): Record #3: Tool #13: None of the groups had sufficient records to produce an ARIMA model. Please supply more records.
The issue occurrences when a False result of the filter tool is empty. To avoid that I want to stop of running the forecasting part, but don't break the entire workflow.
- Labels:
- Error Message
- Macros
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Try using Containers and conditionally enable/disable the container.
Here are a few related posts. Most of these posts mention checkboxes or radio buttons, but they also discuss Containers.
How to use checkbox to run path in workflow
Using the conditional runner macro
Alteryx > Academy > Interactive Lessons > Creating Analytic Apps > Implementing Conditional Routing
https://community.alteryx.com/t5/Interactive-Lessons/Implementing-Conditional-Routing/ta-p/243117
Disable or enable multiple containers based on selection of a radio button
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for your advice, however, approaches in the list explain how to configure a part of workflow through an interface. I would like to stop the execution of the forecasting part in case when row count is null without a direct input via an interface.
I have tried to implement that logic by activating/deactivating a container, but it couldn't be done due to the impossible to configure container through the output of the filter tool.
Have you any thoughts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Georgiy
You should be able to accomplish this by taking this part of the macro and putting into a nested macro
Within the nested macro, add a detour around these tools and a control parameter that changes the direction taken by the detour container
In your original macro, create a field that will be passed to the control parameter of the new macro. This field should have the string False if you have records to process and True if you don't.
Dan
