Alteryx designer Discussions

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

Run SQL Generated by Summarize

Highlighted
Meteoroid

new to alteryx.  i built a number of sql commands with the input tool and union all them using the summarize tool.  I now want to execute the sql that the summarize tool outputs.  what control should i pass the sql to to get it executed in DB?  Seems simple but i caonnot figure out which tool to use.  thanks

 

 

Highlighted
Alteryx
Alteryx

Hi @mjmebes

 

Are you using the in-database tools?

 

If you are using the In-database tools then it is already executing the SQL in the database. If you want to see the SQL code you can use the dynamic output in-db tool.

 

Best,

 

Jordan Barker

Solutions Consultant

Highlighted
Meteoroid

thanks.  we are using in-db, but doing some string creation using the concat function in the summarize tool to create a long sql string.

like:

select a,b from c

union all

select b,c from c

union all .....

the summarize tool spits out this long sql string, we then need to execute the sql and put the results in a table

Highlighted
Bolide
Bolide

You can use a dynamic input tool to modify a SQL query based on a field value. In this case, the concatenated field would be the value you pass through to replace a specific string in the SQL query.

 

Highlighted
Meteoroid

thanks.  i appreciate your patience being new to the tool.   i tried that but the dynamic input in - db is expecting a connection name field and only the string coming out of the summarize tool is available.  i feel i am close, i have the dynamic input feed a write data in - db to populate a table so all i need is to have a way to define the connection for the dynamic input

Labels