Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Vikash938
Contributor III
Contributor III

How to access CTE table from PostgreSQL to Qlik data load editor?

I have one CTE (common expression table) table in PostgreSQl database. I want to access that CTE table in data load editor. how to do that?

Labels (3)
2 Replies
Levi_Turner
Employee
Employee

Make sure to enable non select queries on the data connection:

Levi_Turner_0-1756213131539.png

 

 

But here's a sample which you can use for reference:

LIB CONNECT TO 'PostgreSQL';
LOAD *;
SQL WITH cte1 (temp_var1, temp_var2) AS (
VALUES
(1,4),
(2,5),
(3,6)
)
SELECT
temp_var1
, temp_var2
, (temp_var1 + temp_var2) AS temp_var3
FROM cte1; 

 

Vikash938
Contributor III
Contributor III
Author

@Levi_Turner  can you little bit more? I didn't get it right now.