In ArcGIS Pro 3.1, an "upsert" functionality was added to the Append GP tool, allowing you to designate updates to existing records in addition to adding new ones. This blog post outlines the functionality and says:
Use the Matching Fields for Update parameter to update existing records in the target dataset based on matching records in the input dataset. In this example, each zoning polygon has a unique Zone_ID. Therefore, any records from the target with a Zone_ID that matches records in the input dataset will update with values from the input. Note: You can also match based on multiple matching fields.
Using ArcGIS Pro 3.4.3, we're not seeing this perform as described. Instead, a duplicate of the matching record is added from the Input Dataset with the new attributes and geometry, while the original persists and remains unchanged. The schemas of the two datasets match (though they are in different FGDBs), and we're using a shared unique ID field to match the target and input fields. Afterward, I can do a Select By Attributes for that ID and both the original and appended feature will select, implying that the Unique ID does match. Have tried with and without the Update Geometry option checked, as well as the Enforce Domains option. Have also tried using a Selection vs a Where Query for the Input features.
Basically, it's always just doing a normal append, despite configuring the tool's Update Options. Has anyone else encountered this or found a solution? We found another upsert-related bug addressed in 3.2, but this seems to be the opposite of the issue we're having.
Solved! Go to Solution.
In studying this question, I believe this is BUG-000169082 - The Append tool fails to match features correctly when two or more matching fields are used and the input and target datasets are in different workspaces.
This behavior is not seen if the input and target datasets are in the same workspace.
In studying this question, I believe this is BUG-000169082 - The Append tool fails to match features correctly when two or more matching fields are used and the input and target datasets are in different workspaces.
This behavior is not seen if the input and target datasets are in the same workspace.
Hi Robert @Robert_LeClair , thanks for the BUG link. That does sound like a similar issue, although in my case I'm only using one matching field, not "two or more".
While this isn't a solution for us—I did see the tool work as expected by publishing a copy of the data to a hosted feature service in ArcGIS Online, and then running the tool directly against that service as the Target Dataset. It was the same data I was using before—so the only difference was that instead of two local FGDBs, it was one local FGDB and one hosted feature service. Unsure why it would work that way but not with the local data... unless it is all just an extension of that same bug.
I will try and put a copy of both datasets (input and target) into the same workspace and see if that serves as a workaround. Thanks.
@Robert_LeClair This was the solution, thank you. I added a copy of my input data to the same FGDB as my target data and the tool worked as expected. Hopefully tis bug is eventually addressed so we can avoid the extra step, but this will work for now.
Agreed @AaronKoelker - I hope the ArcGIS Pro Dev Team are able to fix this BUG soon! All the best!