Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: ltollesonIt seems the difference in your data is that the Department ID in the Reference Data has leading zero's. You need for both sets of data to be similar format before you can compare the sets.
There are two ways that you can solve this issue.
1) Add leading zeros's to the Source data using the pad() function. The pad() function will add characters to a string to make it the desired length. By default it will pad zero's to the left. The code would look like this.
newSource = source.pad(10)
emit newSource
2) Convert both the Source and Reference data fields to long integers. This will remove all leading zeros from both sets of data. You can do this by either adding a filter node to each data stream and convert both Department ID fields to a long() OR you can simply apply the long() function to the field names when you use them as the key in your x-ref or lookup nodes.
See attachment for example...
Enjoy,
Larry
Attachments:
CompareDeptID.brg