Generate Mapping Table (Data Management)

Summary

Generates the Mapping Table based on a configured data loading workspace. The output table includes a list of predefined datasets, fields, and attribute domain coded value descriptions.

Usage

  • This table includes a collection of substrings, delimited by spaces, that are used to match a source to a target schema. The table is used to bidirectionally match substrings so order is not important.

  • The output table includes the following format for each column and allowable values:

    • type—The dataset, field, or value
    • substringsa—A user-defined substring
    • substringsb—A user-defined substring
    • match_strings—A value of Yes or No

Parameters

LabelExplanationData Type
Data Reference Workbook

The Data Reference Workbook that will be used to generate a Mapping Table.

File
Output Table

The output table, which will include a list of datasets, fields, and attribute domain coded value descriptions based on the source and target mapping from a Data Loading Workspace. Use this table in the Create Data Loading Workspace tool to refine a future iteration of a Data Loading Workspace.

Table

arcpy.management.GenerateMappingTable(in_workbook, out_table)
NameExplanationData Type
in_workbook

The Data Reference Workbook that will be used to generate a Mapping Table.

File
out_table

The output table, which will include a list of datasets, fields, and attribute domain coded value descriptions based on the source and target mapping from a Data Loading Workspace. Use this table in the Create Data Loading Workspace tool to refine a future iteration of a Data Loading Workspace.

Table

Code sample

GenerateMappingTable example (Python window)

The following Python window script demonstrates how to use the GenerateMappingTable function in immediate mode.

import arcpy

arcpy.management.GenerateMappingTable(
    "C:/data/DataLoadingWorkspace/DataReference.xlsx", "C:/temp/Default.gdb/DataReference_GenerateMappingTable"
)
GenerateMappingTable example (Python window)

The following script demonstrates how to use the GenerateMappingTable function in a stand-alone script.

# Name: GenerateMappingTable.py
# Description: Generate a Mapping Table from the input Data Reference workbook.

# Import system modules
import arcpy

# Set local variables
workbook = "C:/data/DataLoadingWorkspace/DataReference.xlsx"
mapping = "C:/temp/MappingTable.csv"

arcpy.management.GenerateMappingTable(in_workbook=workbook, out_table=mapping)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics