Available with Standard or Advanced license.
In ArcGIS Pro, you can copy tables, feature classes, and views (hereafter referred to collectively as tables) from a relational database or a geodatabase and paste them into another relational database or geodatabase.
When you copy tables from one location and paste them into another, the data types used for the attributes in the tables may change. For example, if you copy a table from Microsoft SQL Server that has a UniqueIdentifier field and you paste it into a PostgreSQL database, the field in the table created in PostgreSQL will be a Varchar field.
Similarly, if the source table contains attributes that are not supported in the destination, those attributes will be dropped. For example, when you copy a table with m-values from an enterprise geodatabase and paste it into a database that doesn't support m-values, the m-values are dropped from the table that is created in the destination database.
ArcGIS cannot paste data types or definitions it doesn't support. That means a table you paste into a relational database or geodatabase will contain the following:
- Data types supported by ArcGIS
Any columns that cannot be mapped to an ArcGIS data type will not be created in the table in the target database or geodatabase.
- One spatial reference
If the source table has a spatial reference defined that ArcGIS recognizes, the same spatial reference is used for the table in the target location. If the spatial reference is not defined for the source table, ArcGIS uses the spatial reference of the first row in the table. Features that do not use that spatial reference are not included in the table in the target. If, instead, the spatial reference cannot be identified for the source table (for example, if a custom spatial reference is used), the spatial reference used in the target table varies depending on the target database management system.
If the target location does not support the spatial reference identified for the source table, the paste operation fails.
- One spatial column
When a table contains more than one spatial column, ArcGIS uses the first spatial column it encounters; no additional spatial columns will be created in the target table.
- One geometry type
ArcGIS reads the geometry type (point, line, polygon, or multipoint) of the first feature in the source table. Only those features that match the geometry type of the first row will be pasted into the table in the target location.
- One coordinate setting
ArcGIS reads the spatial coordinate properties (xy, xyz, xym, xyzm) stored with the first feature in the source table. All of the features in the table created in the target location will have the coordinate properties that exist on the first feature in the source table. For example, if the first feature in the source table has x,y, and z but not m coordinates, any features that had m coordinate information in the source table will not have it in the target table. Similarly, any feature that had only x,y coordinates in the source table will have x,y, and z coordinates in the target table. The z-coordinate for these features is set to 0.
If the target location does not support the coordinate settings, the paste operation fails. For example, if the first feature in the source table stores x, y, z, and m coordinates but the target location does not support z and m coordinates, you cannot paste the data into the target.
If the source table does not meet these requirements, you can prepare the data before copying it, as described in the following table:
Source table contains | Control what is used in the target |
---|---|
Unsupported data types | If possible, define a view on the source table that casts the unsupported data type to a supported data type. What is possible to cast depends on the data type and the database management system type. Copy the view from the data source and paste it into the target location to create a table that contains data types supported by ArcGIS. |
Multiple spatial columns | Define a view or a query layer on the source table that contains only the columns you require in the target table. Include only one spatial column. If you create a view, copy the view from the data source and paste it into the target location to create a table that contains the spatial column you included in the view. If you define a query layer on the source table, export the data from the query layer to create a table in the target database or enterprise geodatabase. |
Multiple geometry types | Create a query layer of the source table and define the geometry type for the query layer (point, multipoint, line, or polygon). Export the data from the query layer to the target database or enterprise geodatabase. The table created in the target location will contain only the features that match the geometry type you defined for the query layer. |
Multiple coordinate settings | To ensure all coordinate information is preserved in the target table, create a query layer of the source table and define its spatial properties to include m and z values. Next, export the data from the query layer to a table in the target database or enterprise geodatabase. All features in the table created in the target database or enterprise geodatabase will use the spatial coordinate settings you defined for the query layer. |
You can use the copy and paste menu functions or the Copy geoprocessing tool to copy data between relational databases and geodatabases.
The following steps explain how to use the copy and paste menu functions in ArcGIS Pro to copy a table, feature class, or view from one relational database or enterprise geodatabase and paste it into another database or enterprise geodatabase:
- Connect to both the source and target.
- If necessary, prepare the data to be moved so it meets ArcGIS requirements.
- Right-click the table, feature class, or view in the source database connection and click Copy.
- Right-click the target database connection in the Catalog pane and click Paste.
The data in the target database is owned by the login you specified in the database connection file for the target.
When you paste a view, it creates a table or feature class in the target database or geodatabase.
Note:
To paste data into a PostgreSQL or SQL Server database, the user connected to the target database must own a schema with the same name as the database username. In SQL Server, it must be the user's default schema.
The table or feature class, with all its content, is created in the target relational database or enterprise geodatabase.