2 Replies Latest reply on Oct 14, 2018 9:56 AM by Ashwin Karnam

    Using Common Table Expression SQL in Redshift

    Ashwin Karnam



      I'm trying to create a Tableau Workbook connecting to Amazon Redshift, using a Custom SQL that has Common Table Expressions (CTEs). I don't think we can accomplish this just like we use standard SQL (select * from table_name) format as each Data Source has its own way to get this working (https://kb.tableau.com/articles/howto/using-common-table-expressions).


      Can someone point me in the right direction or provide the steps that I need to take to get a CTE working as a Custom SQL in Amazon Redshift? Can this be accomplished by not having to create Temporary session tables at all?