Types of data maps

You can define three types of data maps.

Type Description Required fields Joins
0 A Type 0 data map defines the primary key of a file.

Filename — identifies the name of the table queried to find source records. This is typically a table to purge or archive. For example, format.

Field Name — identifies the primary key of the table to query. For example, name.

Map Query — identifies the query to select records. For example, "name=\""+str($umapdata)+"\"".

Note: The map query often uses RAD variables to select information about a record rather than hard code a particular record value.

Type 0 data map records are equivalent to the following SQL query:

SELECT <Field Name> FROM <Filename> WHERE <Field Name>=<Value in Map Query>

None
1 A Type 1 data map defines a join between two tables using one field to query the external file. Filename — identifies the name of the table queried to find source records. This is typically a table to purge or archive. Service Manager uses the records from this table as the selection criteria to identify related records in external tables. For example, format.
Field Name — identifies the join field shared between the primary and external tables. Service Manager uses the records from this field as the selection criteria to identify related records in the external table. For example, name.
Query File — identifies the name of the external table queried with the join field. Service Manager searches for related records in this table. For example, formatctrl.
Type 1 data map records are equivalent to the following SQL query:

SELECT [<Override Qry> | <Field Name>] FROM <Query File> WHERE <Field Name>=<Value in FileName>
Joins the Field Name from the Filename to the values in the Query File.
2 A Type 2 data map defines a join between two tables using a more restrictive query of the external table.

Filename — identifies the name of the table queried to find source records. This is typically a table to purge or archive. Service Manager uses the records from this table as the selection criteria to identify related records in external table. For example, format.

Field Name — identifies the join field shared between the primary and external table. Service Manager uses the records from this field as the selection criteria to identify related records in the external table. For example, name.

Map Query — identifies the additional selection criteria to use when querying the join field to select records from the external target table. For example, "name=\""+name in $umapfile+".g\" or name=\""+name in $umapfile+".w\"".

Note: The map query field uses the Service Manager query format.

Query File — identifies the name of the external table that Service Manager queries with the join field. Service Manager searches for related records in this table. For example, formatctrl.

Type 2 data map records are equivalent to the following SQL query:

SELECT [<Override Qry> | <Field Name>] FROM <Query File> WHERE <Field Name>=<Value in FileName> and <Value in Map Query>

Joins the Field Name from Filename to the values returned by the Map Query in the Query File.

Related topics

Data maps
Alternatives to data maps
Exporting records
Importing records
Purging and archiving records
Unload script utility
Master data records

Add a data map record
Create data maps to related records
Delete a data map record
Update a data map record
View a data map record