<?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 Possible to NOT Drop Dependent Objects when using arcpy.Delete_management tool on SDE feature class in PostgreSQL geodatabase? in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/possible-to-not-drop-dependent-objects-when-using/m-p/1586628#M9509</link>
    <description>&lt;P&gt;We have a PostgreSQL Geodatabase that we replicate a subset of our production GIS data into every day. Production GIS data is extracted into a file geodatabase, we then use the arcpy.Delete_Management() tool to delete all sde existing objects in the target schema (schema is called repl) in the PostgreSQL database, and then use the arcpy.Copy_management() tool to copy feature classes and tables from the file geodatabase into the repl schema in the PostgreSQL geodatabase. We use the Delete/Copy tools rather than truncate/append because we need to maintain the OBJECTID field of all feature classes and tables when we load data from the file geodatabase into Postgres.&lt;/P&gt;&lt;P&gt;We have many views built against the feature classes/tables in repl schema. When all the sde objects get deleted every night, it also drops all dependent views. I understand that this is expected behavior in a PostgreSQL database. We use the same workflow in a SQL Server geodatabase, and the Delete tool does NOT drop dependent views.&lt;/P&gt;&lt;P&gt;I was wondering if there is a way to delete all the sde objects in a PostgreSQL schema without also dropping dependent views? If not, are there any suggestions for a daily workflow that 1) uses a file geodatabase as source 2) postgresql geodatabase as target 3) maintains the OBJECTID values when loading feature classes/tables from fgdb to postgresql and 4) doesn't drop views dependent on the feature classes/tables that are being refreshed?&lt;/P&gt;</description>
    <pubDate>Tue, 18 Feb 2025 20:45:11 GMT</pubDate>
    <dc:creator>AlexZarley1</dc:creator>
    <dc:date>2025-02-18T20:45:11Z</dc:date>
    <item>
      <title>Possible to NOT Drop Dependent Objects when using arcpy.Delete_management tool on SDE feature class in PostgreSQL geodatabase?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/possible-to-not-drop-dependent-objects-when-using/m-p/1586628#M9509</link>
      <description>&lt;P&gt;We have a PostgreSQL Geodatabase that we replicate a subset of our production GIS data into every day. Production GIS data is extracted into a file geodatabase, we then use the arcpy.Delete_Management() tool to delete all sde existing objects in the target schema (schema is called repl) in the PostgreSQL database, and then use the arcpy.Copy_management() tool to copy feature classes and tables from the file geodatabase into the repl schema in the PostgreSQL geodatabase. We use the Delete/Copy tools rather than truncate/append because we need to maintain the OBJECTID field of all feature classes and tables when we load data from the file geodatabase into Postgres.&lt;/P&gt;&lt;P&gt;We have many views built against the feature classes/tables in repl schema. When all the sde objects get deleted every night, it also drops all dependent views. I understand that this is expected behavior in a PostgreSQL database. We use the same workflow in a SQL Server geodatabase, and the Delete tool does NOT drop dependent views.&lt;/P&gt;&lt;P&gt;I was wondering if there is a way to delete all the sde objects in a PostgreSQL schema without also dropping dependent views? If not, are there any suggestions for a daily workflow that 1) uses a file geodatabase as source 2) postgresql geodatabase as target 3) maintains the OBJECTID values when loading feature classes/tables from fgdb to postgresql and 4) doesn't drop views dependent on the feature classes/tables that are being refreshed?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 20:45:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/possible-to-not-drop-dependent-objects-when-using/m-p/1586628#M9509</guid>
      <dc:creator>AlexZarley1</dc:creator>
      <dc:date>2025-02-18T20:45:11Z</dc:date>
    </item>
  </channel>
</rss>

