Select to view content in your preferred language

Transfering Data to a Database

535
11
05-22-2024 06:28 AM
Labels (2)
Ozan
by
New Contributor

Edit: Today I wrote two posts detailing what I tried, to solve the problem and the results (yes, unsuccessful). Both were deleted, no explanation, no reason, just gone. From my point of view, esri does not actually want to help me here.

 

0 Kudos
11 Replies
Ozan
by
New Contributor

I forgot, we are using ArcGIS Desktop 10.7.1

0 Kudos
George_Thompson
Esri Frequent Contributor

What is the version of the RDBMS and geodatabase?

What are the permissions of the user you are connecting as to load the data?

--- George T.
0 Kudos
Ozan
by
New Contributor

I was told that it's Geoserver 2.23 using latest Postgresql database.

User is admin on the postgresql server.

0 Kudos
George_Thompson
Esri Frequent Contributor

I am wondering if the latest version of PostgreSQL is causing an issue with ArcMap 10.7.1. Here are the supported versions for 10.7.1: https://desktop.arcgis.com/en/system-requirements/10.7/database-requirements-postgresql.htm

What is the specific version of PostgreSQL (version + patch level)?

Is the PostgreSQL DB an Enterprise Geodatabase?

Can you test with the latest version of ArcGIS Pro (3.3)?

--- George T.
0 Kudos
MarceloMarques
Esri Regular Contributor

@Ozan - Tip to test the data load of the shapefile into the PostgreSQL ArcSDE Geodatabase.

1. Import the shapefile into a File Geodatabase

2. export the file geodatabase featureclass to XML Document Schema-Only ( no data )

3. import the XML Document Schema-Only into the PostgreSQL Geodatabase

4. Use the ArcCatalog Simple Data Loader to load the data from the File Geodatabase Featureclass into the PostgreSQL Geodatabase Featureclass


About the error message.

Underlaying DBMS error [ERROR: duplicate key value violates unique constraint "test1_pkey"

Detail: Key (objectid)=(867896168) already exists.

(cbs.user342.test1)::SQLSTATE=23505]

The source data in the shapefile might have duplicated values for a column that needs to be unique, and you might need to clean up the data before you can load the data in a File Geodatabase and in the PostgreSQL Geodatabase.

You can access the PostgreSQL Geodatabase via PgAdmin and look the Featureclass table and inspect the details of the "test1_pkey" unique constraint and which column it refers and then check if the data of the column has unique values.

I hope this helps.

| Marcelo Marques | Principal Product Engineer | Esri |
| Cloud & Database Administrator | OCP - Oracle Certified Professional |
I work with Enterprise Geodatabases since 1997.
“ I do not fear computers. I fear the lack of them." Isaac Isimov
0 Kudos
Ozan
by
New Contributor

I tried this, nothing changed, same error. "test1_pkey" is the objectid column, the one ArcGIS creates while creating a shapefile in a database.

0 Kudos
VinceAngelo
Esri Esteemed Contributor

An insanely large objectid (shapefiles can't store 80M features, much less 867+M) wakes me wonder what your exact procedure is.

Admin rights is not a particularly good feature for a geodatabase connection.

Pro (or ArcMap or ArcCatalog) can create new tables from shapefile or file geodatabase with drag-and-drop, with or without a geodatabase enabled, but the database name and username must be lowercase and the default schema for the login must match (e.g., login 'dataloader', schema 'dataloader').

- V

MarceloMarques
Esri Regular Contributor

@Ozan - best practices to create the PostgreSQL Geodatabase.

Mapping and Charting Solutions (MCS) Enterprise Da... - Esri Community

Best Practices Production Mapping 3.x Workspace in PostgreSQL® 
| Marcelo Marques | Principal Product Engineer | Esri |
| Cloud & Database Administrator | OCP - Oracle Certified Professional |
I work with Enterprise Geodatabases since 1997.
“ I do not fear computers. I fear the lack of them." Isaac Isimov
0 Kudos
Ozan
by
New Contributor

Sorry for late reply, I had some other work and could not look into this. While I tried loading and importing data without much success, I noticed a thing. On some attempts, arcgis manages to import one ot two data into database. The objectids of the data in database is like; 1243424325. That long, on one occasion even with negative number like -1234245656.

I tried a couple more import and at last created a new shapefile with no Z or M values,with just id and shape* columns.I copied only vector data to this file and I could not import that file or load the data either. I checked geometry and it gives no problems. I have city centers data, point shapefile. Very simple and I can not import or load data of that either. Arcgis does create table but does not fill it. I get Error 000224 can not insert features while trying to import. And the same error I mentioned in the first post when i try to load data, and maybe a single data with a weird long objectid.

0 Kudos