The following example demonstrates functions that can be used to evaluate the beginning and end of values of any type using patterns. These functions include the following:
STARTSWITH- check start of values in a specified column against a specific pattern or literal. See STARTSWITH Function.
ENDSWITH- check end of values in a specified column against a specific pattern or literal. See ENDSWITH Function.
The following inventory report indicates available quantities of product by product name. You need to verify that the product names are valid according to the following rules:
- A product name must begin with a three-digit numeric brand identifier, followed by a dash.
- A product name must end with a dash, followed by a six-digit numeric SKU.
Source data looks like the following, with the Validation column having no values in it.
In this case, you must evaluate the
ProductName column for two conditions. These conditional functions are the following:
derivetransform to create two new test columns and then use a
settransform based on the evaluation of these two columns. However, using the following, you can compress the evaluation into a single step without creating the intermediate columns: Results:
This page has no comments.