Class - mitto.iov2.types.EngineKwArgs

JSON Schema

EngineKwArgs

Runner uses SQLAlchemy to interact with databases. Runner calls sqlalchemy.create_engine to establish a connection with the specified database. create_engine accepts a very large number of parameters that can be used to modify database engine behavior. You can provide parameters to create_engine via the engine_kwargs parameter of the job’s output step.

Example usage:

output: {
    use: call:mitto.iov2.db#todb
    dbo: postgresql://mitto:1234@db/analytics
    schema: example_schema
    tablename: example_table
    engine_kwargs: {
        echo: true
        echo_pool: debug
        pool_pre_ping: false
        execution_options: {
            max_row_buffer: 5000
        }
    }
}
output: {
    use: call:mitto.iov2.db#todb
    dbo: mssql+pyodbc://user:pass!@warehouse\mssqlserver08/somedb?driver=ODBC+Driver+17+for+SQL+Server&UseFMTONLY=Yes
    schema: example_schema
    tablename: example_table
    engine_kwargs: {
        fast_executemany: false
        query_params: {
            fast_executemany: false
        }
    }
}

Refer to the sqlalchemy.create_engine documentation for a list of all possible parameters. Common create_engine parameters are listed here as a convenience.

Note

engine_kwargs accepts any valid create_engine parameter, even if it is not shown here. Be aware that some parameters require values which can’t be provided in a Runner job configuration. For example, the value of creator must be a Python callable, which can’t be specified in a job’s configuration.

Warning

This is an advanced job configuration parameter intended for use only by those with a strong knowledge of both SQLAlchemy and Runner internals.

type

object

properties

  • echo

Echo

type

boolean

  • echo_pool

Echo Pool

type

boolean

  • execution_options

Execution Options

Dictionary of execution options that will be applied to all connections. These will be provided as parameters when Connection.execution_options() is called. Refer to the documentation for a list of supported parameters.

type

object

examples

{“max_row_buffer”: 5000}

  • query_params

Query Params

Additional parameters used only with MS SQLServer.

examples

{“fast_excutemany”: true}

allOf

SQLServerQueryParameters

  • hide_parameters

Hide Parameters

type

boolean

  • isolation_level

Isolation Level

type

string

  • label_length

Label Length

type

integer

  • logging_name

Logging Name

type

string

  • max_identifier_length

Max Identifier Length

type

integer

  • max_overflow

Max Overflow

type

integer

  • param_style

Param Style

type

string

  • pool_logging_name

Pool Logging Name

type

string

  • pool_pre_ping

Pool Pre Ping

NOTE: In some cases, this may be overridden by Runner.

type

boolean

  • pool_size

Pool Size

type

integer

  • pool_recycle

Pool Recycle

type

integer

  • pool_timeout

Pool Timeout

type

integer

  • pool_use_lifo

Pool Use Lifo

type

boolean

  • query_cache_size

Query Cache Size

type

integer

definitions

  • SQLServerQueryParameters

SQLServerQueryParameters

Cursor parameters for MS SQLServer.

NOTE: This is only used with MS SQLServer.

This value is passed to cursor.fast_executemany. This value should match the value of engine_kwargs.fast_executemany present in the same output section.

type

object

properties

  • fast_executemany

Fast Executemany

Used to set fast_executemany on the cursor before execution.

type

boolean

JSON Schema Definitions

#/definitions/SQLServerQueryParameters

SQLServerQueryParameters

Cursor parameters for MS SQLServer.

NOTE: This is only used with MS SQLServer.

This value is passed to cursor.fast_executemany. This value should match the value of engine_kwargs.fast_executemany present in the same output section.

type

object

properties

  • fast_executemany

Fast Executemany

Used to set fast_executemany on the cursor before execution.

type

boolean