Alteryx Designer Desktop Discussions

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

Conditional Workflow Scheduling

kevb
6 - Meteoroid

I am trying to create a conditional part of my workflow to first query a database, then from that query, check if the output matches "A" in this case. 

 

If that query from that database is = "A", then run workflow A. However, if that query matches "B", run the other workflow B. 

 

I am having a hard time determining which tools to use in order to make this work. I've attached an example of what my workflow looks like. This workflow is workflow A, and there is a duplicate of this same exact workflow called workflow "B". The only difference between the two is the file name, and the query in the database. The workflow essentially hard codes s3 bucket name, adds a date and time to the file name, queries a database, and sends that to S3. The dynamic input is used to get the credentials from EPV and then uses those credentials in a string to connect to the database. 

 

Anything helps! I am not able to use runner tool

My initial thoughts for a solution: epv -> dynamic input (to query database) -> filter? -> somehow connect to each container for workflow A and B

 

 

 

4 REPLIES 4
KGT
10 - Fireball

You could do this with Control Containers, however I haven't played with them heavily and so am not the best to ask.

 

How I would do this is make the workflow (A&B) into a macro and feed the filename and query in depending on the initial query.

kevb
6 - Meteoroid

Do you have any examples on control containers?

 

Also with the screen shot given, how would I make that into a macro if it doesn’t have any input or outputs needed?

kevb
6 - Meteoroid

apologies meant to send the reply here:

 

Do you have any examples on control containers?

 

Also with the screen shot given, how would I make that into a macro if it doesn’t have any input or outputs needed?

KGT
10 - Fireball

I'm not sure if I fully understand the setup here. I assumed that the AWS upload tool needed manual configuration, thus requiring the macro, but if the settings on it are taken from fields, then append the result of the query after the formula, and add a filter to decide the bucket/object depending on the result of the query. 

 

If not, then the below may be needed.

 

The part that needs to change has to go into the macro. So, I am assuming the following: 

  • EPV Macro is the Input
  • The AWS S3 macro is the output. This needs to change depending on the results of a query.
    • If this has the option to use fields for the settings, then no need for the macro, but if the options that change are text on that tool configuration, then the macro is needed.
    • Also, if the text input defines the bucket for the s3 tool, then no need for the macro, just need the query to update that chain of tools. (put both options in to the text input and then use a filter to dynamically choose the right one.)
  • If that's the case, then the AWS tool must go inside the macro and you feed the macro the required information to update the s3 tool
    • So, the inside of the macro would contain the s3 tool with an interface tool to update that s3 tool.

 

Information on Control Containers can be found here: https://help.alteryx.com/current/en/designer/tools/developer/control-container-tool.html

 

Labels