DQ.GENDER Function

Determines the gender of an individual's name using a gender analysis definition in the QKB.

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

Syntax

DQ.GENDER(gender_def, input, result)

Arguments

gender_def

a string representing the name of a gender analysis definition in the QKB

input

a string representing the input value or input field name

result

a string representing the output field name

Details

The DQ.GENDER function analyzes a string representing an individual's name and determines the gender of the name.

The function is a member of the data quality class. A data quality object can be declared as a variable and must then be initialized using a call to the function dq_initialize. The member function dq.loadqkb must then be called to load the contents of a QKB into memory and link that QKB with the data quality object. The data quality object then retains information about the QKB and the QKB locale setting.

When calling dq.gender, you must specify the name of a gender analysis definition. A gender analysis definition is an object in the QKB that contains reference data and logic used to determine the gender of the input name string. See your QKB documentation for information about which gender analysis definitions are available in your QKB.

Example

dq dataq

  string output

dataq = dq_initialize()

dataq.loadqkb("ENUSA")

dataq.gender("Name", "John Smith", output)

// outputs "M"

 

dataq.gender("Name", "Jane Smith", output)

// outputs "F"

 

dataq.gender("Name", "J. Smith", output)

// outputs "U" (unknown)