ticktockhouse opened a new issue, #20131:
URL: https://github.com/apache/superset/issues/20131

   #### How to reproduce the bug
   
   Running superset in docker-compose, as per: 
https://github.com/apache/superset/blob/master/docker-compose-non-dev.yml
   
   Run this query against my DB with the `ENABLE_TEMPLATE_PROCESSING` feature 
flag set to true. The query is:
   
   ```
   select {{current_user_id()}} my_userid;
   ```
   
   NB: This syntax works on preset.io
   
   I have tried adding:
   ```
   FEATURE_FLAGS = { "ENABLE_TEMPLATE_PROCESSING": True, }
   ```
   in both 
`[superset_config.py](https://github.com/apache/superset/blob/master/docker/pythonpath_dev/superset_config.py)`
 and/or in `docker/pythonpath_dev/superset_config_docker.py`
   ### Expected results
   
   Query results
   
   ### Actual results
   
   I get this error:
   
   ```
   PostgreSQL Error
   
   Please check your query for syntax errors at or near "{". Then, try running 
your query again.
   
   This may be triggered by:
   Issue 1030 - The query has a syntax error. 
   ```
   Associated trace in log:
   ```
   superset_app            | Query 113: <class 'psycopg2.errors.SyntaxError'>
   superset_app            | Traceback (most recent call last):
   superset_app            |   File "/app/superset/sql_lab.py", line 273, in 
execute_sql_statement
   superset_app            |     db_engine_spec.execute(cursor, sql, 
async_=True)
   superset_app            |   File "/app/superset/db_engine_specs/base.py", 
line 1260, in execute
   superset_app            |     raise cls.get_dbapi_mapped_exception(ex)
   superset_app            |   File "/app/superset/db_engine_specs/base.py", 
line 1258, in execute
   superset_app            |     cursor.execute(query)
   superset_app            | psycopg2.errors.SyntaxError: syntax error at or 
near "{"
   superset_app            | LINE 1: select {{current_user_id()}} my_userid
   ```
   ### Environment
   
   (please complete the following information):
   
   - browser type and version:
   - superset version: 0.0.0dev (?)
   - python version: 3.8
   - node.js version: `node -v`
   - any feature flags active:
   
   Supposedly `ENABLE_TEMPLATE_PROCESSING`, but it seems like it isn't...
   
   


-- 
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.

To unsubscribe, e-mail: [email protected]

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