Upgrade Attachments (Data Management)

Summary

Upgrades the attachments functionality on the data.

When attachments are enabled on a feature class, an attachment table and relationship class are created to store the attachment data when an attachment is added to a feature. The attachment table that is created includes fields that are used to store information about the attachment.

At ArcGIS Pro 2.7, this tool adds two more editable fields (KEYWORDS and EXIFINFO) to the attachment table that can be used to store additional information about the attachment. These fields can be used by applications such as ArcGIS Survey123 that set their values through the feature service. For example, an application may set keyword values in the keywords column, which it later uses to query for specific attachments through the feature service. These fields are not exposed when working with attachments in ArcGIS Pro, but the new fields are visible if you access the attachment table.

Learn more about using ArcGIS Survey123 with existing feature services

Caution:

If the attachments are upgraded, the minimum client version of the attachment table will be set to ArcGIS Pro 2.6. This means you cannot open the attachment table in ArcGIS Desktop or earlier versions of ArcGIS Pro. To downgrade attachments to an earlier version, use the Downgrade Attachments tool.

Usage

  • Attachments must be enabled on the input dataset before running this tool.

  • If the data is stored in an enterprise geodatabase, this tool must be executed as the dataset owner.

  • This tool adds two fields to the attachment table: KEYWORDS and EXIFINFO. Both fields are editable and nullable.

    • KEYWORDS—Adds searchable keywords that will be associated with the attached file. For example, if the attachment is deemed critical for review, and if the keyword critical is added to this field, the attachment will appear in a search if the query contains the keyword critical.
    • EXIFINFO—Stores additional metadata about the attached file. At ArcGIS Pro 2.7, this field will not be used.

  • Both the KEYWORDS and EXIFINFO fields are supported and used by ArcGIS Online hosted feature services. The KEYWORDS field as well as limited support for the EXIFINFO field are supported by hosted feature services starting at ArcGIS Enterprise 10.8.1. You do not need to run this tool prior to publishing a hosted feature service, as these fields can be enabled after publishing.

  • If you are upgrading the attachments used in an existing service that was previously published through ArcGIS Desktop, you need to republish the service using ArcGIS Pro 2.6 or later to support the upgraded attachments.

  • Note:

    Only services published from ArcGIS Pro to ArcGIS Enterprise 10.8.1 and later support upgraded attachments.

Syntax

arcpy.management.UpgradeAttachments(in_dataset)
ParameterExplanationData Type
in_dataset

The feature class with attachments enabled.

Table View

Derived Output

NameExplanationData Type
out_dataset

The updated dataset with upgraded attachments.

Table View

Code sample

UpgradeAttachments example (Python window)

Upgrade attachments on a feature class using the UpgradeAttachments function.

import arcpy
arcpy.UpgradeAttachments_management("C:\\MyProject\\MyGDB.gdb\\MyFC")

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics