I'm trying to use the ArcGIS Portal writer to 'update/overwrite records' in a layer. I'm using truncate and insert to remove the records before replacing them. I'm getting this error 'ArcGIS Portal Feature Service Writer: 'addResults' error for a feature in 'BranchTest.DBO.Hospitals_in_NJ'. The error code from the server was '-1' and the message was: '''. When viewing the portal item in Pro after running there are 'records' but all attributes are Null other than the Object ID. If I view the source referenced SDE layer there are no records. Any ideas?
hi @Andrew Baumgartner
Please use the article below to properly UPDATE existing feature services.
https://community.safe.com/s/article/how-do-i-write-updates-to-an-existing-arcgis-onlin
For the error that you have described, you will have to troubleshoot using the following Q&A
Troubleshoot ArcGIS Portal Mismatch Schema
Thanks I have things working for simple attribute updates now. Working on getting it set for inserts and deletes. Do I need a sperate Feature joiner for each output from the change detector or can I run them all into the 'right' input on the feature joiner? Also currently running into another issue when running an updated input in for the changes related to spatial references. The updated input shapefile has the same spatial reference as the original and is being fed into the same esri reprojector . As far as I can tell the only difference is in the name the _0 not sure why thats getting added.
FeatureJoiner (FeatureJoinerFactory): Rejecting input feature(s) with coordinate system 'SPHERICAL_MERCATOR' that do not match the first feature coordinate system '_SPHERICAL_MERCATOR_0'
Thanks I have things working for simple attribute updates now. Working on getting it set for inserts and deletes. Do I need a sperate Feature joiner for each output from the change detector or can I run them all into the 'right' input on the feature joiner? Also currently running into another issue when running an updated input in for the changes related to spatial references. The updated input shapefile has the same spatial reference as the original and is being fed into the same esri reprojector . As far as I can tell the only difference is in the name the _0 not sure why thats getting added.
FeatureJoiner (FeatureJoinerFactory): Rejecting input feature(s) with coordinate system 'SPHERICAL_MERCATOR' that do not match the first feature coordinate system '_SPHERICAL_MERCATOR_0'
I was able to get everything working. I found that needed to add coordinate system removers before the feature joiner and then set the coordinate system again after to fix the above error. Also found I needed to turn off feature caching to get the deletes and inserts to go through properly.
I was able to get everything working. I found that needed to add coordinate system removers before the feature joiner and then set the coordinate system again after to fix the above error. Also found I needed to turn off feature caching to get the deletes and inserts to go through properly.
That is great news, I am glad that you were able to resolve the issue.
Yes, Feature Caching can be a bit deceiving when performing UPDATES as the data is not being read directly from FeatureService. I would recommend trying Run Entire Workspace for these workflows.