Teradata / sqlalchemy-teradata

A SQLAlchemy dialect for Teradata
https://developer.teradata.com/tools/articles/teradata-sqlalchemy-introduction
MIT License
59 stars 21 forks source link

has_table does not check the existence of volatile tables #86

Open Similacrest opened 5 years ago

Similacrest commented 5 years ago
engine.execute('CREATE VOLATILE TABLE test(id BIGINT) UNIQUE PRIMARY INDEX (id) ON COMMIT PRESERVE ROWS;')

engine.has_table('test')

False

Maybe check

HELP VOLATILE TABLE

too?

sandan commented 5 years ago

@ShareDVI has_table currently looks at TableKinds in teradatasqlalchemy: O - non-partitioned tables T - partitioned tables V - views

The Teradata SQLEngine doesn't keep volatile tables in the data dictionary since it is non-persistent. Perhaps we can add a has_volatile_table to the dialect?

Also, be aware that teradatasqlalchemy will be succeeding sqlalchemy-teradata as the primary dialect. Any changes will be pushed to teradatasqlalchemy.