<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Postgres Identity/Generated Columns do not work with Append to Esri Enterprise Geodatabase in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/postgres-identity-generated-columns-do-not-work/m-p/1264942#M35323</link>
    <description>&lt;DIV class=""&gt;&lt;P&gt;I want to set a column as an integer primary key separate from what Esri maintains. This is so it can exist in non-spatial tables and the features retain the key as they exist across other tables.&lt;/P&gt;&lt;P&gt;The problem is, if a field is set to Identity or Generated column, it does not allow direct inserts/updates to write to the field. I want these values populated at the time of appending to the layer via ArcGIS Pro.&lt;/P&gt;&lt;P&gt;The way the append tool works is it generates a prepared statement listing all the fields and all the values in the destination table -- even if they aren't referenced/mapped during the append. This prevents the load from working because it is trying to insert/update on the Identity field instead of letting it do its own thing.&lt;/P&gt;&lt;P&gt;I am looking at DB triggers to do this but it doesn't seem like a clean approach. I've also thought about running the incrementing integer field on the table in pro but that only works on unregistered layers. Any ideas?&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;STATEMENT: INSERT INTO poi_gdb.poi.poi_raw (objectid, name, primary_category, secondary_category, osm_unique_id, shape, poi_id, processed_timestamp) VALUES ( $1, $2, $3, $4, $5, $6 , $7, $8)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 07 Mar 2023 15:24:18 GMT</pubDate>
    <dc:creator>Zartico-GIS</dc:creator>
    <dc:date>2023-03-07T15:24:18Z</dc:date>
    <item>
      <title>Postgres Identity/Generated Columns do not work with Append to Esri Enterprise Geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/postgres-identity-generated-columns-do-not-work/m-p/1264942#M35323</link>
      <description>&lt;DIV class=""&gt;&lt;P&gt;I want to set a column as an integer primary key separate from what Esri maintains. This is so it can exist in non-spatial tables and the features retain the key as they exist across other tables.&lt;/P&gt;&lt;P&gt;The problem is, if a field is set to Identity or Generated column, it does not allow direct inserts/updates to write to the field. I want these values populated at the time of appending to the layer via ArcGIS Pro.&lt;/P&gt;&lt;P&gt;The way the append tool works is it generates a prepared statement listing all the fields and all the values in the destination table -- even if they aren't referenced/mapped during the append. This prevents the load from working because it is trying to insert/update on the Identity field instead of letting it do its own thing.&lt;/P&gt;&lt;P&gt;I am looking at DB triggers to do this but it doesn't seem like a clean approach. I've also thought about running the incrementing integer field on the table in pro but that only works on unregistered layers. Any ideas?&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;STATEMENT: INSERT INTO poi_gdb.poi.poi_raw (objectid, name, primary_category, secondary_category, osm_unique_id, shape, poi_id, processed_timestamp) VALUES ( $1, $2, $3, $4, $5, $6 , $7, $8)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 07 Mar 2023 15:24:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/postgres-identity-generated-columns-do-not-work/m-p/1264942#M35323</guid>
      <dc:creator>Zartico-GIS</dc:creator>
      <dc:date>2023-03-07T15:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Postgres Identity/Generated Columns do not work with Append to Esri Enterprise Geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/postgres-identity-generated-columns-do-not-work/m-p/1295200#M36134</link>
      <description>&lt;P&gt;Have you considered an insert cursor? It would take arcpy but it may allow you to functionally append records without using the "Append" geoprocessing tool.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/insertcursor-class.htm" target="_blank"&gt;InsertCursor—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 21:53:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/postgres-identity-generated-columns-do-not-work/m-p/1295200#M36134</guid>
      <dc:creator>Waan</dc:creator>
      <dc:date>2023-06-01T21:53:18Z</dc:date>
    </item>
  </channel>
</rss>

