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.
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.
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.
I create a Filtering rule set for my scenario.
Next, I add the variables needed for my rule check – State and ID.
Then, I need to create the rule check itself. To do this I will select 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.
I write the following expression to perform the rule check I described in my scenario. I select Validate to confirm it is valid syntax.
Below is the saved 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.
I save and run the test.
I select to review the results of the test. As expected, IDs 4 and 7 are returned by the rule.
This rule can now be published and executed. For more information, refer to the SAS Intelligent Decisioning documentation.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.