1

Is it possible to edit or add data from ArcGIS Pro (2.8.3, working with .gdb files) to PostgreSQL (PostGIS enabled), without ArcGIS Server ?

I already have a connection to PostgreSQL, and can see PostgreSQL stored layers in ArcGIS Pro. But it seems I can't edit or add data in Postgres. I'm used to QGIS where it's a straightforward process, but working from ArcGIS Pro only is mandatory here.

What I've tried :

  • Directly edit the PostgreSQL layer : ArcGIS doesn't seems to allow it
  • Right click on PostgreSQL DB and import : "Feature class to Feature class", ends up in "ERROR 000210: Cannot create output"
  • Append tool (using a layer in my local .gdb as input) : ends up in "ERROR 160236: The operation is not supported by this implementation"

Checking ESRI documentation I have everything set up correctly. I've seen this post asking the same question and getting the same results, but the final anwser is unclear to me and I have an ArcGIS Pro Advanced license.

I also tried create new data in a database but it ends up in "ERROR 999999: Something unexpected caused the tool to fail." Reading the details it seems to try create a new table in a schema named after my username that doesn't exists, and I can't find where to parameter the schema ?

Others anwers here use ArcMap rather than ArcGIS Pro like Editing PostGIS layer from ArcMap without Enterprise Geodatabase (ArcSDE), or use others tools like ogr2ogr.

I also don't have the rights on PostgreSQL to create new schemas, or make modifications like adding the st-geometry type to -postgresql (even if I can't tell if this would be useful)

Is there any way I can make any type of modification on PostgreSQL staying in ArcGIS Pro ?

MaxPlank
  • 116
  • 10
  • 1
    I use FeatureClassToFeatureClass into PostgreSQL/PostGIS without geodatabase enablement on a daily basis. Having a schema identical to the login is the only requirement. Since you've identified that as the issue, it's curious that you haven't tried it. – Vince Nov 09 '21 at 11:49
  • @Vince I had identified that as the issue for 'create a new data in database', I didn't suspect it was the same for 'FeatureClassToFeatureClass', that's a great information. However I'm not allowed to create new schema. Should the question be more about adding or editing data in an existing schema that is not named as my login ? – MaxPlank Nov 09 '21 at 12:46
  • 1
    ArcGIS tools will, since 10.4, let you do an astounding number of things in a PostgreSQL/PostGIS database without a Server license and enabled geodatabase, but it is an absolute requirement for new table creation (FeatureClassToFeatureClass, FeatureClassToGeodatabase, CreateFeatureclass, CreateTable,...) that the schema match the login name. Append and DA cursors should work fine against a schema not your own. You cannot use the geodatabase editor without an enabled geodatabase (Server license). – Vince Nov 09 '21 at 13:13
  • To make it as clear as possible, you talks about 'new table creation' but is it the same for edition of existing tables ? – MaxPlank Nov 09 '21 at 13:21
  • No, new table creation is very different than modification of existing tables. I don't think I've ever tried an Append or da.InsertCursor on a table I didn't own (which is why these are comments, and not an answer), but I suspect they will work (if data is already present). arcpy.ArcSDESQLExecute absolutely functions as a generic SQL cursor. – Vince Nov 09 '21 at 13:32
  • I've been able to make a test with a schema that match the login name, and you're right that was the issue for new table creation. But I'm still struggling with updates using Append (updated my post with the error). But Copy works fine and I'm able to entirely replace an online table (that I don't even own) with it – MaxPlank Nov 12 '21 at 07:52
  • I maintain tens of millions of rows in a non-enabled database just through FC2FC/T2T and SQL (upload to temp table, then TRUNCATE/INSERT or UPDATE/INSERT/DELETE; my INSERT's SELECTs always have ORDER BYs for optimal performance). – Vince Nov 12 '21 at 12:54
  • but are you talking about editing a ArcGIS Pro geodatabase created over PostgreSQL, or to a PostgreSQL/PostGIS created through pgadmin or QGIS? Its not the same. If its the first case you can do everything but you need the appropriatte licensing to create the geodatabase. If its the second case, I have only been able to read data with a query layer, not write or edit. As far as I know, It can't be done – Oskar Karlsson Feb 14 '22 at 21:10

0 Answers0