corrected get_schema_names in dialect.py to return the True databases… #83
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…/schemas in the system instead of just the username.
High level description of this Pull-request
I am puzzled about the behavior of get_schema_names in dialect.py. I was expecting it to retrieve all the schemas/databases in the system but instead of that only retrieves your username.
Because I am connecting teradata to Apache superset, I needed that get_schema_names gives back the databases/schemas for SQL Lab to display them. I changed the function to look at DBC.Databases2V and it works like a charm.
I submit my changes hoping to help the package to work better.
Related Issues
#82
Reviewers
CHECKLIST:
Make sure all items are marked when you submit the pull-request.
I wrote a docstring in the function, while there was none before. Not sure what else needs updating.
All tests fail even before my changes. I think my database is configured in a different way as the one that wrote the tests. For instance running test_dialects.py tries to write tests into a database with my username (the default database), but that's not writable in my database, I can only create Volatile tables there.
In the other hand this function is working for me when I use it in conjunction with Apache superset.
I am wondering now if the original function makes sense in the configuration of the user who wrote the tests but not for me and viceversa.
I am not sure how to proceed here. For sure start changing tests does not sound very good, maybe it's better that someone for whom the tests pass can verify that my function does not break anything. Please advise.
Look at the previous comment.
If you request so I would do.