IBM Db2

target-db2 (infostrux variant)

Singer Target for IBM Db2

The target-db2 loader sends data into IBM Db2 after it was pulled from a source using an extractor

Getting Started

Prerequisites

If you haven't already, follow the initial steps of the Getting Started guide:

  1. Install Meltano
  2. Create your Meltano project

Installation and configuration

  1. Add the target-db2 loader to your project using
    meltano add
    :
  2. meltano add loader target-db2
  3. Configure the target-db2 settings using
    meltano config
    :
  4. meltano config target-db2 set --interactive

Next steps

If you run into any issues, learn how to get help.

Capabilities

The current capabilities for target-db2 may have been automatically set when originally added to the Hub. Please review the capabilities when using this loader. If you find they are out of date, please consider updating them by making a pull request to the YAML file that defines the capabilities for this loader.

This plugin has the following capabilities:

  • about
  • schema-flattening
  • stream-maps

You can override these capabilities or specify additional ones in your meltano.yml by adding the capabilities key.

Settings

The target-db2 settings that are known to Meltano are documented below. To quickly find the setting you're looking for, click on any setting name from the list:

You can also list these settings using

meltano config
with the list subcommand:

meltano config target-db2 list

You can override these settings or specify additional ones in your meltano.yml by adding the settings key.

Please consider adding any settings you have defined locally to this definition on MeltanoHub by making a pull request to the YAML file that defines the settings for this plugin.

Batch Size Rows (batch_size_rows)

  • Environment variable: TARGET_DB2_BATCH_SIZE_ROWS

Maximum number of rows in each batch.


Configure this setting directly using the following Meltano command:

meltano config target-db2 set batch_size_rows [value]

Database (database)

  • Environment variable: TARGET_DB2_DATABASE

IBM Db2 Database Name


Configure this setting directly using the following Meltano command:

meltano config target-db2 set database [value]

Host (host)

  • Environment variable: TARGET_DB2_HOST

IBM Db2 Database Host


Configure this setting directly using the following Meltano command:

meltano config target-db2 set host [value]

Password (password)

  • Environment variable: TARGET_DB2_PASSWORD

IBM Db2 Database User Password


Configure this setting directly using the following Meltano command:

meltano config target-db2 set password [value]

Port (port)

  • Environment variable: TARGET_DB2_PORT

IBM Db2 Database Port


Configure this setting directly using the following Meltano command:

meltano config target-db2 set port [value]

User (user)

  • Environment variable: TARGET_DB2_USER

IBM Db2 Database User Name


Configure this setting directly using the following Meltano command:

meltano config target-db2 set user [value]

Varchar Size (varchar_size)

  • Environment variable: TARGET_DB2_VARCHAR_SIZE

Field size for Varchar type. Default 10000. Since JSON values are serialized to varchar, it may be necessary to increase this value. Max possible value 32764


Configure this setting directly using the following Meltano command:

meltano config target-db2 set varchar_size [value]
Expand To Show SDK Settings

Add Record Metadata (add_record_metadata)

  • Environment variable: TARGET_DB2_ADD_RECORD_METADATA

Add metadata to records.


Configure this setting directly using the following Meltano command:

meltano config target-db2 set add_record_metadata [value]

Faker Config Locale (faker_config.locale)

  • Environment variable: TARGET_DB2_FAKER_CONFIG_LOCALE

One or more LCID locale strings to produce localized output for: https://faker.readthedocs.io/en/master/#localization


Configure this setting directly using the following Meltano command:

meltano config target-db2 set faker_config locale [value]

Faker Config Seed (faker_config.seed)

  • Environment variable: TARGET_DB2_FAKER_CONFIG_SEED

Value to seed the Faker generator for deterministic output: https://faker.readthedocs.io/en/master/#seeding-the-generator


Configure this setting directly using the following Meltano command:

meltano config target-db2 set faker_config seed [value]

Flattening Enabled (flattening_enabled)

  • Environment variable: TARGET_DB2_FLATTENING_ENABLED

'True' to enable schema flattening and automatically expand nested properties.


Configure this setting directly using the following Meltano command:

meltano config target-db2 set flattening_enabled [value]

Flattening Max Depth (flattening_max_depth)

  • Environment variable: TARGET_DB2_FLATTENING_MAX_DEPTH

The max depth to flatten schemas.


Configure this setting directly using the following Meltano command:

meltano config target-db2 set flattening_max_depth [value]

Load Method (load_method)

  • Environment variable: TARGET_DB2_LOAD_METHOD
  • Default Value: append-only

The method to use when loading data into the destination. append-only will always write all input records whether that records already exists or not. upsert will update existing records and insert new records. overwrite will delete all existing records and insert all input records.


Configure this setting directly using the following Meltano command:

meltano config target-db2 set load_method [value]

Stream Map Config (stream_map_config)

  • Environment variable: TARGET_DB2_STREAM_MAP_CONFIG

User-defined config values to be used within map expressions.


Configure this setting directly using the following Meltano command:

meltano config target-db2 set stream_map_config [value]

Stream Maps (stream_maps)

  • Environment variable: TARGET_DB2_STREAM_MAPS

Config object for stream maps capability. For more information check out Stream Maps.


Configure this setting directly using the following Meltano command:

meltano config target-db2 set stream_maps [value]

Validate Records (validate_records)

  • Environment variable: TARGET_DB2_VALIDATE_RECORDS
  • Default Value: true

Whether to validate the schema of the incoming streams.


Configure this setting directly using the following Meltano command:

meltano config target-db2 set validate_records [value]

Something missing?

This page is generated from a YAML file that you can contribute changes to.

Edit it on GitHub!

Looking for help?

If you're having trouble getting the target-db2 loader to work, look for an existing issue in its repository, file a new issue, or join the Meltano Slack community and ask for help in the
#plugins-general
channel.

Install

meltano add loader target-db2

Maintenance Status

  • Maintenance Status
  • Built with the Meltano SDK

Repo

https://github.com/Infostrux-Solutions/target-db2
  • Stars
  • Forks
  • Last Commit Date
  • Open Issues
  • Open PRs
  • Contributors
  • License

Maintainer

  • Infostrux Solutions

Meltano Stats

  • Projects (Last 3 Months)

PyPI Stats

  • PyPI Downloads
  • PyPI Package Version

Keywords

  • meltano_sdk