Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Tableau's Initial SQL equivavalent

manoj1551
5 - Atom

Hi - How can we use Tableau's initial SQL kind of functionality in Alteryx. Our data source is Google Big Query. Since Tableau does not have Initial SQL option for BigQuery data source, we are planning to utilize Alteryx to feed initial sql.  I tried providing the initial SQL in "PreSQL" of Alteryx and then main SQL in actual SQL. But it would not work.

 

Any pointers on how to achieve this would be appreciated.

7 REPLIES 7
AbhilashR
15 - Aurora
15 - Aurora

Hi @manoj1551, I have never worked with Google Big Query so this is guesswork - how about we use your pre-SQL within the regular Input tool and then pass its output into a Dynamic Input tool which will have your main query?

cmcclellan
13 - Pulsar

I've used GBQ with Tableau before, it works fine but what is the initial SQL that you're trying to do ?

 

What are you trying to do with GBQ before you use it - in Tableau or with Alteryx ?

manoj1551
5 - Atom

I'm trying to create multiple temp table on GBQ and use those temp tables to create custom SQL. If tableau had initial SQL in for GBQ, i could have given the create temp table part in initial sql and used main query in custom SQL. But tableau does not offer that feature for GBQ connections. 

 

So Im using alteryx to create temp tables and join those temp tables in custom SQL. the output will be published to Tableau server and I will used tableau desktop to connect to the data.

 

The issue is below query I'm not able to get it working in Alteryx while using Simba ODBC driver for GBQ

--------------------------------

CREATE TEMP TABLE FLOWS
( CLDR_EOM_DT DATE )
AS
SELECT CLDR_EOM_DT FROM project123.Dataset123.DateTable
;
select * from FLOWS;

--------------------------------

 

This same exact query works if I'm using Google Big Query input connector. But if I use same query in ODBC, the query does not work. unfortunately our company does not supports only ODBC and I have to get it working. 

manoj1551
5 - Atom

It is not working. I tried giving below code of Initial SQL in the input tool main query window, but it throws error as No columns returned

CREATE TEMP TABLE FLOWS
( CLDR_EOM_DT DATE )
AS
SELECT CLDR_EOM_DT FROM project123.Dataset123.DateTable
;

danilang
19 - Altair
19 - Altair

Hi @manoj1551 

 

Instead of creating a temp table and then selecting from that, just include the main query as your input SQL.  

 

SELECT CLDR_EOM_DT FROM project123.Dataset123.DateTable

 

Dan

 

RameshS
5 - Atom

Is there any work around to accomplish this one. Where you can create the temp table in bigquery through the presql in alteryx?

 

RameshS
5 - Atom

Is there any work around to accomplish this one. Where you can create the temp table in big

Labels
Top Solution Authors