Table Of Contents

jdbc.iov2.steps.CreateTable

Parameters

class jdbc.iov2.steps.builtin.CreateTable(*args, **kwargs)[source]

Bases: mitto.iov2.steps.builtin.CreateTable

Create a database table using SDL from a JDBC input.

This class behaves identically to and can be interchanged with mitto.iov2.steps.builtin.CreateTable, with one exception:

This step should be used instead of mitto.iov2.steps.builtin.CreateTable when the inputter used by the job is jdbc.iov2.input.Input and the types of the output columns are to be based on the types returned by the JDBC query.

In general, the output columns types are determined in the following manner:

  1. If reflect_sdl is True, the SDL used by will be built from the JDBC cursor created when the query was executed.

  2. If reflect_sdl is False or None, the SDL used to create output columns is determined in the following order:

    1. If SDL is present in the environment, it will be used.

    2. If SDL is not present in the environment, types will be learned from the data by Mitto’s sampling facility.

Parameters

all – See the base class above for documentation on parameters.

Examples

Examples of using CreateTable as a step in a Mitto job configuration.

Example One – default values
"steps": [
   ...
   {
       "use": "jdbc.iov2.steps.CreateTable"
   },
   ...
]
Example Two – override default values
"steps": [
   ...
   {
       "use": "jdbc.iov2.steps.CreateTable",
       "max_varchar_length": 16384,
       "batch_size": 10000
   },
   ...
]