Skip to main content
Solved

Comparing two fields based on a string match

  • July 31, 2016
  • 1 reply
  • 319 views

Forum|alt.badge.img

Hello All, I have two tables like below. I want to know the difference (add, delete, unchanged) of the TractID field between these two tables. For instance, i want to have a output showing

unchanged: 1001, 1003

added: 1002, 1004, 1005

deleted: 1009

I didn't see the ChangeDetector transformer is able to compare two fields based on a string match. How to achieve this? I appreciate your help!

Table 1 (old):

IDTractID101001111003121009

Table 2 (new):

UniqueIDTractID1100121002,1003,100431005,1006

Best answer by takashi

Hi @fmenewbie, the ChangeDetector can compare entire string match, but cannot detect partial matching. Split TractID of the table 2 into individual id values using the AttributeSplitter and explode the records on the resulting list using the ListExploder. You can then compare individual TractID using the ChangeDetector.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

takashi
Celebrity
  • Best Answer
  • July 31, 2016

Hi @fmenewbie, the ChangeDetector can compare entire string match, but cannot detect partial matching. Split TractID of the table 2 into individual id values using the AttributeSplitter and explode the records on the resulting list using the ListExploder. You can then compare individual TractID using the ChangeDetector.