john-bodley opened a new pull request #9173: [fix] SQL query source URL: https://github.com/apache/incubator-superset/pull/9173 ### CATEGORY Choose one - [ ] Bug Fix - [x] Enhancement (new features, refinement) - [ ] Refactor - [ ] Add tests - [ ] Build / Development Environment - [ ] Documentation ### SUMMARY This PR makes a couple of updates to the encoding of the query source for SQL queries: 1. Uses an enum as opposed to a string to int dictionary mapping. 2. Moves the referrer logic (used for determining dashboard and chart queries) from `get_df` to `get_sqla_engine`. The reason for the later was there were a number of places where `get_sqla_engine` were being called without a source and it felt that this would be a better place to add the fallback logic if the source wasn't explicitly defined. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> ### TEST PLAN CI and tested locally. ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] 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 ### REVIEWERS
---------------------------------------------------------------- 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] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
