BookmarkSubscribeRSS Feed

SAS Viya 3.5: Using Data Quality Functions in SAS Intelligent Decisioning Rules

Started ‎12-18-2019 by
Modified ‎12-18-2019 by
Views 3,210

With the release of SAS Viya 3.5, you are now able to use Data Quality functions in SAS Intelligent Decisioning rules.  The Data Quality functions enable the use of definitions from the SAS Quality Knowledge Base (QKB) in your SAS Intelligent Decisioning rules.

 

Previously, I demonstrated how you can perform a data completeness check using the Filtering rule type in SAS Intelligent Decisioning.  In this article, I will also use the Filtering rule type; however, as part of the rule check I will use Data Quality functions.

 

Scenario

The scenario that I will demonstrate in this article is finding records in a data set where the State field does not match the 'AA' pattern after standardization using the State/Province (Abbreviation) definition in the English-United States locale.  If the following is my data set, then records with the ID of 4 and 7 should be returned by my filtering rule check.

 

1_input_data.png

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

Note:  The State values highlighted in green will adhere to the 'AA' pattern after standardization using the State/Province (Abbreviation) definition in the English-United States locale.

 

Create the Rule

I create a Filtering rule set for my scenario.

 

2_new_rule.png

 

Next, I add the variables needed for my rule check – State and ID.

 

3_variables.png

 

Then, I need to create the rule check itself.  To do this I will select  1_icon_edit.png to open the Expression Editor to write a custom rule using Data Quality Functions.  Below is the listing of Data Quality functions available to use in the Expression Editor of an Intelligent Decisioning rule.  For more information on the Data Quality functions, please refer to its documentation.

 

4_dq_functions.png

 

I write the following expression to perform the rule check I described in my scenario.  I select Validate to confirm it is valid syntax.

 

5_dq_expression.png

 

Below is the saved rule.

 

6_dq_rule.png

 

Test the Rule

Now that the rule has been created, I need to test it.  On the Scoring tab, I create a new test using my input data from earlier as its test data.  Note:  The variables are automatically mapped to the input data since the column names in the input table are the same names and types I created as variables for my rule.

 

7_test.png

 

I save and run the test.

 

8_run_test.png

 

I select  2_icon_view_results.png to review the results of the test.  As expected, IDs 4 and 7 are returned by the rule.

 

9_test_results.png

 

 

 

This rule can now be published and executed.  For more information, refer to the SAS Intelligent Decisioning documentation.

Version history
Last update:
‎12-18-2019 11:08 AM
Updated by:
Contributors

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags