Cross-reference mapping files

Disponible con licencia de Production Mapping.

Mapping information for the Create Cross-Reference Geodatabase tool can also be provided in a separate file such as an Excel spreadsheet. This file can be created for instances where the Create Cross-Reference Geodatabase tool does not match feature class and field names automatically. For example, if source Road_L should be loaded into target RoadL, but the target does not contain Road_L, the spreadsheet allows you to customize the way the source workspace is mapped to the target database.

The Create Cross-Reference Geodatabase tool uses the information provided in the mapping file. This means that all tables and fields in the source workspace that need to be mapped to the target database must be included or they are omitted during the load process.

This mapping file can contain one to three worksheets, as follows:

  • Data Mapping—Contains information on mapping tables from the source dataset to the target database
  • Field Mapping—Contains information on mapping fields in source tables to the target tables
  • Value Mapping—Allows you to override default values for fields with range domains

An empty cross-reference mapping file is included with the ArcGIS Production Mapping product files. Each worksheet's name correspond to the name of a table in the cross-reference geodatabase, but spaces are allowed in the worksheet names. You can also provide actual names instead of numeric identifiers for dataset tables.

Data Mapping worksheet

On the Dataset Mapping worksheet, you can list the tables in the source dataset and specify what tables they should be mapped to in the target dataset. For instance, you can indicate that the RoadL table in the source dataset should be mapped to the Road table in the target dataset. If there are conditions you want to apply to the source data as it is loaded into the target space, you can also add WHERE clauses and a code that corresponds to the subtype.

Example of a Dataset Mapping table
Example of a Dataset Mapping table

Columns that must be on the Dataset Mapping worksheet are described in the following table:

DatasetMapping fields

FieldDescription

Id

A unique identification number that is automatically generated by the database. This identifier is used to reference the dataset mapping in the FieldMapping table.

SourceDataset

The name of the feature class or table in the source dataset.

TargetDataset

The name of the feature class or table in the target dataset.

WhereClause

Define a subset of the source dataset to be loaded into the target dataset. For example, if you are loading lake features from a Hydrography_Areas source feature class into a Lakes target feature class, you can use the WhereClause field to define what condition needs to be met before the features are loaded into the Lakes feature class. In this case, the WhereClause attribute could be F_CODE = BH080 when the feature code of BH080 is defined as a lake.

Subtype

Define the subtype in the target dataset into which the data will be loaded. It must be populated when the source and target schemas are different and the subtypes have different codes.

Field Mapping worksheet

On the Field Mapping worksheet, you can specify the fields in the source tables that need to be mapped to the target tables. This can be configured when the name of the field in the source does not match the target. For instance, the name of the length field could be "len_" in the source and "len" in the target. There could also be more obvious differences in field names, such as the name field is "NAM" in one workspace and "NAM1" in the other workspace. On this table, you need to provide an ID number for the table in the dataset, which can be found in the Id column on the Dataset Mapping table.

Example of a Field Mapping table
Example of a Field Mapping table

Columns that must be on the Field Mapping worksheet are described in the following table.

FieldMapping fields

FieldDescription

Id

A unique identification number that is automatically generated by the database. This identifier is used by the ValueMapping table to reference the field mapping.

DatasetMapId

A reference to the dataset mapping record as defined by the Id field in the DatasetMapping table.

SourceField

The name of the field in the source schema.

TargetField

The name of the field in the target schema.

WhereClause

Conditionally map a source field to a target field if the specified WHERE clause is satisfied. The WHERE clause is applied to the source dataset.

Value Mapping worksheet

With the Value Mapping worksheet, you can override values contained in a source field that would not be considered valid in the target field. For instance, you can replace all occurrences of the value "OPR" with "Operational". The FieldMapId value corresponds to the Id column on the Field Mapping table.

Example of a Value Mapping table
Example of a Value Mapping table

Columns that must be on the Value Mapping worksheet are described in the following table.

ValueMapping fields

FieldDescription

Id

A unique number that is automatically generated by the database.

FieldMappingId

The related field map identifier. This value corresponds to the Id field in the FieldMapping table.

FromValue

The source value to be overwritten.

ToValue

The value to map to.