2 of 2 people found this helpful
There are three-ish ways we can write custom SQL code in Tableau:
1) Initial SQL when setting up a connection (for example to make use of temp tables). This is only available when we create or edit a new connection to a supported data source.
2) Custom SQL when setting up a connection. This is only available when we create or edit a new connection to a supported data source.
3) Using the RAWSQL functions when writing calculations. This requires a live connection to a supported data source.
Currently for #1 and #2 the only Tableau product that supports creating or editing connections is Tableau Desktop, so you can't use Initial SQL or Custom SQL. Tableau is working on adding this to the product for web editing in Tableau Server or Tableau Online, their stated goal has been to add it by the end of 2017.
Thanks for your answer!
I'll look at RAWSQL functions. It'd be appreciated If you could share any good resources that I can refer to (if yo know any..).