DQ.LOADQKB Function

Loads definitions from a QKB into memory and links those definitions with the data quality object.

Category: Data Quality
Returned data type: Integer
Note: The returned value is a Boolean value where 1= success and 0 = error.

Syntax

DQ.LOADQKB(locale)

Required Argument

locale

a five-character locale code name representing a locale supported by the QKB.

Details

The function DQ.LOADQKB is a member of the data quality class. A data quality object can be declared as a variable and must then be initialized through a call to the function DQ_INITIALIZE. The function DQ.LOADQKB can be called after the initialization.
The DQ.LOADQKB function loads definitions from a QKB into memory and links those definitions with the data quality object. A definition is a callable object that uses context-sensitive logic and reference data to perform analysis and transformation of strings. Definitions are used as parameters in other dq functions.
When calling DQ.LOADQKB, you must specify a locale code. This locale code is a five-character string representing the ISO codes for the locale's language and country. Refer to your QKB documentation for a list of codes for locales that are supported in your QKB.
Note: Only one locale code can be specified in each call to DQ.LOADQKB. Only definitions associated with that locale are loaded into memory. This means that support for only one locale at a time can be loaded for use by a data quality object. In order to use QKB definitions for more than one locale, you must either use multiple instances of the data quality class or call DQ.LOADQKB multiple times for the same instance, specifying a different locale with each call.

Example

data quality dq_en
 // we instantiate two dq objects
 
data quality dq_fr
 string output_en
 string output_fr
dq_en = dq_initialize()
dq_fr = dq_initialize()
 
 dq_en.loadqkb("ENUSA"
 // loads QKB support for locale English, US
 
 dq_fr.loadqkb("FRFRA")
 // loads QKB support for locale French, France
 
 dq_en.gender("Name", "Jean LaFleur", output_en)
 // output is 'U'
 
dq_fr.gender("Name", "Jean LaFleur", output_fr)
 // output is 'M'