villebro opened a new pull request #10816:
URL: https://github.com/apache/incubator-superset/pull/10816


   ### SUMMARY
   Currently virtual datasources (=SQL queries) are required to consist of 
columns that start with a non-numeric character. This is unnecessary, as the 
majority of databases support special characters, as long as they are quoted. 
For instance, querying the example dataset `birth_france_by_region` produces an 
error due to the numeric columns 2003-2014, despite the datasource working just 
fine.
   
   This PR relaxes the column name restrictions to only two rules:
   - `__timestamp` is reserved for the temporal column
   - anything ending in `__\d`, e.g. `my_col__1`, as that pattern is used to 
deduplicate duplicated columns. 
   
   ### BEFORE
   Trying to use `SELECT * FROM birth_france_by_region` as a datasource:
   
![image](https://user-images.githubusercontent.com/33317356/92594490-8309ac00-f2ab-11ea-913c-4144999fef4a.png)
   
   ### AFTER
   Nema problema!
   
![image](https://user-images.githubusercontent.com/33317356/92594314-48077880-f2ab-11ea-89e4-42d1ce967f39.png)
   
   ### TEST PLAN
   Adjusted existing unit test
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


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



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

Reply via email to