<?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: Scrape AGOL and Populate SDE Feature Classes in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/scrape-agol-and-populate-sde-feature-classes/m-p/1364642#M9460</link>
    <description>&lt;P&gt;Have not tried with tables, but for my HFS's, I make a list of the GLOBAL ID's in the HFS, and another list of the GLOBAL ID's in my SDE data.&amp;nbsp; Then, if the GID is in the HFS, but NOT in the SDE data, add that to a separate list that I can iterate through later.(AddPostList).&lt;/P&gt;&lt;P&gt;I then iterate through that list and append the data from the HFS to my SDE FC making sure to use the preserveGlobalIDs=True.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;L1Post = r"https://services3.arcgis.com/onlinesource/FeatureServer/1"
Post = r'Database Connections\SignDatabase.sde\SignsDatabase.DBO.Posts'

with arcpy.EnvManager(preserveGlobalIds=True, scratchWorkspace=r"\\pathto\scratch.gdb", workspace=r"\\pathto\Default.gdb"):
       Post = arcpy.management.Append(inputs=[L1Post], target=Post, schema_type="TEST", field_mapping="", subtype="", expression="GlobalID IN ('" + '\',\''.join(AddPostList) + "')")[0]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will keep the GLOBALID and the attachments as it copies them into the SDE data.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
    <pubDate>Wed, 27 Dec 2023 23:18:16 GMT</pubDate>
    <dc:creator>RhettZufelt</dc:creator>
    <dc:date>2023-12-27T23:18:16Z</dc:date>
    <item>
      <title>Scrape AGOL and Populate SDE Feature Classes</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/scrape-agol-and-populate-sde-feature-classes/m-p/1362011#M9426</link>
      <description>&lt;OL&gt;&lt;LI&gt;I have a couple Feature Classes and 9 Tables in AGOL.&amp;nbsp; The FC are related to the Tables.&lt;/LI&gt;&lt;LI&gt;I have these 2 FC and Tables in my oracle SDE environment.&lt;/LI&gt;&lt;LI&gt;I need to grab the data from AGOL and populate the SDE datasets WHILE retaining the GLOBALIDs.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;What is the best mechanism to do this?&lt;/P&gt;&lt;P&gt;I do not think you can export a FGDB and retain the GLOBALIDs????&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 15:07:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/scrape-agol-and-populate-sde-feature-classes/m-p/1362011#M9426</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-12-18T15:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Scrape AGOL and Populate SDE Feature Classes</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/scrape-agol-and-populate-sde-feature-classes/m-p/1362326#M9429</link>
      <description>&lt;P&gt;I think I had to do this once. I'm not positive, but I think the process was something like this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Use Create Replica to download the data&lt;/LI&gt;&lt;LI&gt;Run Append with the "Preserve Global IDs" environment setting.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The limitation is going to be with #2. I believe eGDB appended to FGDB doesn't work, but not sure about FGDB to eGDB. You may need to experiment with a test case.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 22:59:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/scrape-agol-and-populate-sde-feature-classes/m-p/1362326#M9429</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2023-12-18T22:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Scrape AGOL and Populate SDE Feature Classes</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/scrape-agol-and-populate-sde-feature-classes/m-p/1364642#M9460</link>
      <description>&lt;P&gt;Have not tried with tables, but for my HFS's, I make a list of the GLOBAL ID's in the HFS, and another list of the GLOBAL ID's in my SDE data.&amp;nbsp; Then, if the GID is in the HFS, but NOT in the SDE data, add that to a separate list that I can iterate through later.(AddPostList).&lt;/P&gt;&lt;P&gt;I then iterate through that list and append the data from the HFS to my SDE FC making sure to use the preserveGlobalIDs=True.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;L1Post = r"https://services3.arcgis.com/onlinesource/FeatureServer/1"
Post = r'Database Connections\SignDatabase.sde\SignsDatabase.DBO.Posts'

with arcpy.EnvManager(preserveGlobalIds=True, scratchWorkspace=r"\\pathto\scratch.gdb", workspace=r"\\pathto\Default.gdb"):
       Post = arcpy.management.Append(inputs=[L1Post], target=Post, schema_type="TEST", field_mapping="", subtype="", expression="GlobalID IN ('" + '\',\''.join(AddPostList) + "')")[0]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will keep the GLOBALID and the attachments as it copies them into the SDE data.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 23:18:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/scrape-agol-and-populate-sde-feature-classes/m-p/1364642#M9460</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-12-27T23:18:16Z</dc:date>
    </item>
  </channel>
</rss>

