Examples

Different configurations are allowed and make this component a very powerful tool. Following examples with different readers and writers configurations.

Jdbc to Jdbc

reader:
  type: jdbc
  scheduler_rate: -1
  url: jdbc:leanxcale://5eb1233755aea1792c45.lxc-db.com:1522/db
  user: APP
  password: APP
  driver: com.leanxcale.client.Driver

  tables:
    - name: JDBC_TO_JDBC_TEST
      query: select * from JDBC_TO_JDBC_TEST
      params: ##optional. list required when query has params
      #fields: #Optional. default copy all fields. specify a list here if you want just to copy some of them


writer:
  type: jdbc
  url: jdbc:leanxcale://localhost:1529/db
  user: APP
  password: APP
  driver: com.leanxcale.client.Driver
  batch: 10
  addNullWhenEmpty: false

  tables:
    - name: JDBC_TO_JDBC_TEST_OUT
      create: false
      #ddl: #optional. required when create is true

Json to Jdbc

reader:
type: json
tables:
- name: test
files: [src/test/resources/json/alltypes_sample.json, src/test/resources/json/alltypes_sample_2.json]

writer:
type: jdbc
url: jdbc:leanxcale://5eb1233755aea1792c45.lxc-db.com:1522/db
user: APP
password: APP
batch: 1
addNullWhenEmpty: true

tables:
- name: json_to_jdbc
create: true
ddl: "create table if not exists json_to_jdbc(
textField varchar(16),
booleanField boolean,
intField integer,
doubleField double,
arrayField bigint array,
nodeField varchar array)"

Csv to Trace with filter

reader:
type: csv
tables:
- name: filterTest
files: src/test/resources/Filter/CsvFilterToDummyTest/20221028.csv
properties:
separator: ','
header: True
filter:
- position : 2
operator : '>'
type : date
value : '2019-03-02'
format : "yyyy-MM-dd"

writer:
type: trace
tables:
- name: filterTest