Select to view content in your preferred language

Merge old survey data into new survey - Append fails for tables, not for feature layer

1346
6
02-22-2018 11:21 AM
WetherbeeDorshow
Regular Contributor

We recently replaced a survey based on a hosted feature service with a new survey (also hosted on AGOL), and we want to merge the old data into the new feature layer and associated tables. The surveys and associated data are virtually identical, consisting of one feature layer and four tables. Using the append tool, I was able to append all records from the old feature layer to the new one without an issue, but when I try to append any of the tables to their respective new version , I get the following error:

ERROR 999999: Error executing function.
General function failure [The INSERT statement conflicted with the FOREIGN KEY constraint "REL_FK_service_49777005691e49229df0a83fcb5485e8_PARTIES_INVOLVED_0". The conflict occurred in database "db_2177", table "user_2177.service_49777005691e49229df0a83fcb5485e8_WHITECARD_17_18", column 'globalid'.
The statement has been terminated.]
Failed to execute (Append).

To troubleshoot, I tried the same append multiple times, with the "Preserve Global IDs" option turned off and on; and removing the globalid field from the field map. No dice.

How can I get these old records into the new tables? 

I can do this in an enterprise geodatabase without issue, but not with this hosted survey.

Thanks

Tags (2)
0 Kudos
6 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Wetherbee,

Can you confirm that duplicate globalid values have not cropped into your data (say, by examining the Excel download or in ArcGIS Desktop?).  This might also be better asked in https://community.esri.com/community/gis/web-gis/arcgisonline?sr=search&searchId=89f7d593-2186-40cc-...‌ as it relates to core ArcGIS Online functionality.

WetherbeeDorshow
Regular Contributor

Just entered a support case on this and was informed that we are likely looking at a bug - BUG-000103223: Hosted feature services in ArcGIS Online fail to edi.. . While the description on the support page related to this bug is not exactly what I am experiencing, we are fairly sure this is the root cause. 

If the services were not hosted, I could easily merge the tables and be done with this. I suppose we could try this, then recreate the survey from a non-hosted feature service, but that is lots of work and makes AGOL/S123 more complex to manage.

As it stands, for an AGOL-hosted workflow, it appears that old surveys with one or more related tables cannot be merged into new ones with one or more surveys.

0 Kudos
WetherbeeDorshow
Regular Contributor

I can confirm that the problem is not related to duplicate Global IDs. Thanks

0 Kudos
WetherbeeDorshow
Regular Contributor

Note that I had enabled sync and editor tracking on the hosted feature service created by Survey 123 (for use with other functionality). I wonder if this could have anything to do with it. I might try creating a new survey and leaving the AGOL hosted feature service settings as is, then try appending.

0 Kudos
WetherbeeDorshow
Regular Contributor

Changing the sync status (per my previous note)did not fix the issue.

0 Kudos
RobBlash
Frequent Contributor

The description on that bug is confusing, but I think this is causing me to have the same "The INSERT statement conflicted with the FOREIGN KEY constraint" error.

0 Kudos