Preserve Global IDs (Environment setting)

Tools that honor the Preserve Global IDs environment will reuse the Global ID values of the existing input dataset when appending rows to a target dataset.

Usage notes

  • The Preserve Global IDs environment is useful for workflows in which the Global ID value for the row is required to stay the same when exporting or appending data.
  • For the Append tool, this environment only applies to enterprise geodatabase data and will only work on data that has a Global ID field with a unique index. If the Global ID field does not have a unique index, the tool may fail. To add a unique index to your Global ID field, you can use the Add Attribute Index tool.

Dialog syntax

  • Checked—The operation will preserve the existing Global IDs.
  • Unchecked—The operation will not preserve the Global IDs of features and will instead create new IDs. This is the default.

Scripting syntax

arcpy.env.preserveGlobalIds = boolean_option

ParameterExplanation

boolean_option

If True, the operation will preserve the existing Global IDs.

If False, the operation will not preserve the existing Global IDs of features and will instead create new IDs. This is the default.

preserveGlobalIds syntax

Script example

import arcpy

# Set the preserveGlobalIds environment to True
arcpy.env.preserveGlobalIds = True