0
votes

I am creating a Tableau report and my backend database is snowflake. I have a parameter which has a string value and Table by defaults wraps it in single qoutes. I need to send this value as where clause to snowflake sql.

Ex : from tableau the string is 'diabetes = 1 or smoking = 1' and query generated for snowflake is as follows

select * from table
where 'diabetes = 1 or smoking = 1'

But I need

select * from table
where diabetes = 1 or smoking = 1

Please help

1

1 Answers

0
votes

My advice from a Snowflake perspective is removing the single quotes within Tableau by using a REPLACE-function or something similar.

Reason: The query is executed directly on Snowflake. It's not passed as a string which can be modified/replaced/etc. before execution (as far as I know).

Kind regards :-)