Rekha, we are having precisely the same issue, including the user requirement that we include a calendar control. We could find our way around it if we could make a dynamic String parameter that could convert the date value to a string before placing it into the custom SQL, but that also isn't something that Tableau supports.
I don't have an answer for you, but I very much want to keep up with this conversation, and I will update here with anything I am able to find out. Thanks!
Rekha, following up on this issue. My colleague and I took a look at the logs on both Tableau and HANA, and we have at least figured out the reason for the error. When Tableau embeds a parameter in a custom SQL query to be sent to HANA, if that parameter is a Date data type, Tableau puts a TO_DATE() function call around the parameter value, like this:
'PLACEHOLDER' = ('$$IP_DATE_TO$$', TO_DATE('2016-01-31'))
HANA will not accept any function calls within the PLACEHOLDER statement, so it throws an error and does not run the query.
When the date value is sent as a String instead of as a Date type, the TO_DATE() function call is not inserted, so HANA accepts the query and runs it. But that means that we can't use a calendar picker to set the date value, which is a requirement for both of our projects.
As we've said before, our problems would be solved by dynamic parameters -- even if those parameters could be set just based on values of other parameters.
Other than better knowledge of the problem, no progress so far. I will update if we figure anything else out.
Thanks Brian for the information !!
I also thought the same workaround to use dynamic parameters based on value of other parameter. But tableau doesn't support even that.
For the time being what I am doing..
In the custom SQL, I have hardcoded the HANA date range parameters with some large range so that entire data is retrieved from HANA.
I have created data parameters in worksheet and applied quick filter (calculated field using date parameter)on the data view .but this approach will impact performance .
Please keep me posted if you find any solution.
1 of 1 people found this helpful
This syntax does not work, it will generate an error as you mentioned above...
('PLACEHOLDER' = ('$$AsofDate$$',Parameters.MyDate>))
But if I use the dot notation syntax for PLACEHOLDER as per snippet below, it works for me.
(PLACEHOLDER."$$AsofDate$$" => <Parameters.MyDate>)