Using regular expression support to validate data

In this recipe, we will see how you can use regular expressions to validate your data. We will take a simple example of validating phone numbers extracted from the source OLTP table PERSONPHONE located in the PERSON schema. The validation rule would be to identify all records which have phone numbers different from this pattern: ddd-ddd-dddd (d being a numeral). Let's say that we do not want to reject any data. Our goal is to generate a dashboard report showing the percentage of records in the source table which do not comply with the specified requirement for the phone number pattern.

Getting ready

Make sure that you have the PERSON.PERSONPHONE table imported into the OLTP datastore. We will create ...

Get SAP Data Services 4.x Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.