Select to view content in your preferred language

ArcGIS Pro Truncate Table GP Tool Could Work on Portal Hosted Feature Layer

2485
11
07-19-2022 05:09 PM
Status: Already Offered
Labels (1)
TimMinter
Regular Contributor

Truncate Table GP tool would work faster than the Delete Features GP tool, and it would reset the ObjectID values instead of incrementing them from the highest number left over from Delete Features.

That would surely be better.

Cheers,

tim

11 Comments
LindsayRaabe_FPCWA

Hi All ( @PeterHodkinson @RussellBrennan @KoryKramer @TimMinter ). I have got the below information back from ESRI Inc. and have tested to confirm that it does work as advertised. 

Esri Inc. have provided a response to this case. During in-house testing, Esri Inc. observed the following:

  • Published a hosted feature layer to ArcGIS Online via ArcGIS Pro
  • Accessed its item details page and enabled "Editing" privileges
  • Accessed the admin JSON of the hosted feature layer > Update Definition > confirmed that "supportsTruncate : false"
  • Now accessed the child layer > Update Definition > observed that "supportsTruncate : true" < I can't seem to access the Update Definition option for the child layer so couldn't confirm this
  • In ArcGIS Pro, added it to a new map and was able to execute "Truncate Table" tool over it without any issues.
  • In ArcGIS Pro the above tool (either as a model or geoprocessing) fails to execute if the "Enable sync" privileges are enabled for the hosted feature layer.

They provided a video of the testing steps which I have attached to this email (There is no sound on this video)

Check and confirm if the "Editing" privileges are enabled and "Sync" is disabled for the end user's layer in ArcGIS Online.

Additionally, Esri Inc. found the following bug details:

  • BUG-000155843 - Using the REST API Update Definition to set "supportsTruncate : false" results in a successful JSON response, however the setting is unchanged
  • Public status - New

To summarise, it doesn't matter what the supportsTruncate line is set to in the service definition, the tool in ArcGIS Pro will work as long as the data is not enabled for offline use

Where I was using the early discussed python method of truncate/append and have replaced with the GP tools Truncate Table and Append, it has sped up the model as it's much faster to run. Unfortunately, where I update layers which are offline enabled, I still have to use the python solution, but at least the option is there! Now only 2 out of 5 sets of data use the python solution.