You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/02/15 19:46:50 UTC

[GitHub] john-bodley opened a new issue #4439: URL parameters not saved for a slice in explorer view

john-bodley opened a new issue #4439: URL parameters not saved for a slice in explorer view
URL: https://github.com/apache/incubator-superset/issues/4439
 
 
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if any
   - [x] I have reproduced the issue with at least the latest released version of superset
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar
   
   ### Superset version
   0.23.0dev
   
   ### Expected results
   Currently one can specify URL parameters in the explorer view, i.e., http://localhost:8000/superset/explore/table/6067/?my_param=foo&...
   which can then be leveraged inside a templated SQL via the [url_param](https://github.com/apache/incubator-superset/blob/master/superset/jinja_context.py#L31) Jinja2 function, i.e., 
   ```
   SELECT 
       ...
   FROM 
       ...
   WHERE 
       my_param = {{ url_param('my_param') }}  
   ```
   
   However when you save the explorer view as a slice the non form-data URL parameters are not stored in the `slices` table and thus `{{ url_param('my_param') }}` evaluates to `None`.
   
   I'm not certain how best to proceed here. It seems like a saved slice should support the same functionality as explorer view, though it's not apparent to me how this should best be achieved. Currently the `params` column in the `slices` table is simply the JSON encoded form data.
   
   ### Actual results
   See above.
   
   ### Steps to reproduce
   1. Add custom URL parameters in explorer view
   2. Save the slice and notice that the URL parameters are no longer present
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services