Generate Predefined Mapping Table (Data Loading)

Summary

Generates a 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

  • The Data Reference workbook found in the Data Loading Workspace must be saved before running the tool.

  • 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; therefore, order is not important.

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

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

Parameters

LabelExplanationData Type
Data Reference workbook

The Data Reference workbook that will be used to generate a predefined mapping table.

File
Output Table

The output table includes 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.dltsolutions.GeneratePredefinedMappingTable(reference_workbook, output_table)
NameExplanationData Type
reference_workbook

The Data Reference workbook that will be used to generate a predefined mapping table.

File
output_table

The output table includes 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

GeneratePredefinedMappingTable (Python window)

The following stand-alone script demonstrates how to use the GeneratePredefinedMappingTable tool:

arcpy.dlt.GeneratePredefinedMappingTable("D:/data/DataLoadingWorkspace/DataReference.xlsx", "D:/data/DataLoadingWorkspace/PredefinedMapping.csv")
GeneratePredefinedMappingTable (stand-alone script)

The following stand-alone script demonstrates how to use the GeneratePredefinedMappingTable tool:

# Name: GeneratePredefinedMappingTable.py
# Description: Creates a predefined mapping from the input Data Reference workbook

# Import required modules
import arcpy

# Local Variables
workbook = "D:/data/DataLoadingWorkspace/DataReference.xlsx"
mapping = "D:/data/DataLoadingWorkspace/PredefinedMapping.csv"

arcpy.dlt.GeneratePredefinedMappingTable(reference_workbook=workbook, output_table=mapping)

Environments

This tool does not use any geoprocessing environments.

Licensing information

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