smarzola / sqlalchemy-mongobi

MongoDB connector for BI SQLAlchemy Dialect

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sqlalchemy-mongobi

MongoDB connector for BI SQLAlchemy dialect.

image

image

MongoDB connector for BI does not have support for transactions but SQLAlchemy DBAPI layer uses ROLLBACKs after the connection initialization even if the connection pool is configured with reset_on_return=False. This dialect ignores COMMITs and ROLLBACKs, and uses the NullPool connection pool (which means no pooling, opens and closes the underlying DB-API connection per each connection open/close).

Usage

The DSN format is similar to that of mysql:

engine = create_engine(
    "mongobi://user?source=auth_db:password@url:port/database",
    connect_args={
        "ssl": {
            "mode": "PREFERRED"
        }
    },
    pool_reset_on_return=False,
)

DBAPI Support

The following DBAPI options are available:

  • mysqlclient:

    mongobi+mysqldb://user?source=auth_db:password@url:port/database
  • PyMySQL:

    mongobi+pymysql://user?source=auth_db:password@url:port/database

About

MongoDB connector for BI SQLAlchemy Dialect

License:MIT License


Languages

Language:Python 66.4%Language:Makefile 33.6%