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. |
DQ.LOADQKB(locale)
locale
a five-character locale code name representing a locale supported by the QKB
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 data quality 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. Therefore, in order to make use of 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.
dq dataq_en
// we instantiate two dq objects
dq dataq_fr
string output_en
string output_fr
dataq_en = dq_initialize()
dataq_fr = dq_initialize()
dataq_en.loadqkb("ENUSA"
// loads QKB support for locale English, US
dataq_fr.loadqkb("FRFRA")
// loads QKB support for locale French, France
dataq_en.gender("Name", "Jean LaFleur", output_en)
// output is 'U'
dataq_fr.gender("Name", "Jean LaFleur", output_fr)
// output is 'M'