Hello,
I am having an issue when trying to overwrite a feature layer in ArcGIS Portal. It writes first time fine, but fails to overwrite.
A bit of background of what I am trying to. The workbench reads in a ODBC connection, performs multiple joins, creates vertices based off lat and lng, then writes to ArcGIS Portal.
As mentioned, this is writing fine but I noticed an issue when trying to overwrite the file. The error message is:
ArcGIS Portal Feature Service Writer: Encountered an unexpected error. The error code from the server was '500' and the message was: 'JSONObjectj"globalId"] not found.'. Details: ''
ARCGISPORTALFEATURES writer: A fatal error has occurred. Check the logfile above for details
I have had a similar issue before when performing a similar task, and I created a forum post discussing the issue - Error when trying to overwrite an existing ArcGIS Portal feature (safe.com)
The issue doesn't actually seem to be anything to do with a Global ID (I am not actually using one). It got mentioned in here that the problem was likely to do with integers, and casting the integers using Attribute Manager was the first thing to do. I think what actually sorted that workbench in the end was using SubstringExtractor, as one of the attributes had a field length issue and using substring extractor sorted it and let the workbench overwrite.
However on this new workbench, which is totally different data but still publishing the end product to Portal, I don’t have any integers in my data. I have two date fields then the rest are strings.
Based on what I learned from the above forum post, I carried out some additional steps including using AttributeRemover to remove some attributes which weren’t really required and could potentially cause issues. But I still had problems so I used AttributeRenamer to ensure all fields were lowercase and didn’t contain spaces, as this had causes issues before, but that wasn’t it.
Another user in the forum post above mentioned they had this issue also, and it was due to the string character count exceeding the size allowed in the feature layer. In a couple of fields I did have some records which had over 1k characters, so in my workbench I used a substring extractor to only allow 100 characters, but that didn’t seem to work.
I am out of ideas now so any suggestions please let me know. The data is sensitive so I don't really want to share the raw data, but attached is an image of the workbench.
Thanks