Skip to main content
Version: 2.3.2

FieldMapper

FieldMapper transform plugin

Description​

Add input schema and output schema mapping.

Options​

nametyperequireddefault value
field_mapperObjectyes

field_mapper [config]​

Specify the field mapping relationship between input and output

common options [config]​

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

Example​

The data read from source is a table like this:

idnameagecard
1Joy Ding20123
2May Ding20123
3Kin Dom20123
4Joy Dom20123

We want to delete age field and update the filed order to id, card, name and rename name to new_name. We can add FieldMapper transform like this

transform {
FieldMapper {
source_table_name = "fake"
result_table_name = "fake1"
field_mapper = {
id = id
card = card
name = new_name
}
}
}

Then the data in result table fake1 will like this

idcardnew_name
1123Joy Ding
2123May Ding
3123Kin Dom
4123Joy Dom

Changelog​

new version​

  • Add Copy Transform Connector