Usually the custom SQL within Tableau will wrap the select and then will pass it directly to your database. Is it possible that you are using the wrong database driver? Can you see the SQL within the logs or within your database? Can you try copying / pasting the SQL into your database GUI, does it work here? Does it work without quotes?
What I mean by wrapping is that Tableau will nest the SQL such as:
select * from
Select Left(`Tbl_Customers`.`Name`, 1) as Initial
From `Databoe_Area.Databoe-bucket`.`Tbl_Customers` `Tbl_Customers`) TableauSQL
I'm connecting through Tableau Desktop to Google Big Query. I've previously been using the drag and drop functionality, but now I want to add some custom sql.
When I click Data>Convert to Custom SQL I don't get the wrapped "select * from (...)
How do I know which language this created in so I can read up on documentation to modify it?
you won't see the wrapper within the Tableau dialogue window, but if you look in the desktop log, you should be able to see the wrap there.
You can find the desktop log usually at the default location of: C:\Users\username\Documents\My Tableau Repository\Logs
1 of 1 people found this helpful
LEFT() function is a Legacy one.
Please use the SUBSTR() instead, like this:
Select SUBSTR(`Tbl_Customers`.`Name`, 1, 1) as Initial
From `Databoe_Area.Databoe-bucket`.`Tbl_Customers` `Tbl_Customers`
Hope it could help.
PS Here is a reference page from BigQuery help
regarding the differences between Standard and Legacy SQL: