<?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 Re: Use Python to Truncate &amp;amp; Load Data between 2 geodatabases in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/use-python-to-truncate-amp-load-data-between-2/m-p/1290901#M69341</link>
    <description>&lt;P&gt;Please clarify whether you mean "&lt;SPAN&gt;6 features" or 6 feature &lt;EM&gt;classes&lt;/EM&gt;.&amp;nbsp; A geodatabase (either file or enterprise) can hold multiple feature classes. A feature class can have multiple features.&amp;nbsp; To use a file system analogy, a directory/folder (geodatabase) can hold many text files (feature classes). A text file can store many lines of text (features).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Truncate means to remove &lt;EM&gt;all&lt;/EM&gt; features from a feature class, the feature class is not removed. The code I provided does that for the 6 specified feature classes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you actually mean you have 6 features you need to delete from a single feature class in one gdb and then replace those features with 6 features selected from another feature class in a different gdb?&lt;/P&gt;&lt;P&gt;If so, truncate is definitely not what you want. You need to select the features you want to delete (e.g. select by attribute/location tools or make feature layer tool with a where clause) in your script and then run delete features tool.&lt;/P&gt;</description>
    <pubDate>Fri, 19 May 2023 00:20:40 GMT</pubDate>
    <dc:creator>Luke_Pinner</dc:creator>
    <dc:date>2023-05-19T00:20:40Z</dc:date>
    <item>
      <title>Use Python to Truncate &amp; Load Data between 2 geodatabases</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/use-python-to-truncate-amp-load-data-between-2/m-p/1287247#M68953</link>
      <description>&lt;P&gt;I want to automate the truncate &amp;amp; loading of data between 2 enterprise geodatabases using python.&lt;/P&gt;&lt;P&gt;There are 6 features which are mixture of polygon &amp;amp; point features.&lt;/P&gt;&lt;P&gt;Has anyone got any idea how to code this simply?&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 14:17:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/use-python-to-truncate-amp-load-data-between-2/m-p/1287247#M68953</guid>
      <dc:creator>AndrewReynoldsDevon</dc:creator>
      <dc:date>2023-05-09T14:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Use Python to Truncate &amp; Load Data between 2 geodatabases</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/use-python-to-truncate-amp-load-data-between-2/m-p/1287504#M68986</link>
      <description>&lt;P&gt;Assuming two separate geodatabases with all feature classes having the same name and schema:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;feature_classes = ["fc1", "fc2", "fc3", "etc..."]

for feature_class in feature_classes:
    
    arcpy.management.TruncateTable(f"dir:/path/to/connection1.sde/schema.{feature_class}")
    arcpy.management.Append([f"dir:/path/to/connection2.sde/schema.{feature_class}"], 
                            f"dir:/path/to/connection1.sde/schema.{feature_class}", 
                            "TEST")&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 09 May 2023 23:44:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/use-python-to-truncate-amp-load-data-between-2/m-p/1287504#M68986</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2023-05-09T23:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Use Python to Truncate &amp; Load Data between 2 geodatabases</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/use-python-to-truncate-amp-load-data-between-2/m-p/1287572#M68992</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It's not all of the features from the geodb just 6 of them &amp;amp; they're enterprise db's so I have connection files for each geodb. How would I specify those in the script above? Also I need to be sure I only truncate/amend the 6 features &amp;amp; not the other features within the geodb&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 07:11:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/use-python-to-truncate-amp-load-data-between-2/m-p/1287572#M68992</guid>
      <dc:creator>AndrewReynoldsDevon</dc:creator>
      <dc:date>2023-05-10T07:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Use Python to Truncate &amp; Load Data between 2 geodatabases</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/use-python-to-truncate-amp-load-data-between-2/m-p/1290901#M69341</link>
      <description>&lt;P&gt;Please clarify whether you mean "&lt;SPAN&gt;6 features" or 6 feature &lt;EM&gt;classes&lt;/EM&gt;.&amp;nbsp; A geodatabase (either file or enterprise) can hold multiple feature classes. A feature class can have multiple features.&amp;nbsp; To use a file system analogy, a directory/folder (geodatabase) can hold many text files (feature classes). A text file can store many lines of text (features).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Truncate means to remove &lt;EM&gt;all&lt;/EM&gt; features from a feature class, the feature class is not removed. The code I provided does that for the 6 specified feature classes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you actually mean you have 6 features you need to delete from a single feature class in one gdb and then replace those features with 6 features selected from another feature class in a different gdb?&lt;/P&gt;&lt;P&gt;If so, truncate is definitely not what you want. You need to select the features you want to delete (e.g. select by attribute/location tools or make feature layer tool with a where clause) in your script and then run delete features tool.&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 00:20:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/use-python-to-truncate-amp-load-data-between-2/m-p/1290901#M69341</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2023-05-19T00:20:40Z</dc:date>
    </item>
  </channel>
</rss>

