Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Converting Worflow to SQL - not inDB

pmartin45
5 - Atom

Hi,

 

I'm trying to convert a workflow that starts off as "In-DB" but ends up being out of database to an SQL format so that we can ask our Data Warehouse team to implement into our SQ warehouse environment. Is there anyway to do this?

 

Apologies if this doubles up but the thread "Converting Worlflow to SQL" didnt answer the question for me.

 

 

2 REPLIES 2
Claje
14 - Magnetar

Hi,

 

If you use the Dynamic Output In-DB tool, it has an option to export your query alongside your results (or only output the query).


If you use this at the end of the In-DB flow, that will get you the current query.


Please note that while Alteryx does a pretty good job of building these queries, your Data Warehouse team may find room for improvement based on existing indexes/performance within your environment.

 

EDIT:

An example of this is below:
I used a "Connect In-DB" tool to select TOP 1 from TABLE, and then filtered on "FIELD IS NOT NULL".  Below is the generated query.

WITH "Tool1_8147" AS (SELECT TOP 1 * FROM TABLE) SELECT * FROM "Tool1_8147" WHERE "FIELD" IS NOT NULL


For readability and consistency, a more permanent query would probably look something like:

SELECT TOP 1 * FROM [TABLE] WHERE [FIELD] IS NOT NULL
aOreilly
5 - Atom

Is there another tool or macro for this type of conversion from Dynamic Output In-DB to SQL?

Labels