Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tReplace not removing comma in Talend workflow

I have a workflow which i am using to remove comma sign , from the data. However its is not working. I tried un-checking "Whole word" field too, but to no avail.

0683p000009Lu1x.jpg

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

0683p000009LuPg.png0683p000009LuPl.png0683p000009LuEK.png

 

The tReplace should work , have you tried unchecking the whole word?

 

 

View solution in original post

15 Replies
TRF
Champion II
Champion II

It should works with tMap and the following regex: 

row1.id.replaceAll(",", "")
Anonymous
Not applicable
Author

Not working either. I tried that too.

TRF
Champion II
Champion II

It does.

Here the string to change:

"a piece, of text, with undesired, commas,"

the tMap:

0683p000009Ltyg.png

and the result:

[statistics] connected
a piece of text with undesired commas
[statistics] disconnected

Try again.

 

 

Anonymous
Not applicable
Author

I wonder if it is because i am using tFileInputFullRow component? I tried not only on this field, but also on other fields too, yet it is not working.

vboppudi
Partner - Creator III
Partner - Creator III

Hi Azimulh,

 

i think tReplace working as expected.

 

i used tReplace to replace ',' with '-', please find the output below.

Starting job job_replace at 08:10 19/04/2017.

[statistics] connecting to socket on port 3842
[statistics] connected
.-----------.
|SourceData |
|=---------=|
|COL |
|=---------=|
|ABC,XYZ,123|
|ZXC,VBN,M |
|ASD,FGH,JKL|
'-----------'

.-----------.
|AfterReplace|
|=---------=|
|COL |
|=---------=|
|ABC-XYZ-123|
|ZXC-VBN-M |
|ASD-FGH-JKL|
'-----------'
[statistics] disconnected
Job job_replace ended at 08:10 19/04/2017. [exit code=0]

Regards, 

TRF
Champion II
Champion II

If you use tFileInputFullRow, you have a single field called "line" by default, don't you?

Can you share your job (tFileInputFullRow schema and tMap)?

Anonymous
Not applicable
Author

How do i share the workflow? I mean any tutorial on how to export and secondly, i do not see any filed in this discussion forum to attach anything

TRF
Champion II
Champion II

You can attach a captured image (click on the camera when editing a post)

Anonymous
Not applicable
Author

I have added the images below. Also some sample data

 

id
Shenzhen City, Guangdong, China
Rest of Hunan, China
China
Wuxi City, Jiangsu, China
Jinshan District, Shanghai, China
JingÕan District, Shanghai, China
Yangpu District, Shanghai, China

 

0683p000009LuPR.jpg0683p000009LuGH.jpg