Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
JSey
Creator
Creator

treplacelist issue

Hi

I have a job that is using a treplacelist component. In the replacelist file, it goes something like this

Lost time, WS1

Lost time (but xxx), WS2

The problem is for rows where the value is Lost time (but xxx), it is all replaced with WS1. How can I resolve this? I have already tried using text enclose in the schema for the file delimited. Thank you for your help.

9 Replies
pakapi_
Creator
Creator

Hi Jsey,

 

I've never used this component before, but I will try to help. Can you paste a job example, to better understand what you want to do ? Espacially some input samples.

JSey
Creator
Creator
Author

Sure, here you go, thanks for your help.

 

0693p000009qo3CAAQ.jpg

 

 

 

 

So the treplacelist reads a csv with a column for original match values, and a column for the replace values. This is what the work status csv looks like in part:

 

0693p000009qo1uAAA.png

 

 

 

 

The issue is it is only matching on lost time - allowed and replacing with ws1. When the values are "lost time - allowed(but not payable)", it will return "ws1 (but not payable)". It is not matching on "lost time - allow (but not payable)" and will not return "ws2". In the treplace component, I don't see any option to match the whole word.

 

 0693p000009qo6VAAQ.jpg

pakapi_
Creator
Creator

Hi JSey,

 

thanks for your example. It looks like a bug in this component. Maybe try to use tMap insted:

0693p000009qpd6AAA.png

 

JSey
Creator
Creator
Author

Doesn't look like a bug to me, it is matching on a subset of the words. I could also have used treplace, but I wanted to use a replacelist so that the list can be maintained externally. Are there any other workarounds?

pakapi_
Creator
Creator

Hi JSey,

 

true, maybe it's not a bug, it's a feature 😉

 

I don't udderstand - what is the problem to externally maintain your list with tMap approach ? It's just a csv file. Could you please explain ?

JSey
Creator
Creator
Author

Still hoping there is a work around or a fix. Any option from anyone else? What else can I use beside treplacelist or treplace?

JSey
Creator
Creator
Author

This is a bug from 2014 and is still unresolved. Is there any workaround? This bug makes treplacelist essentially unusable.

 

https://jira.talendforge.org/browse/TDI-30413

pakapi_
Creator
Creator

Why not tMap ?

pakapi_
Creator
Creator

Still don't know what is the problem with tMap? Can you please explain ?