Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to bulk replace using tReplace

Hi all,

I have more than 100 data to be replaced the value, and the only thing I know is using tReplace function. 

Example:

0683p000009M7gp.jpg

Is there any quicker way to use the same function? Thanks in advance

Labels (2)
6 Replies
Anonymous
Not applicable
Author

The second option could be using eReplace function in tMap but the this will also be row by row operation. But if you are fetching this from some DB then use DB function to replace these string, that would be faster.

 

If you could share details on the source of this data or job screenshot, we can still think.

Anonymous
Not applicable
Author

Hi @Ajinkya_Gonnade ,

 

Now, I'm using this job, but unsuccessful:

0683p000009M7r7.jpg

 

Metadata Equipment:

0683p000009M7rC.jpg

 

Field_id:

0683p000009M7db.jpg

 

In the end, the database needs to display BAKA as 1, ANSI as 2 and BOKR as 3. 

 

 

 

Anonymous
Not applicable
Author

I don't see other option but again, if you are using a DB use sql to perform same operation that would be faster. 

Anonymous
Not applicable
Author

Can you give me an example on how to use the sql command at DB?

Anonymous
Not applicable
Author

Hi,

A simple join query will suffice here.

According to your second screenshot (using lookup table). Eg.  
select
A.Feild,
B.ID,
A.*
from metadata_equipment A
left join
Feild_id B
on A.Feild= B.Key

 

According to your first screenshot (using defailt value). Eg.
select
regexp_replace(amount,'.',',') as amt,
street,
name,
firstname
from TABLE1

check if u can leverage regexp_replace() function.

akumar2301
Specialist II
Specialist II

Hello ,

I see that you have schema column name in replacement list. So it makes your requirements dependent on schema column name.

If need to use some java coding here if this the case

1) for open studio , you need to use reflect class
https://community.talend.com/t5/Design-and-Development/resolved-Use-tJavaRow-to-get-fieldname-and-fi...

2) for licence version , dynamic schema
Could Help
https://community.talend.com/t5/Design-and-Development/How-to-extract-and-map-dynamic-fields-in-tmap...