Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Batch macro not updating control parameter with several actions

amti
7 - Meteor

Hello,

 

I have a macro to generic insert from one source table to another. This works fine in a worflow sometimes, sometimes doesn't.

I converted it to a macro with 1 control parameter only : table_name.

This one and only Control parameter has several actions, depending on the components that required it.

 

But, for some, reason, the input data for Snowflake, is not substituting the "REPLACE BY STRING" with the Control Parameter: neither for select from a table, neither for create SQL Statement (which creates the dummy table if it doesn't exist).

Is there a limit for actions for the same control parameter or something?

 

Here is my batch macro behavior:

 

I use TABLE_NAME to be replace in "SELECT FROM DB.SCHEMA.TABLE_NAME" and TABLE1 for a 2nd action updating the PreSQL .
This used to work before on a workflow, but know, with more actions, it seems it doesn't behave the same way...

Does anybody have a hint that can help me here? Maybe I'm just biased for looking over and over at the same thing!🙄

 

 -> Action 01 for input data: TABLE1 to be updated with ControlParam action for create table in PRESQL statement

macro_Action01.PNG

 

 

-> Action 02: to update TABLE_NAME with controlParameter in select query (table doesn't exist on a 1st run, but that's why I have create table in presql...) 

macro_Action02.PNG

 

3 REPLIES 3
BenMoss
ACE Emeritus
ACE Emeritus

Hi @amti,

 

To understand the problem and just confirm, the two actions aren't updating the same value?

 

I'll see if I can have a play and replicate the issue.

 

Ben

amti
7 - Meteor

Hi, Ben

 

Actually this is weird, but the solution for me was the same as in here: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Help-Macro-output-is-different-from-wh... 

Basically, I suspected that the first 2 actions for create table and select * from table were not being correctly updated since they had similar names:

- TABLE1

- TABLE_NAME

 

I changed them for:

- {PARAM1}

- {TARGET}

 

and it's working now. Which means, we might as well use names that are not closed to reserved ones like TABLE or names that dereive from each other? I don't really now.

 

Anyway, is there a way, since I don't have a macro output on my Batch Macro, to "see" the output log of the macro, after the lastComponent? Because right now, as it is, I can't connect anything after my macro on my workflow. I would like to have more logging details like I would have , something like "20 records were inserted (...)" .

 

Thank you in advance.

BenMoss
ACE Emeritus
ACE Emeritus

Okay good to hear it's working now!

 

To answer your question around logging, in your workflow (which has your macro within it), you should go to your workflow configuration pane (click anywhere in the whitespace of the canvas and the configuration pane will reference the workflow rather than a specific tool) and there is a tab titled 'runtime', one of the options towards the bottom is 'show all macro messages'. This will pull the messages through from your macro and into your workflow.

 

Ben

Labels