We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

SQL Query as input

Tune
6 - Meteoroid

 Hello,

 

Can you please guide me how can I run an SQL script after getting the specific parameter using the filter tools below.

 

ex.

 

IF [Business Day] = 1  (Run SQL Script 1) and so on

IF [Business Day] = 8  (Run SQL Script 1) and so on

IF [Business Day] = 13  (Run SQL Script 1) and so on

 

I tried to use dynamic tool connected to filter tool but it has an error but If i run the settings to the input tool it will work fine. I attached the 3 filter tool that im using

8 REPLIES 8
KGT
13 - Pulsar

Where do you want to run the script, and where do you want the output...

 

Your options to execute an SQL script are either:

  • Input Tool
  • Dynamic Input
  • Batch Macro acting on an Input Tool
  • In-DB Stream in
  • Run Command
  • Python/R Tool 

There's many ways to do it, depending on the actual use case. If you mean that you want to just use an sql script on the data processing in Alteryx as opposed to data somewhere in a DB, then that would be an issue and although possible, isn't ideal.

apathetichell
20 - Arcturus

@KGTis using

  • In-DB Stream in

as the recognized shorthand for the otherwise unwieldy dynamic input in-db --- which sounds silly - but is totally awesome.

 

Tune
6 - Meteoroid

Im want to use a dynamic tool but when I connect it to a filter tool to check parameters it pops an error

Tune
6 - Meteoroid

I want to use a Dynamic input tool after parameters inside the 3 filter tool is met. Also I want an output of the data in excel can you give me an example of it?

apathetichell
20 - Arcturus

I do not know what you are asking. I'm recommending dynamic input in-db --- not dynamic input. Are you looking to choose between 3 different filters - pass a value into a filter or throw different language into a SQL where clause as a filter?

 

 

 

 Also I want an output of the data in excel can you give me an example of it? --- what does this mean? Why would someone give you an explanation of it?

Tune
6 - Meteoroid

Yeah I'm looking to check business days number's to 3 filters then I want to run different query when the condition is met. Right now I'm confuse how can I connect the DB tool since there no input on it or Do I need to change my approach to it. I attach a visual of what I'm trying to do. I try the regular input tool its working then I try the dynamic but it throws an eerror to me i dont know if its because i put it right after the filter tool. Also try to activate the AMP to use the Control Container but it seems that it create an empty output even the filter is false.

Tune
6 - Meteoroid

Regarding the output in excel it the result of the SQL query in a table

KGT
13 - Pulsar

Mate, you're going to have to have a crack at a workflow and post where you are. There are so many unknowns in this. If you are trying to execute an SQL query, then the data is still in a db somewhere. Is it in one DB, or multiple? Are the SQL queries all acting on the same DB? What data are you doing the Business Days filter on?

 

I'll say again, but clearer in case it's the case, so that we don't rabbit hole. If this is the case where data is being connected to, then a filter executed, and then you want to run an SQL script on the data going through the workflow, then the whole question needs to be addressed, as that's not how it works. If that's not the case, then please ignore, but I want to make sure that we're not spending time on that.

Labels
Top Solution Authors