lilila opened a new issue #12487:
URL: https://github.com/apache/superset/issues/12487


   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: 
   
   <img width="945" alt="Screenshot 2021-01-13 at 08 09 06" 
src="https://user-images.githubusercontent.com/607430/104418038-9e950400-5576-11eb-90dd-c677fb3a26ce.png";>
   
   I receive the following error: 
   `Expecting property name enclosed in double quotes: line 1 column 2 (char 
1)` 
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to