dropbox / dropbox/PyHive

How do I use multiple connectors for create_engine ?

Open
#168 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
1.7k
Forks
545
PR merge metrics
No merged PRs in 30d

Description

I have defined tables like the general way in sqlalchemy.

Problem is I have few tables in one connector and other tables in another connectors.

Is it possible to use multiple connectors in single instance of create engine?

class VMarg(object): __table_args__ ={'schema': 'backend'}

class Users(VMarg, Base): __tablename__ = 'users'

Schema/Database backend is in one MySQL instance which defined in connector vmarg.
The same way orders is defined. And Orders is available under orders connector.

If I don't defined connector in connection string, by default it is taking hive and is continuing to operate under hive.

How can we define different connectors in single create engine ?

If I have to simplify things, I'm just trying to query different databases which can be connected using different catalogs (for the same I have to map them in sqlalchemy).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.