Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

Filtering numeric values and alpha-numeric values in a string

One Star

Filtering numeric values and alpha-numeric values in a string

Hello,
I have a MSSQL String column having values like "000123", "ABC123", "00-123", etc.
I want to INSERT into a MySQL table only the Numeric values like "000123" because the target datatype is INT.
The rejected values i.e. the values which are alpha-numeric or having any special characters should be sent to a CSV file.
Can you tell me the component to be used or the process to filter just the String having numeric values ?
Highlighted
One Star

Re: Filtering numeric values and alpha-numeric values in a string

Try with regex such as 
string.matches("^\\p{Digit}+$"))

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog