Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
Sure, here you go, thanks for your help.
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:
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.
Hi JSey,
thanks for your example. It looks like a bug in this component. Maybe try to use tMap insted:
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?
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 ?
Still hoping there is a work around or a fix. Any option from anyone else? What else can I use beside treplacelist or treplace?
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
Why not tMap ?
Still don't know what is the problem with tMap? Can you please explain ?