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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.