Alteryx Designer Desktop Discussions

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

How to run dynamic query when the pipelines doesn't have data & complete the workflow

gelvira
7 - Meteor

I am doing some an in-depth processing of data from one database which results in few or no exceptions. 

I use a dynamic query to bring some fields from another database and do further processing. 

 

The issue is when I have no data resulting in an exception - the dynamic SQL query fails. What's the best way around this problem? 

 

My dynamic query is simple & complies all the incoming exception IDs into a list using cross-tab& passes it in the query: 

Select * from abc

where data = '20221205'

and ID in ('898989', 99999') 

 

I appreciate any help and suggestions. 

 

4 REPLIES 4
ChrisTX
15 - Aurora

Can you post an example of what you're trying to accomplish?

 

You have a few options like Detour, dynamically enabling/disabling containers, using a Count tool which always returns one value, etc.

 

Chris

apathetichell
19 - Altair

you can throw a count with your first tool. when count != 0 your macro which contains your second query runs otherwise it is skipped.

gelvira
7 - Meteor

Thanks for you quick reply. 

So my use case looks like this. 

In the top flow I have the same two columns but no data as it resulted in no exceptions and I get an error on ConnetionFile & query. 

The bottom flow works perfectly whenever I have 1 or multiple results in it. 

 

What is the best way to complete the workflow without error in this case?

2022-12-06_10-29-26.jpg

gelvira
7 - Meteor

Thanks! That's a good idea. Let me try and see if I can make it work. 

Labels