QlikSense

SQL Temp tables in Qliksense

One of the dashboards I’ve created for my clients contains data from a massive query that populates SQL # temp tables and then reads from the result temp tables. My problem was how do I do this in Qliksense ? I don’t want to rewrite this query in the Qliksense language. I just basically want to take the query as is and use it as a datasource.

Online I couldn’t find much. But the solution was quite simple. So here goes.

The data in this example is going to seem a bit arb but it gets the point across and explains the concept well enough.

I’m using the Adventure Works Database.

Lets say for instance I have the following 2 #Temp tables

The Final Query returning the results will read from these 2 temp Tables as below (To be used as a data source for the dashboard).

That is the query I want in Qliksense. So lets go into Qliksense.

Open the Data Load Editor…

Simply add the following Code

And then at the last little snippet for the Datasource in Qliksense 9which will read from the 2 temp tables above)

Load the Data and you’ll see that the Data model Is populated with the #Temp Tables into a table FINAL_TABLE.

And you can pretty much take it from there. I’m sure this will be helpful when it comes to those QlikSense dashboards.

 

 

Author : James Botes

James Botes is a Cape Town Senior Business Analyst (CBAP) with a keen interest in Systems Thinking & Solving Business Problems. Founder and Creator of the site and you tube channel BASensei. Linkedin : https://www.linkedin.com/in/james-botes-73a63b67/

Leave a Reply

Your email address will not be published. Required fields are marked *

16 − 6 =