Summary
Creates a Data Loading Workspace that can be used for data loading. The generated workspace contains a collection of Microsoft Excel workbooks.
Usage
The geometry of your source data will determine the types of Data Mapping folders that are generated. For example, if you only include point features, only a Points folder will be generated. This tool supports tables and feature classes as inputs.
Every time you run the tool, a new workspace will be generated.
Create or specify a predefined mapping table to help match datasets, fields, and attribute domain coded value descriptions from a source and a target schema. The table is used to bidirectionally match substrings; therefore, order is not important. The table can be used to create matches or block them.
The predictive field matching uses fuzzy logic built on top of the Levenshtein distance algorithm to match datasets, fields, and coded values descriptions between a source and a target.
Syntax
arcpy.NOALIAS.CreateDataLoadingWorkspace(source_target, output_workspace, {calc_stats}, {match_options}, {predefined_mapping}, {match_subtypes})
Name | Explanation | Data Type |
source_target | Defines how source data will be mapped over to the target schema. | Value Table |
Source to Target Mapping
| Defines how source data will be mapped over to the target schema. | Value Table |
output_workspace | The output folder where the Data Loading Workspace will be created. | Workspace |
Output Folder
| The output folder where the Data Loading Workspace will be created. | Workspace |
calc_stats (Optional) | Calculates the count and percentage of filled-in values for fields in the source schema. The default is False. | Boolean |
Calculate feature count
statistics | Calculates the count and percentage of filled-in values for fields in the source schema. The default is False. | Boolean |
match_options (Optional) | By default, only fields with the same name are mapped in the workspace. Fields can also be mapped by checking one of the following options:
| String |
Predictive Field Matching Options | By default, only fields with the same name are mapped in the workspace. Fields can also be mapped by checking one of the following options:
| String |
predefined_mapping (Optional) | Performs substring matching for datasets, values, and attribute domain coded value descriptions based on the Predefined Mapping table. | Table |
Predefined Mapping | Performs substring matching for datasets, values, and attribute domain coded value descriptions based on the Predefined Mapping table. | Table |
match_subtypes (Optional) | Attempt to create separate DataMapping workbooks by subtype if they exist. The default is True.
| Boolean |
Create Matches by Subtype
| Attempt to create separate DataMapping workbooks by subtype if they exist. The default is True.
| Boolean |
CreateDataLoadingWorkspace (stand-alone script)
The following stand-alone script demonstrates how to use the CreateDataLoadingWorkspace tool:
# Name: CreateDataLoadingWorkspace.py
# Description: Creates a new DataLoadingWorkspace
# Import required modules
import os
import arcpy
# Source and target workspaces with the mapping of table name to table name.
source = 'D:/data/WaterUtilities.gdb/WaterDistribution'
target = 'D:/data/Water_AssetPackage.gdb/UtilityNetwork'
mapping = [
('wControlValve', 'WaterDevice'),
('wHydrant', 'WaterJunction'),
('wFitting', 'WaterJunction'),
('wMain', 'WaterLine'),
]
# Fully qualify the table names.
source_target = [(os.path.join(source, a), os.path.join(target, b))
for a, b in mapping]
output_workspace = 'D:/data'
calc_stats = True
arcpy.dlt.CreateDataLoadingWorkspace(source_target=source_target,
output_workspace=output_workspace,
calc_stats=calc_stats)
Environments
This tool does not use any geoprocessing environments.
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes