Closed
Description
Queries using Jinja variables are not working anymore in Superset 1.0 rc1.
For instance I have a dataset defined as follows :
{% set title_target = ' "' + filter_values("title_target", 'Joker')[0] + '" ' %}
{% set title_type = 'title' %}
{% if filter_values('title_target_original')|length > 0 %}
{% set title_target = ' "' + filter_values("title_target_original", 'Joker')[0] + '" ' %}
{% set title_type = 'title_original' %}
{% endif %}
SELECT {{title_target}} AS title_to_display
I use to work well but now I receive the following error:
Error: (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'%\n set title_target = \' "\' + filter_values("title_target", \'Joker\')[0] + \'" \' \' at line 4')
If I move the Jinja parameters in the "template parameters" section:
I receive the following error:
Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
Activity