Skip to content

HANA Writer

HANA Writer plugin implements the functionality of writing data to SAP HANA destination tables.

Example

Assume the HANA table to be written has the following DDL statement:

create table system.addax_tbl ( col1 varchar(200) , col2 int(4), col3 date, col4 boolean, col5 clob );

Here we use data generated from memory to import into HANA.

json
{
  "job": {
    "setting": {
      "speed": {
        "channel": 1,
        "bytes": -1
      }
    },
    "content": {
      "reader": {
        "name": "streamreader",
        "parameter": {
          "column": [
            {
              "value": "Addax",
              "type": "string"
            },
            {
              "value": 19880808,
              "type": "long"
            },
            {
              "value": "1988-08-08 08:08:08",
              "type": "date"
            },
            {
              "value": true,
              "type": "bool"
            },
            {
              "value": "test",
              "type": "bytes"
            }
          ],
          "sliceRecordCount": 1000
        }
      },
      "writer": {
        "name": "hanawriter",
        "parameter": {
          "username": "system",
          "password": "HXEHana1",
          "column": [
            "*"
          ],
          "connection": {
            "jdbcUrl": "jdbc:sap://wgzhao-pc:39017/system",
            "table": [
              "addax_tbl"
            ]
          }
        }
      }
    }
  }
}

Save the above configuration file as job/hana2stream.json

Execute Collection Command

Execute the following command for data collection

bash
bin/addax.sh job/hana2stream.json

Parameters

This plugin is based on RDBMS Writer, so you can refer to all configuration items of RDBMS Writer.