ArcGIS Blog

Data Management

ArcGIS Pro

A guide to migrating data from ArcGIS Online to an enterprise geodatabase

By Mike Jensen and Diana Muresan

In today’s data-driven world, organizations are looking to optimize their geospatial data management workflows. Migrating data from ArcGIS Online to an enterprise geodatabase can be a transformative step, providing numerous benefits. For example, with enterprise geodatabases, you can take advantage of functionality that is unique to an enterprise geodatabase such as versioning. Versioning allows multiple users to edit data simultaneously, in isolation of one another, with the option to review any conflicts. This helps organizations with many editors to more effectively manage updates to their most critical GIS datasets.

Regardless of the motivations for migrating your data, having a good understanding of the available options is crucial to ensuring a seamless transition and avoiding potential complications. We’ll break down some common approaches to migrating data.

Options to export data from a hosted feature layer
Options to export data from a hosted feature layer

Prerequisites

To start, there are a few prerequisites before beginning the migration process.

  • Your ArcGIS Online login must own the features or be an administrator, or the owner or administrator has configured the layer to allow others to export data.
  • Determine what format to export the data. We will discuss the options for each topic, as one or two may slightly differ.
  • An enterprise geodatabase connection with a database user who has permissions to add data.

Export Data option from ArcGIS Online

The Export Data menu is the primary option to download data from ArcGIS Online. The tool generates an item within your content in ArcGIS Online that encompasses the data from the selected layers in different formats. You can then download the data from that item to be used in ArcGIS Pro, Microsoft Excel, and other products.

The tool can be accessed from the items page when you want to download the full dataset.

The Export Data option from ArcGIS Online
The Export Data option from ArcGIS Online

Now let’s review the output formats. Depending on your workflow, you might choose one over the other.

  • Use Export to Shapefile when most of your workflows are performed in ArcMap. For more information on this method, check out this knowledge base article.
  • Use Export to CSV file or Export to Excel when you want to use the data in a tabular format or for data analysis. When you export point features to these formats, all attribute fields and the x- and y-coordinates of each point are exported.  When exporting lines or polygons, only nonspatial attributes are extracted.
  • Export to KML ensures you can use the data in ArcGIS Earth and Google Earth.
  • Export to FGDB (file geodatabase) is the most comprehensive method of export. This is because it includes all the functionality applied at the feature class level, such as attribute domains, subtypes, contingent values, and attachments.
  • Use Export to GeoJSON for the open data format that supports a seamless integration with JavaScript frameworks for exchanging and visualizing geospatial data on the web.
  • Export to Feature Collection items are a subset of feature layers with focused and limited functionality.
  • Use Export to GeoPackage when your analysis spans ArcGIS products and includes open data source software.

The command can also be accessed from the Map Viewer. on the Analysis tab, the Extract Data tool allows for more customization than the option on the item page, such as the following:

  • You can extract data from multiple web layers from different sources as input.
The Extract Data tool - Multiple layers input
The Extract Data tool - Multiple layers input
  • Specify an extent to extract data, with the option to clip features based on that extent.
The Extract Data tool - Extent Settings
The Extract Data tool - Extent Settings
  • The ability to name the output file, which can only be a file geodatabase, .csv file, shapefile, or .kml file, and select the output folder.
The Extract Data tool - Output data format
The Extract Data tool - Output data format
  • The Environment settings pane allows you to define the output coordinate system and the processing extent.
The Extract Data tool - Output coordinate system
The Extract Data tool - Output coordinate system

If the web layer you want to export doesn’t have the export option, ensure the Allow others to export to different formats option is checked.

Export data format
Export data format

The output is a hosted item containing a downloadable .csv file, file geodatabase, .kml file, or shapefile. You will then use the layer options to download the file locally before the data can be migrated to an enterprise geodatabase.

Download option for the resulting file geodatabase
Download option for the resulting file geodatabase

For more guided information on how to troubleshoot exporting data, check out the Export Data option is unavailable in ArcGIS Online technical article. See Export data from hosted feature layers for additional information.

See the sections below for other alternatives to migrating ArcGIS Online data to an enterprise geodatabase directly in ArcGIS Pro.

Import or export data from ArcGIS Online using ArcGIS Pro

When accessing hosted feature layers in ArcGIS Pro, there are options available to import or export the data directly into an enterprise geodatabase.

First, it is necessary to connect to your ArcGIS Online account. You must be the owner of the data, or an administrator. If you are not the data owner or administrator, those users will need to share the dataset with you and configure the dataset to allow others to export the data. Sign in on the upper right corner of the ArcGIS Pro project.

Sign in to an ArcGIS Online account from ArcGIS Pro
Sign in to an ArcGIS Online account from ArcGIS Pro

