tReplaceList Usage Problem

One Star

tReplaceList Usage Problem

I'm using Talend Studio 4.0.0M3 with Activestate Perl on Windows7.
I'm experiencing a problem with the tReplaceList compoment. I've a small input schema fro a CSV file that contains a category name. I need to look up the category name in a MySQL table and replace the category name with the correct category_id. Simple.
The category name is "SPECIAL OFFERS" and I know this exists in the lookup data. However the tReplaceList consistently replaces the category field with the value: 4S4P4E4C4I4A4L4 4O4F4F4E4R4S4
Oh! I've just noticed that the words SPECIAL OFFERS is buried in here surrounded by the number 4!
OK, here's what has happened. The tReplaceList has matched "SPECIAL OFFERS" against an empty string in the database column (it's not a NULL value, just an empty string) and has returned the category_id for this, which is 4. It's then wrapped every character in "SPECIAL OFFERS" with the value 4.
I changed the database query to exclude this particular category row and the job then worked fine. Does anyone have an explanation for this behaviour?
Tags (1)
One Star

Re: tReplaceList Usage Problem

Here's another example of this not working (as I would expect)
In another column I've got a manufacturers name and I want to do a lookup on the manufacturers table to get the manufacturer_id.
In my source data I've some lines with the manufacturer name "Taylors Of Old Bond Street".
I my lookup table I've got two rows that mention Taylors:
manufacturer_id manufacturer_name
11 Taylors Of Old Bond Street
13 Taylors

When I do the replacement this is what I get in the log:
13 of Old Bond Street

So it seems to have:
1. Missed the complete match altogether
2. Found a partial match and replaced only part of the field.
Surely this isn't correct behaviour?
Community Manager

Re: tReplaceList Usage Problem

Hello David
I see you have reported a 12099, it should be a bug on Perl project, I got the same result. It works fine on Java project.
Best regards
Talend | Data Agility for Modern Business

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach


Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.



Introduction to Talend Open Studio for Data Integration.