You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/09/10 21:04:29 UTC

[GitHub] [incubator-superset] betodealmeida opened a new pull request #8213: Better distinction between tables and views, and show CREATE VIEW

betodealmeida opened a new pull request #8213: Better distinction between tables and views, and show CREATE VIEW
URL: https://github.com/apache/incubator-superset/pull/8213
 
 
   ### CATEGORY
   
   Choose one
   
   - [ ] Bug Fix
   - [X] Enhancement (new features, refinement)
   - [ ] Refactor
   - [ ] Add tests
   - [ ] Build / Development Environment
   - [ ] Documentation
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   In SQL Lab, to distinguish between tables and views we prefix the latter with the string `[view]`, which looks ugly. I changed it to display a small icon representing the type — either a table for actual tables, or an eye for views.
   
   Additionally, we don't present any information on views. I added a link to show the actual `CREATE VIEW` statement that defines a given view.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   <img width="1698" alt="Screen Shot 2019-09-10 at 1 53 44 PM" src="https://user-images.githubusercontent.com/1534870/64650175-6d7d5000-d3d3-11e9-99b1-99e366ffaf63.png">
   <img width="1698" alt="Screen Shot 2019-09-10 at 1 54 03 PM" src="https://user-images.githubusercontent.com/1534870/64650180-70784080-d3d3-11e9-974b-48712a0a1000.png">
   <img width="1698" alt="Screen Shot 2019-09-10 at 1 54 09 PM" src="https://user-images.githubusercontent.com/1534870/64650185-72da9a80-d3d3-11e9-8e15-bc1236c40f76.png">
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   Currently most DB engine specs seem to return views as tables, due to limitations in the SQL Alchemy driver. Both Presto and SQLlite return no views, bundling the views with the actual tables. I had to mock the response from the engines to generate the screenshots.
   
   I'm planning to write a PR for Presto next, allowing views to be properly displayed. This might require changes upstream (to https://github.com/dropbox/PyHive), though it's possible to work around it in Superset only.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [X] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   ### REVIEWERS
   
   @mistercrunch @khtruong @etr2460 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org