Closed olp966220 closed 6 months ago
trino_catalog
like:
table_with_catalog = Table(
'nation',
metadata,
Column('nationkey', Integer),
schema='tiny',
trino_catalog='tpch',
)
- Get Metadata, you need to connect to specific catalog in order to get all tables from, because it executes https://github.com/trinodb/trino-python-client/blob/master/trino/sqlalchemy/dialect.py#L228-L235 so it's not supported at the moment.
- Get Table, you can use
trino_catalog
like:table_with_catalog = Table( 'nation', metadata, Column('nationkey', Integer), schema='tiny', trino_catalog='tpch', )
It works ! Thx hovaesco !
Describe the feature
I use url : trino://username>:<password>@<host: to create engine and execute sql like 'SELECT * FROM catalog.shema.table', and it worked.
But when I try to use this url to do ORM operation, it can't get metadata or tables, for example:
But I also want to operate different ORM from different catalogs but use same engine, so I can operate like this:
Describe alternatives you've considered
No response
Are you willing to submit PR?