Open stmezzo opened 6 years ago
When I call get_view_definition method using the following:
from sqlalchemy import create_engine from sqlalchemy.engine import reflection
td_engine = create_engine('teradata://user:pass@host/container?driver=Teradata') insp = reflection.Inspector.from_engine(td_engine) insp.get_view_definition("MyViewName")
I get the error: <class 'tuple'>: ('HY000', "[Teradata][ODBC Teradata Driver][Teradata Database] 'MyViewName' is not a table. ", 3853)
I can reproduce. The query being executed is SHOW TABLE MyViewName, instead of SHOW VIEW MyViewName. Code is here
SHOW TABLE MyViewName
SHOW VIEW MyViewName
@stmezzo maybe you want to send a PR?
When I call get_view_definition method using the following:
from sqlalchemy import create_engine from sqlalchemy.engine import reflection
td_engine = create_engine('teradata://user:pass@host/container?driver=Teradata') insp = reflection.Inspector.from_engine(td_engine) insp.get_view_definition("MyViewName")
I get the error: <class 'tuple'>: ('HY000', "[Teradata][ODBC Teradata Driver][Teradata Database] 'MyViewName' is not a table. ", 3853)