sqlalchemy-teradata icon indicating copy to clipboard operation
sqlalchemy-teradata copied to clipboard

getting schema names

Open ofajardo opened this issue 6 years ago • 2 comments

hi

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. What is the intention or usefulness of doing that? 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. If there is interest I can submit a PR.

thanks

ofajardo avatar Feb 02 '19 14:02 ofajardo

A PR would be appreciated! I think there was confusion over which schemas to return.

sandan avatar Feb 11 '19 22:02 sandan

PR submitted (https://github.com/Teradata/sqlalchemy-teradata/pull/83) The tests do not look straightforward, I commented that point in the PR.

ofajardo avatar Feb 12 '19 14:02 ofajardo