ExtractData

Syntax

ExtractData (mapName, domainList, tempRecName, instance)

Description

You can use the XREF extract data function to generate and execute set-based SQL to extract cross-reference 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 provides an abstraction layer from the physical data persistence layer of the XREF framework, and is expected to be used for processing large volumes of data.

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(s).

    Note:

    If the third column is named EOTF_IMPORT_FLG, it will be valued with N during the export.

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

  5. The temp table should be uniquely 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 the dynamic cross reference map, as string.

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:Xref:Functions &xref = create EOTF_CORE:Xref:Functions();
Local string &mapName = "VendorIDs";
Local array of string &domainList = CreateArray("PS");
Local string &tempRecName = Record.HR_VENDOR_TAO;
Local boolean &success = 
&xref.ExtractData(&mapName, &domainList, &tempRecName, &instance);