Skip to main content
Question

How to get the OBJECTID and GLOBALID of features successfully written using Esri ArcGIS (AGOL) feature service

  • February 10, 2020
  • 3 replies
  • 193 views

Forum|alt.badge.img

I am using Esri ArcGIS Online(AGOL) feature service to write data from a database.

A flag column is to be maintained in database to check whether a feature is successfully written or not, based on that flag column we are further processing those records by another software.

How do I get the OBJECTID and GLOBALID of features which are successfully written to AGOL so that I can update the flag ?

3 replies

Forum|alt.badge.img+2
  • February 10, 2020

@rakeshent You'll only know what features were successfully written by reading them back.

Use the FeatureWriter to write your features to AGOL. At the bottom of the dialog expand the Output Ports panel and select One per Feature Type. This will pass through the features you've tried to write, but doesn't tell you which features were successfully inserted. Add a FeatureReader and query back the features you thought you wrote - this will be the actual features that were inserted. Add a second FeatureWriter to update your flag.


lars_de_vries
Forum|alt.badge.img+10

When you choose to write the features through the REST API with the HTTPCaller, you will get a response showing the OBJECTID for each succesfully written feature. With a second (QUERY) request with an HTTPCaller, you can also get the GLOBALID. This way you have both and you can write those back into your database.

For writing features with the HTTPCaller I use a JSONTemplater to get the structure correctly and use the GroupCounter and Aggregator to create sets of 1000 features that I can send with the HTTPCaller.

Before sending the features you can use the ArcGISOnlineTokenGetter to get a token the work with the REST API. You can use a FeatureMerger to merge the obtained token (uncondionally, both Requestor and Supplier get value 1 in 'Join On') to the sets of features you want to upload.


Forum|alt.badge.img
  • Author
  • February 19, 2020
lars_de_vries wrote:

When you choose to write the features through the REST API with the HTTPCaller, you will get a response showing the OBJECTID for each succesfully written feature. With a second (QUERY) request with an HTTPCaller, you can also get the GLOBALID. This way you have both and you can write those back into your database.

For writing features with the HTTPCaller I use a JSONTemplater to get the structure correctly and use the GroupCounter and Aggregator to create sets of 1000 features that I can send with the HTTPCaller.

Before sending the features you can use the ArcGISOnlineTokenGetter to get a token the work with the REST API. You can use a FeatureMerger to merge the obtained token (uncondionally, both Requestor and Supplier get value 1 in 'Join On') to the sets of features you want to upload.

Can you provide me some link or something for how I can use httpCaller to update or write the features in AGOL ?

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings