Alteryx Designer Desktop Discussions

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

Batch Macro with AMP not updating other marcro's variable.

bruno_leal
7 - Meteor

Hi all,

 

I have an app that calls a Batch Macro with a few parameteres:

Screenshot 2024-07-25 120530.png

 

Inside this Batch Macro I call another Macro and assign to one of it's variables %Question.ControlParam.Database% (which is one of the parameters of the batch macro:

Screenshot 2024-07-25 120743.png

 

 

 

With AMP I get this error which means the Batch Macro is not updating the value to be passed to the other macro:

Screenshot 2024-07-25 121135.png

 

Without AMP everything runs smooth.

 

Is there any workaround for this as without AMP to run this app for all systems it will take more than 1 day?

 

Thanks,

Bruno

 

 

 

 

 

 

19 REPLIES 19
bruno_leal
7 - Meteor

The problem might be in the Batch Macro itself. This is the initial part:

Screenshot 2024-07-25 192010.png

The Macro I call right in the beggining (see above) is the one that outputs error. In that Macro questions I have this:

Screenshot 2024-07-25 192116.png

apathetichell
19 - Altair

Hey - I have to bow out here - I've asked a few times for screenshots of your actoin tool configs. I've suggested various reroutes. If you can't provide the action tool screenshots - We can't help.  It's as simple as that. The action tools determine what's being fed in - and what you are feeding in or trying to change is wrong.

bruno_leal
7 - Meteor

What action tools? I have no action tools at the moment.

 

Nothing is wrong or this wouldn't work without AMP. The problem is related with using AMP, not with the app/macros setup.

 

Just to reiterate that I don't have any action tools now (I simplified the app to be easier to test) and the app works without AMP Engine.

apathetichell
19 - Altair

o.k. - let's take a step back. 1) AMP does weird things.

2) how are you updating your Database name in your macro? Your app message is that it is receiving a control parameter internal variable as your database name. This points to a problem with the update logic. If you are feeding a control parameter directly into a macro (ie without an action tool) THAT IS WRONG. DO NOT DO IT. Yes you may have seen it work sometimes but it makes troubleshooting these things very difficult. Both issues with 485 (can you confirm this is the batch macro?) relate to what is being fed in those fields. This data is not in your union tool (Correct?) - so it has to come from somewhere.

 

Next question - if it works out of amp - why use AMP? I'm not sure this is the kind of workflow you will see performance improvements from AMP even it works.

bruno_leal
7 - Meteor

Hi again.

 

I think I found the rootcause of the problem and basically it's related with in-db tools that we use in the end of the process. Tool 485 was a macro designed with in-db tools which I switched to normal tools and no longer is giving error. Unfortunately I can't change everywhere the in-db tools.

 

To better show the problem I prepared a simple set of app/macros that exemplify the problem. The one with the problem I use in-db tools in the last macro (Write file.yxmc).

Also, why do we need to use action tools to load control parameters into Macro questions? Is it a technical limitation from Alteryx?

 

Thank you for all the help so far,

Bruno

apathetichell
19 - Altair

action tools allow more granual control- and superior tracing when something goes wrong. I don't see why something would work on canvas vs in-db - assuming you have a named db connection. I tend to use text input tool to capture my query/connection and then run through dyanmic input-in-db. I can then use a browse or equilvalent to document any query issues hitting my db. Yup - the action tool updates that text input tool or another which is then appended to that one. I have minimal HANA experience and haven't used ECC/BW in a few years so I can't comment much on what SAP is expecting. I will say with Snowflake I've seen issues with quotes around objects vs no quotes which would effect what is/isn't working in your macro. Usually this is system specific.

bruno_leal
7 - Meteor

HI.

 

This is not directly connection to SAP. This is connection to SQL. On both cases I'm connecting to the same database (named Production). The problem is clearly with in-db because when I run the app where in-db is used the error indicates that the ControlParam value somehow was not passed through:

Screenshot 2024-07-26 150752.png

 

And the connection exists as if I manually input the question value in the macro it works ok:

 
 

It seems to be a bug in Alteryx as this makes no sense...

bruno_leal
7 - Meteor

2024-07-26_15-09-53.png

Somehow this screenshot was not posted in previous post...

apathetichell
19 - Altair

I'm still not 100% sure how your question response-> macro -> control parameter -> input tool is being passed.

 

the normal route is macro has a question. question is either manually mapped or mapped at run time. mapping at runtime is from DATA. this can be via another macro-> action-> text input -> macro.

 

next on the other side - the usual route is control parameter -> action tool - > database or control parameter -> action tool -> something.

 

when you try to dynamically change things at run time you need to understanding this mapping. this is best done via action tools. my suggestion is if you want this to be architected correctly - use action tools to map what you want where.

bruno_leal
7 - Meteor

So the logic I have is App -> Batch Macro -> Macro -> Macro. The App feeds the database name to the Batch Macro which then is used on the subsequent Macros.

As you can see in the examples I attached (zip files) I am using Action Tools in the Batch Macro to feed the database name to the subsequent Macro.

 

Moreover, the problem is related with the number of levels used. In the attached example I've removed 1 level and with App -> Batch Macro -> Macro it works.

 

This is strange, I can't understand what is the problem in Alteryx.

Labels