jeffreythewang opened a new pull request #4941: Add separate limit setting for 
SqlLab
URL: https://github.com/apache/incubator-superset/pull/4941
 
 
   # Summary
   * Add functionality to wrap SQL Lab queries with a limit
   
   ## Description
   A common problem people have is that they input a query in SqlLab to preview 
their data before hitting visualize to create a table, and then it takes 
forever to run. This can be a pain (on them and potentially on the database).
   
   Currently one workaround is to manually enter a limit in the query editor, 
visualizing (which creates the datasource), and then later removing it from the 
base query (by editing the created datasource). With this in mind, an 
additional/alternative solution might be to allow users to edit the sub-query 
in the visualize modal before creating their datasource.
   
   So here's a way to have a limit only in the context of SQL editor. The limit 
is only applied as a wrapper for select queries, and not saved in any 
persistent database.
   
   ## Examples
   <img width="563" alt="screen shot 2018-04-05 at 6 48 03 pm" 
src="https://user-images.githubusercontent.com/3317634/39711863-035f61c0-51ef-11e8-9665-d4fe347110ad.png";>
   <img width="792" alt="screen shot 2018-04-05 at 6 47 51 pm" 
src="https://user-images.githubusercontent.com/3317634/39711867-057f13c4-51ef-11e8-92c5-81ad75acfa11.png";>
   <img width="343" alt="screen shot 2018-04-05 at 6 48 28 pm" 
src="https://user-images.githubusercontent.com/3317634/39711869-099ec134-51ef-11e8-816a-54e0413082c1.png";>
   <img width="264" alt="screen shot 2018-04-09 at 4 21 44 pm" 
src="https://user-images.githubusercontent.com/3317634/39711871-0be91d40-51ef-11e8-84ee-63f4db0c0871.png";>
   
   ## Related PR
   https://github.com/apache/incubator-superset/pull/4834 - I like this idea, 
but not sure if every database supports prefetching. If going with this route, 
I'd have a configurable page size.
   
   ## Related Issues
   https://github.com/apache/incubator-superset/issues/4588
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to