Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

macros versus containers

chickenlicken
8 - Asteroid

I have a workflow that is getting long.  I am using containers to organise it.  I have also started packaging pieces of the workflow into macros - not so they can be repeated but so that they can be reduced to just one icon instead of multiple.

 

Is this a good strategy?  Or will I be slowing the workflow down / any other disadvantages?

 

 

4 REPLIES 4
JoBen
11 - Bolide

Hi @chickenlicken, does your workflow have any inputs that have ODBC connections or connections to a SQL server? If it does, making your SQL statement as specific as possible can help eliminate the need for extra tools in your workflow stream and typically make your workflow run faster. A good example would be joining two tables in your SQL statement rather than importing two tables separately and then joining them in your workflow stream. Just a thought. 

danilang
19 - Altair
19 - Altair

Hi @chickenlicken 

 

I'm sure you'll get differing opinions on this, but I think that you should continue using containers to organize your workflows.  I have several workflows with >300 controls and containers, tool annotations and comments are the way I maintain control.  I only use macros when required for reuse, or to code processes that cannot be done(or would require many tools) in a regular workflow.

 

Macro's do have a certain performance hit, but if you only call them once in your workflow then that won't be an issue.   The bigger problem is maintaining and debugging the workflow.  I find it much easier to debug inline than to debug the same code when encapsulated in a macro.  I have to set up the proper input parameters and then do several iterations of change...test...save...run main...repeat until fixed.

 

Edit:  Wireless connections.  I forgot to mention these.  I put tools into containers based on various criteria, but in general each container ends up with usually one or a few connections as outputs that generally are used in several points further down the chain.  For these inter-container connections, I always use wireless connections to keep the overall page tidier.

 

Dan

 

 

 

 

 

  

asilva
7 - Meteor

Really the purpose of macros is to repeat work and not have to re-create the code in Alteryx when you can reference a macro over and over again for doing the same thing. Containers really are the way to go in my opinion. They make organizing streams easier. Also, in my experience it 'may' take longer for your workflow to render meta-data when you have a bunch of macros in it, which causes delays in development time.

 

Hope this helps!

 

-Tony

chickenlicken
8 - Asteroid

Thanks for your thoughts, all.  I'm sticking with containers - it does make an enormous workflow but it does seem easy to move between them if labelled correctly.

Labels