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.
SOLVED

Parameter feature to pass into SQL statement

chunh
5 - Atom

Im new to Alteryx and im trying to implement the following: 

1. Get today's month 

2. Pass 1. as param into SQL statement to filter records 

3. Other transformation after node 2. 

 

Is there any parameter function tools in Alteryx that could help for 1. and 2.?

4 REPLIES 4
abacon
12 - Quasar

@chunh Look into the dynamic input tool. You are able to create a sql query within it but use it to update the where clause based on the inputs. Use a formula tool before it to get todays month with the formula DateTimeMonth(DateTimeToday()) then pass it into the where clause in the dynamic input tool. 

chunh
5 - Atom

thanks a lot. Just curious for Input tool, since it requires an incoming connection. Is it a best practice to link it to an empty table in Alteryx just to be able to use get date? 

 

abacon
12 - Quasar

@chunh @You have 2 options with this -

  • use a text input tool and create a filler field that gets replaced with the formula tool mentioned in previous post.
  • you can use a generate rows tool to replace the formula tool (generate rows does not require an input), and have it generate 1 row with the current month. This option is a little trickier to configure but it would cut down on the tools on the canvas.

i would use the text input option as it’s simpler.

 

if this works for you, please mark as the solution so others may find it sooner.

apathetichell
20 - Arcturus

I do this via dynamic input in-db. that takes two terms:

1) your connection name

2) your query.

your query is  a string. you set that up in earlier tools using whatever parameters/syntax you want.

Labels
Top Solution Authors