With the goal to migrate the feature layer to an enterprise geodatabase, select your enterprise connection in the Catalog pane.

Import feature class to an enterprise geodatabase
Import feature class to an enterprise geodatabase

In this example, click Import, and select Feature Class(es). The Feature Class To Geodatabase geoprocessing tool opens.

Feature Class to Geodatabase geoprocessing tool
Feature Class to Geodatabase geoprocessing tool

Note: Choosing the Export option would also use the Feature Class To Geodatabase geoprocessing tool. One benefit of using Import is that it automatically populates the output enterprise geodatabase. Verify that the enterprise geodatabase connection is for the data owner.

On the Feature Class To Geodatabase geoprocessing tool, select the browse button 📁on the Input Features parameter. Select feature layers from ArcGIS Online or from a location downloaded from ArcGIS Online. As a reminder, you may need to extract the data first if the download is a .zip file.

Connect to Portal content from ArcGIS Pro
Connect to Portal content from ArcGIS Pro

Verify the output geodatabase connection and environment settings before running the geoprocessing tool. For example, the Environments tab includes the following options.

  • Preserve Global IDs.
  • Transfer Geodatabase Field Properties.
  • Import a subset of the data using the Extent environment.

Export Features option

Alternatively, consider migrating from ArcGIS Online to an enterprise geodatabase within an active map in ArcGIS Pro. After adding the desired hosted web feature layer to the map, we will explore the Export Features tool. Access the tool from the layer’s right-click context menu or from the Data tab on the ribbon. The output parameter can be set to convert the layer to a feature class directly in our enterprise geodatabase.

The Export Features option
The Export Features option

The tools allows for a single layer input, but with a variety of customization:

  • Define a SQL expression to select a subset of features.
  • Add, remove, reorder, and rename fields in the output feature class.
  • Change field data type and merge field values into a single field.
The Export Features geoprocessing tool
The Export Features geoprocessing tool

Finally, using the Environments tab, you can define a new coordinate system and preserve certain geodatabase functionality such as the following:

  • Maintain Attachments
  • Preserve Global IDs
  • Maintain fully qualitied field names
  • Transfer field domain descriptions
The Export Features geoprocessing tool - Environment settings
The Export Features geoprocessing tool - Environment settings

Note: You can also choose Export Table to export to a stand-alone table.

There will be examples when the web feature layer will have the export features option grayed out. Selecting the option to Export data avoids this situation. If you are a publisher in your organization and use ArcGIS Pro to share data with ArcGIS Online, ensure to enable the Export Data option during the publishing process. This controls whether a user, other than the portal administrator or data owner, can export the features from a web feature layer.

The Share As Web Layer pane - Export data option
The Share As Web Layer pane - Export data option

But if you are not a publisher of the hosted layer or an administrator to make changes to the existing web layer, try importing or exporting the data, as discussed earlier in this blog.

Download data from ArcGIS Online using ArcGIS API for Python

If you are a developer looking to eliminate manual steps or work with large volumes of data, you can download a copy of all your hosted web layers using the ArcGIS API for Python. To extract data from one or more layers within a given extent use the extract data method. The extracted data format can be a file geodatabase, shapefiles, csv, or kml. Download and extract data with zip files (such as File geodatabases and shapefiles) prior to using this method.

For more information, including guided steps and sample script check out the Download feature service items from ArcGIS Online using ArcGIS API for Python knowledge-based article.

Note: Consider a similar approach with the Extract Data task using the REST API.

Downloading services with attachments

Downloading large feature services with attachments using the REST API can be challenging due to file size limitations. However, you can manage this by splitting the data into smaller batches. You can export subsets of the feature service data with attachments to a replica from a REST endpoint.  Access this method from the View Details page. The Feature Service link opens the ArcGIS Rest Services Directory page. A where clause can be set to create a subset replica to an output URL. Once the replica creation completes, download the .zip file and reference the data to migrate to your enterprise geodatabase.

Access to the source feature service
Access to the source feature service

For more information on how to create a replica in ArcGIS REST API, refer to the following help page: Create Replica.

Migrating data from ArcGIS Online to an enterprise geodatabase provides a multitude of options to suit various workflow needs. You can use the Export Data menu to download data in formats such as CSV, KML, FGDB, and GeoJSON, each catering to different applications and software integrations. Additionally, ArcGIS Pro provides tools such as Feature Class To Geodatabase for importing and exporting data, ensuring a smooth transition. For developers, ArcGIS API for Python provides an automated solution for handling large volumes of data efficiently. By understanding and using these diverse options, organizations can ensure a seamless migration process, enhancing their geospatial data management capabilities.

For more data management resources check out the Geodatabase Resources Hub.

Share this article