Kettle Merge Record steps

Source: Internet
Author: User

Reprint: http://blog.itpub.net/post/37422/464323

This step is used to merge data from two different sources, both old data and new data, which match, compare, and merge the old and new data according to the specified keywords.

Parameters that need to be set:

Old data source: Steps for old data sources

New data sources. Steps for new data sources

Flag field: Sets the name of the Flag field, which is used to save the results of the comparison, with the following several results.

1. "Identical" – Same old data as new data

2. "Changed" – the data has changed;

3. "New" – records that have not been found in the old data

4. "Deleted" – records in old data that are not in the new data

Key field: Used to locate the same record in two data sources.

Compare fields: For the same record in two data sources, specify the fields that you want to compare.

The combined data will include all the data from the old data source and the new data source, replace the old data with the new data for the changed data, and use an indicator field in the results to specify the comparison results for the old and new data.

Attention:

Old data and new data need to be sorted in advance by key fields.

The old data and the new data have the same field name.

Example:

Old data:

Field1, Field2

1, 1

2, 2

3, 3

4, 4

New data

Field1, Field2

1, 1

2, 9

5, 5

Settings: Flag field is flag, key field is field1, comparison field is Field2

The merged data

Field1; Field2; Flag

1; 1; Identical

2; 9; Changed

3; 3; Deleted

4; 4; Deleted

5; 5; New

 

Kettle Merge Record steps

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.