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/05/04 07:00:49 UTC

[GitHub] [incubator-superset] villebro opened a new pull request #7453: [WIP] Refine table name handling in SQL Lab

villebro opened a new pull request #7453: [WIP] Refine table name handling in SQL Lab
URL: https://github.com/apache/incubator-superset/pull/7453
 
 
   ### CATEGORY
   
   - [x] Bug Fix
   - [x] Enhancement (new features, refinement)
   - [x] Refactor
   - [x] Add tests
   - [ ] Build / Development Environment
   - [x] Documentation
   
   ### SUMMARY
   Currently table names are assumed to follow the following convention:
   - `schema.table`
   - `table`
   To make the problem worse, there is no standardized way for SQLAlchemy inspectors to return table names, as they can be of either format. Since some databases (at least Apache Drill and Postgres) support periods in schema and table names, this causes problems when querying tables. This PR moves this logic from the frontend to the backend, and makes it possible to configure this behavior per engine.
   
   This changes the SQL Lab UI in the following way:
   - If no schema is selected, table/view names are displayed in the form `schema.table`.
   - If a schema is selected, tables are shown as `table` only.
   Filtering also supports this, i.e. when no schema is chosen, the filter substring makes the comparison assuming that the table name is `schema.table`, making it possible to include the schema name in the filter string.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   To be added later
   
   ### TEST PLAN
   Unit tests to be added later.
   
   ### 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.
   - [x] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   ### REVIEWERS
   @cgivre - This his not finished yet, but feel free to give feedback and test locally.

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