Load Data Using Workspace (Data Management)

Summary

Uses the Data Reference Workbook from the Data Loading Workspace to load data from a source to a target dataset.

Usage

  • The Data Reference Workbook is used to define how data will be loaded from the source to the target dataset.

  • Definition queries can be used to omit records during migration.

  • Global IDs cannot be preserved when loading to a service.

Parameters

LabelExplanationData Type
Data Reference Workbook

The path to the Data Reference Workbook defining the data source, target, and mapping workbook paths.

File

Derived Output

LabelExplanationData Type
Output Datasets

A list of target dataset paths listing where data was loaded.

Table View

arcpy.management.LoadDataUsingWorkspace(in_workbook)
NameExplanationData Type
in_workbook

The path to the Data Reference Workbook defining the data source, target, and mapping workbook paths.

File

Derived Output

NameExplanationData Type
out_datasets

A list of target dataset paths listing where data was loaded.

Table View

Code sample

LoadDataUsingWorkspace example (Python window)

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

import arcpy

arcpy.management.LoadDataUsingWorkspace("C:/data/DataLoadingWorkspace/DataReference.xlsx")
LoadDataUsingWorkspace example (Python window)

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

# Name: LoadDataUsingWorkspace.py
# Description: Load the source-target mapping defined in DataReference.xlsx

# Import system modules
import arcpy

# Set local variables
workbook = "C:/data/DataLoadingWorkspace/DataReference.xlsx"

arcpy.management.LoadDataUsingWorkspace(in_workbook=workbook)

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics