BookmarkSubscribeRSS Feed

SAS Viya 3.4: Add a Customized Quality Knowledge Base (QKB)

Started ‎08-20-2019 by
Modified ‎08-20-2019 by
Views 2,203

In SAS Viya 3.4 as an Administrator, you can add a customized Quality Knowledge Base (QKB) to your installation. In SAS Viya, you can use the QKB to perform data quality operations (e.g., parse and standardize) on your data either in SAS Data Studio or using code in SAS Studio. As part of these data quality operations, you may want to use some custom rules and logic which means you need to customize the QKB definitions.

 

For more information on SAS Data Quality in SAS Viya, refer to its documentation.

 

The high-level steps to add a customized QKB in SAS Viya are:

  • Create a QARC File for the Customized QKB
  • Import QARC File to SAS Viya
  • Set as Default QKB. Note: This step is optional.

Create a QARC File for the Customized QKB

A QKB must be in the QARC (QKB Archive) format to be imported to a CAS Server in SAS Viya. As part of the SAS Data Quality or SAS Data Preparation offering a command-line tool is provided to convert your QKB to this format. The tool is located on your CAS Controller at: /opt/sas/viya/home/SASFoundation/utilities/bin/. In my installation, the CAS Controller is located on server sascas01.

 

1_QARCTool-1.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.

 

To create a QARC file, locate the directory of your customized QKB.

 

2_CustomizedQKBDirectory.png

 

Once you have located the directory that contains your customized QKB, then copy the directory and all of its contents to a location where the CAS Controller has access to it. For my installation, the CAS Controller is located on server sascas01 and I have copied the customized QKB directory and its contents to /home/maquee/CI29_qkb1_customized.

 

3_CopiedQKBtoCAS.png

 

Now that I have copied the customized QKB to location which the CAS Controller can access, the next step is to create the QARC file for the customized QKB. To do this, you need to issue the following commands on your CAS Controller:

 

cd /opt/sas/viya/home/SASFoundation/utilities/bin/

./qarc create <path to customized QKB root directory> <path and filename with .qarc extension>

 

Note: The first command changes the directory to the location of the QARC tool on the CAS Controller and the second command creates the QARC file.

 

Below are the commands I issued on my CAS Controller (sascas01), to create the CI29_qkb1_customized.qarc file in the /home/maquee/ directory on the CAS Controller.

 

cd /opt/sas/viya/home/SASFoundation/utilities/bin/

./qarc create /home/maquee/CI29_qkb1_customized /home/maquee/CI29_qkb1_customized.qarc

 

Note: It will take several minutes to create the QARC file.

 

4_CustomizedQKB_QARC-1.png

Import QARC File to SAS Viya

Note: In order to import the QKB file using the user interface, you must copy the QARC file to a location accessible from your local machine. In my case, I have copied the QARC file I created in the previous section to my C:\ drive in the CI29_QKB_Customized folder.

 

5_LocalQARCFile.png

 

Next, log on to SAS Environment Manager as an Administrator to the Viya installation where you want to add the customized QKB. You must have SAS Administrator privileges in order to import a QKB QARC file into SAS Viya. When signing in, select Yes to assume the group SASAdministrators, so you have the appropriate privileges.

 

6_AssumableGroups.png

 

Once you are signed into to SAS Environment Manager, then select the Quality Knowledge Bases tab.

 

7_QKBTab.png

 

To import a QARC file, select 1_Icon_Import.png and navigate to where the QARC file for the customized QKB is located by using the Browse button.

 

8_ImportQKB.png

 

Enter the target name and location for the QKB. Select Import to import the file.

 

9_ImportQKBSettings.png

 

Note: It will take several minutes to import the QARC file.

 

Once the import is complete, confirm that the imported QKB is now listed.

 

10_QKBTab.png

Optional: Set Customized QKB as Default QKB

Note: Only the default QKB can be used in SAS Data Studio. In a future article, I will discuss how to use a non-default QKB in SAS Studio.

 

After importing the QKB, if you want to designate the newly imported QKB as the default QKB for your CAS server, then add (or change) the following lines at the end of the casconfig_usermods.lua file located at /opt/sas/viya/config/etc/cas/default/ and then restart the CAS Controller.

 

cas.dqSetupLoc="DefaultQKBName"

cas.dqLocale="DefaultLocale"

 

Note: The DefaultQKBName must match the name found on the Quality Knowledge Bases tab on SAS Environment Manager. The DefaultLocale is the 5-character QKB locale abbreviation. For example, ENUSA = English-United States and ESESP = Spanish-Spain.

 

Below is my modified casconfig_usermods.lua file to set my imported Customized QKB as the new default QKB.

 

11_CASConfigUserModsLocation-1.png

 

12_CASConfigUserModsSettings.png

 

After editing this file, I restart my CAS Controller for the change to take effect by issuing the following command:

sudo systemctl restart sas-viya-cascontroller-default

 

13_RestartCASController-1.png

 

Note: It may take a few minutes for the CAS Controller to restart.

 

Finally, I return to the Quality Knowledge Bases tab in SAS Environment Manager and refresh the display to confirm that the Customized QKB is now set as the default QKB.

 

14_QKBTab.png

 

Refer to the QKB Management section in the SAS Viya 3.4: Administration guide for more information.

Version history
Last update:
‎08-20-2019 04:07 PM
Updated by:
Contributors

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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