Talend Studio - Data Quality - regular expression error within a built-in sql script

Four Stars

Talend Studio - Data Quality - regular expression error within a built-in sql script

The following sql script works correctly in MySQL workbench however when I copy this sql script into an tmysqlinput built-in component in a Talend job the script is changed by Talend when I run it.

 

The original script is:

SELECT
name_sur
,regexp_substr (name_sur,'\\S*Admin+') as new_field2

FROM debtrecovery.bailiff
where name_sur like '%Admin%'

 

whereas the amended version is:

 

SELECT
name_sur
,regexp_substr (name_sur,'S*Admin+') as new_field2

FROM debtrecovery.bailiff
where name_sur like '%Admin%'

 

Talend is removing the two backslashes in front of the capital S i.e.

 

original regex:   '\\S*Admin+'

amended regex: 'S*Admin+'

This is amending my final output, giving me incorrect data.

 

Is this a known bug or is there any specific work around I can use.

 

Thanks

Kevin


Accepted Solutions
Moderator

Re: Talend Studio - Data Quality - regular expression error within a built-in sql script

Hello,

Are you trying to write 4 backslashes in your sql script to see if your final output correct?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

All Replies
Moderator

Re: Talend Studio - Data Quality - regular expression error within a built-in sql script

Hello,

Could you please clarify in which Talend version/edition you are?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Talend Studio - Data Quality - regular expression error within a built-in sql script

Hi Sabrina,



Thanks for looking into this issue for me. The version that I am using is Talend 6.4.1



Regards,



Kevin

Moderator

Re: Talend Studio - Data Quality - regular expression error within a built-in sql script

Hello,

Are you trying to write 4 backslashes in your sql script to see if your final output correct?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Talend Studio - Data Quality - regular expression error within a built-in sql script

Hi Sabrina,

 

It was an escape char issue so thanks for your suggestion. This works fine now

 

Regards,

 

Kevin

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.