ExtractData

Syntax

ExtractData (mapName, domainList, tempRecName, instance)

Description

You can use the DVM extract data function to generate and execute set-based SQL to extract DVM data into a specified table. Prior to data extraction, all data is removed from the temp table for the specified process instance. Element values are mapped to fields in the temp record using the order of the specified domain list followed by the element order specified in the value map definition. If no domains are specified, element values are mapped to fields in the temp record using only the element order specified in the value map definition. This function is expected to be used for processing large volumes of data. It provides an abstraction layer from the physical data persistence layer of the DVM framework.

The temp table has the following design constraints:

  1. The first column will be PROCESS_INSTANCE.

  2. The second column will be used for UniqueGUID (EOTF_COMMONELEMENT).

  3. The remaining columns correspond to the elements in the specified domain list.

  4. The temp table column names do not have to match the element names in the DVM.

  5. The table should be keyed by ProcessInstance, UniqueGUID.

  6. There may be a performance benefit from having an index on the elements of each specified domain.

Parameters

Parameter Description

mapName

The name of static value map definition (DVM), as sting.

domainList

The name of the value map domain(s) to extract data for. Provide null or an empty array in this parameter to extract data for all domains in the map.

tempRecName

The name of the temp table to extract data into, as string.

instance

The number to use when qualifying process instance, as integer.

Returns

Boolean indicating success or failure of the process.

Example

Local EOTF_CORE:DVM:Functions &dvm = create EOTF_CORE:DVM:Functions();
Local string &mapName = "States";
Local array of string &domainList = CreateArray("PS");
Local string &tempRecName = Record.HR_STATES_TAO;
Local boolean &success = 
&dvm.ExtractData(&mapName, &domainList, &tempRecName, &instance);