Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Data Stream Out error when using 'WITH STATEMENT' in SQL (Connect In-DB works fine)

Qing526
5 - Atom

I have 25 rows of unioned data, everyone of them has the same statement of for example 'where order_date < curdate()', but each of them has some other different 'where' statements. So what I tried to do is use the 'WITH' statement to make it as 'with t1 as (select * from database where order_date < curdate())', to avoid having 25 times of  'where order_date < curdate()'. 

But the problem is the codes works fine in the SQL tools, but when putting the codes to Alteryx, it shows an error of 'Error SQLPrepare: object "the code I used" not found'. The query builder in the Connect In-DB tool works fine and says connection successful and no errors found when parsing the queries. Just there is error with the Data Stream Out tool. Does anyone know the reasons and how that can be fixed? Thanks a lot in advance! 

Qing526_0-1638202989629.png

 

2 REPLIES 2
Matthew
11 - Bolide

i dont know if there's a solution to this, but if so, i would like to know what it is

the in-DB connection tool doesnt seem to like queries that are built from temp tables, even if the final output is just one table

at the moment, the only solution i know of is to make each of your temp tables a separate query in alteryx, then do your joining using alteryx tools

nrazafindrabe
5 - Atom

Any updates or solutions on this since then? 

I'm facing the same issue.

I know making each subquery in a separate in-db connection is a workaround but it's a lot of extra works for my case.

 

Labels
Top Solution Authors