support `df.to_sql(catalog=name ...)`
Currently the only way I know to tell sqlalchemy-trino about trino catalog name is in the connection url.
That works pretty well but it would be conceptually cleaner to support df.to_sql(catalog=name, schema=name ...)
Hello @erikerlandson It's pandas, right?
Currently, df.to_sql has no catalog param, so there is no way to pass catalog to trino driver.
If you find a way to do this, feel free to create a PR.
Studying code, the sanest approach I can think of that might work is to modify the biz-logic in the TrinoDialect methods to attempt a split of schema on . and split into catalog_name.schema_name, then add WHERE catalog = catalog_name clauses to various methods.
In such an approach, there would be no separate catalog =, but you would specify schema=catalog.schema.
The only other approach that came to mind was monkey-patching df.to_sql, but looking at how sqlalchemy is architected I suspect that adding a concept of "catalog" might have to be plumbed through a lot of layers of code, and would end up back in TrinoDialect anyway.