ArcGIS Pro 2.5
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)
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).
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.
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.
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.
Any guidance or feedback on this topic would be greatly appreciated. I have attached my python function as an attachment to this post.
Thanks for the time!