Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Batch Macro update date

8 - Asteroid

I have multiple filter and formula tool  in workflow with date which has to be updated; basically first date of every month for every consecutive run. So I am using control parameter and update value action to do this. However batch macro is unionising records of output after every run which i dont want is there a way to achieve this? (the date was being changed manually earlier and now it is changing dynamically so a lot of calculations in the workflow are based on earlier flow that why i dont need the union part to be happening)

13 - Pulsar

I will provide a few of my own guesses based on what's been shared thus far as possible workarounds/solutions. It does sound like your workflow is complicated, which is why being very specific will help and even providing a sample input and output (maybe even 2 outputs for what you see vs. desired output) with dummy data would help clarify things further.

Case 1: Batch macro is outputting duplicated results that are unexpected.

  • Possible Solution 1: You need to use the Group By fields in the Batch Macro interface (this assumes that you were not previously)
  • Possible Solution 2: You are doing some kind of redundant calculation that shouldn't be a part of the batch macro. Just take that logic outside of the batch macro. I honestly cannot think of a reason this would be happening that would not be blatantly obvious silly.

Case 2: Batch macro is not outputting duplicate records. But duplicate records are still being produced.

  • This too doesn't make sense to me. After the internal union (final step) of a batch macro, every record in the output can be matched to exactly 1 batch from the input. This would imply that the batch couldn't be your source of duplication, unless you are running the batch multiple times for some reason and then else where in your workflow, using the Union Tool.
  • If this case describes your problem, please describe what's going on with simple details to illustrate the issue.

Case 3: This has become a bigger problem than it ever needed to be.

  • Possible Solution: Since you were just running this workflow repeatedly in the past without issue and manually changing the dates, just make the entire workflow an iterative macro (See attachment/images for details).

2023-11-15_07-49_Iterative Macro2.png

2023-11-15_07-49_Iterative Macro.png

18 - Pollux

@AndrewDMerrill - one addendum to your excellent summary - for Case 2- the problem could be the CONTROL PARAMETER  feeding into the batch macro is not unique. In this case the batch macro would execute multiple times for a give value. The easy fix for this is drop a SUMMARIZE tool prior to the batch macro in the MAIN WORKFLOW and group by the CONTROL PARAMETER.

8 - Asteroid

I want my output file to be updated after every run because it goes as an input in next run. So i think i will need a combination of both batch and iterative macro to achieve this!
The control parameter will take care of the changing of dates dynamically in all formula and filter tools wherever required and iterative macro part shall take care of updating the output part after every run making it ready as an input for next run.