<?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 Corrupt/Lose Data when Overwriting Hosted Table in Portal with .CSV via Python and ArcGIS Pro in Publishing and Managing Services Questions</title>
    <link>https://community.esri.com/t5/publishing-and-managing-services-questions/corrupt-lose-data-when-overwriting-hosted-table-in/m-p/1018142#M296</link>
    <description>&lt;P&gt;&lt;STRONG&gt;ArcGIS Pro 2.5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Python 3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Portal 10.8.1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 6 hosted tables in my Portal that are used in various dashboards and maps. These are updated each day via a python program. At some point in the overwrite process something happens that knocks out my data source and the data no longer exists for that specific hosted table. I see the layer in my portal but when I go to its details page there is no data in the data tab -- instead it only says "There was an error". (See side by side of hosted table that has been corrupted and a valid table below)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="portalissue.JPG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4107i04A89F22289D7BEB/image-size/large?v=v2&amp;amp;px=999" role="button" title="portalissue.JPG" alt="portalissue.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If this happens I can no longer overwrite the service anymore. It remains visible as a selection in my portal layers, but when I choose the table to overwrite it comes back with the error, "Unable to retrieve information for the existing item." I have to delete the table and service definition in portal and then re-publish. Then I can again successfully overwrite on this new table. The loss of the table also obviously affects my dashboards and maps too. (Error seen when I try to overwrite through ArcGIS Pro, below).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="proerror.png" style="width: 290px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4109i41F2396F260235AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="proerror.png" alt="proerror.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This does not happen frequently. It has happened maybe 3 times in 6 months of daily overwrites over 6 different tables. It is not always the same table either.&lt;/P&gt;&lt;P&gt;My overwrite process is using a python 3 program that loops over a list of my portal tables, overwriting each via a CSV file saved within a separate ArcGIS Pro project.&lt;/P&gt;&lt;P&gt;I am thinking the error/issue is introduced somehow via the service definition (.sd) files. In my python script that does the overwrite I save the .sd to a relative path each of the 6 times through the loop.&lt;/P&gt;&lt;P&gt;Any guidance or feedback on this topic would be greatly appreciated. I have attached my python function as an attachment to this post.&lt;/P&gt;&lt;P&gt;Thanks for the time!&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jan 2021 21:56:17 GMT</pubDate>
    <dc:creator>LORAMAdmin</dc:creator>
    <dc:date>2021-01-19T21:56:17Z</dc:date>
    <item>
      <title>Corrupt/Lose Data when Overwriting Hosted Table in Portal with .CSV via Python and ArcGIS Pro</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/corrupt-lose-data-when-overwriting-hosted-table-in/m-p/1018142#M296</link>
      <description>&lt;P&gt;&lt;STRONG&gt;ArcGIS Pro 2.5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Python 3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Portal 10.8.1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 6 hosted tables in my Portal that are used in various dashboards and maps. These are updated each day via a python program. At some point in the overwrite process something happens that knocks out my data source and the data no longer exists for that specific hosted table. I see the layer in my portal but when I go to its details page there is no data in the data tab -- instead it only says "There was an error". (See side by side of hosted table that has been corrupted and a valid table below)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="portalissue.JPG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4107i04A89F22289D7BEB/image-size/large?v=v2&amp;amp;px=999" role="button" title="portalissue.JPG" alt="portalissue.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If this happens I can no longer overwrite the service anymore. It remains visible as a selection in my portal layers, but when I choose the table to overwrite it comes back with the error, "Unable to retrieve information for the existing item." I have to delete the table and service definition in portal and then re-publish. Then I can again successfully overwrite on this new table. The loss of the table also obviously affects my dashboards and maps too. (Error seen when I try to overwrite through ArcGIS Pro, below).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="proerror.png" style="width: 290px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4109i41F2396F260235AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="proerror.png" alt="proerror.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This does not happen frequently. It has happened maybe 3 times in 6 months of daily overwrites over 6 different tables. It is not always the same table either.&lt;/P&gt;&lt;P&gt;My overwrite process is using a python 3 program that loops over a list of my portal tables, overwriting each via a CSV file saved within a separate ArcGIS Pro project.&lt;/P&gt;&lt;P&gt;I am thinking the error/issue is introduced somehow via the service definition (.sd) files. In my python script that does the overwrite I save the .sd to a relative path each of the 6 times through the loop.&lt;/P&gt;&lt;P&gt;Any guidance or feedback on this topic would be greatly appreciated. I have attached my python function as an attachment to this post.&lt;/P&gt;&lt;P&gt;Thanks for the time!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 21:56:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/corrupt-lose-data-when-overwriting-hosted-table-in/m-p/1018142#M296</guid>
      <dc:creator>LORAMAdmin</dc:creator>
      <dc:date>2021-01-19T21:56:17Z</dc:date>
    </item>
  </channel>
</rss>

