Skip to main content
Version: 2.3.7

Copy

Copy transform plugin

Description​

Copy a field to a new field.

Options​

nametyperequireddefault value
fieldsObjectyes

fields [config]​

Specify the field copy relationship between input and output

common options [string]​

Transform plugin common parameters, please refer to Transform Plugin for details

Example​

The data read from source is a table like this:

nameagecard
Joy Ding20123
May Ding20123
Kin Dom20123
Joy Dom20123

We want copy fields name、age to a new fields name1、name2、age1, we can add Copy Transform like this

transform {
Copy {
source_table_name = "fake"
result_table_name = "fake1"
fields {
name1 = name
name2 = name
age1 = age
}
}
}

Then the data in result table fake1 will like this

nameagecardname1name2age1
Joy Ding20123Joy DingJoy Ding20
May Ding20123May DingMay Ding20
Kin Dom20123Kin DomKin Dom20
Joy Dom20123Joy DomJoy Dom20

Changelog​

new version​

  • Add Copy Transform Connector
  • Support copy fields to a new fields