Skip to content

How do I use multiple connectors for create_engine ?  #168

@gwthm-in

Description

@gwthm-in

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions