Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

Yuvraj
2012-08-07 16:30:15

How will i add more values ? Like ( MOBILE, WIRELESS, GSM). Want to convert it to GSM.

treplace not worth it.

shong
2012-05-02 13:33:22

fantom wrote:

Hi
Thanks a lot shong it actually worked, and I tried row1.PRODUCT_ID.matches("([A-Za-z0-9- ]+)GSM([A-Za-z0-9_ ]+)") ? "GSM" : "CDMA" as well. but it took more to work with matches than with contains. I'm so grateful.
best regards.

Cool, wink thanks for your feedback!

Best regards
Shong

fantom
2012-05-02 13:10:34

Hi
Thanks a lot shong it actually worked, and I tried row1.PRODUCT_ID.matches("([A-Za-z0-9- ]+)GSM([A-Za-z0-9_ ]+)") ? "GSM" : "CDMA" as well. but it took more to work with matches than with contains. I'm so grateful.
best regards.

shong
2012-05-02 04:25:49

Hi
It seems you only need a simple expression on tMap as below:
row1.PRODUCT.contains("GSM")?"GSM":row1.PRODUCT

Best regards
Shong

fantom
2012-04-28 23:29:19

hi shong,
yes of course, actually in a column named PRODUCT, I want to replace the content of all rows containing "GSM" with nothing but "GSM" . for exemple: we have indeed in the column PRODUCT, in the first row there is "PSGSMPROD_01", in the third row we have "PSGSMACTIVATED_00112" and so on... so, I want in the same column and in the same rows "PSGMPOD_01" and each row containing GSM to be replaced by "GSM". I hope made my problem clear this time lol I've been trying many options but in vain. I'll be so gratful for any help
thanks a lot .
greetings

shong
2012-04-28 06:21:24

Hi

Sorry, I don't understand you well, what are your expected result? Can you give us an  example to explain your request?

Best regards
Shong

fantom
2012-04-27 16:55:25

Hi all,
first I didn't know where to write down my question, anyways, I'm new in talend and I'm using an EXCEL file as a DB source and another one for the output (just trying the treplace before using a postgresql db output) and I'm trying to replace all what's written in a field named PRODUCT, which contains something kinda "OPGSM001OPERATION_P" (including special characters like _ or - and so on) with nothing but "GSM" but in vain, I've been using both simple and advanced mode trying something like : "[A-Za-z]*GSM*[A-Za-z]" or "[A-Za-z]([0-9]{10})*GSM*[A-Za-z]([0-9]{10}) and many other options and bunch of stuff and each time it gives a different unwanted result (just like writing GSM twice or many errors instead...) . any help please I'm kinda desperate.
thanks a lot.

Board footer

Powered by FluxBB