JSON adapter for Adding Features

2409
5
12-18-2013 09:47 AM
New Contributor III
I'm having issue when adding duplicate features when bringing in JSON adapters.  How does when adding features to a layer, does it identify the unique features.

I've set a track id on my unique ID column, but only the Update feature Output has that as a parameter.

I haven't found good documentation on using the different adapters, is there some documentation somewhere?

Morgan
Reply
0 Kudos
5 Replies
New Contributor III
Morgan,

When using the "Add a Feature" connector, the expectation is that each GeoEvent should be inserted as a new Feature in the Feature Service.  Thus, there is no need for a "Unique Feature Identifier Field" like you would see in the "Update a Feature" connector.

Can you clarify the issue you are experiencing?  Are you saying that you are getting duplicate entries in the Feature Service that you didn't expect?  Or are you saying that you want to get duplicate entries in the Feature Service, but you can't get that to happen?

Ryan
Reply
0 Kudos
New Contributor III
I'm polling an external JSON web service, and I'm polling at an interval (15 seconds), but the data is just giving me the current state of all of the items in the service.  It doesn't give me just new ones, so I'm adding and adding features that are duplicates. 

I need to be able to poll a service, and only add new features that aren't current in my service.  I was able to reduce the number of items by slowing down how fast I poll, and using another GeoEvent Service to monitor the JSON web service for updates.  The issue I'm then running into, is if I only poll every 5 or 10 minutes, I don't get that new feature in my service very quickly. 

I need the data to be coming in as quickly as possible, so I have to poll for new features very often.

Does that help? 

Morgan
Reply
0 Kudos
New Contributor III
Are you polling a Feature Service from ArcGIS Server?  Or some other type of web service?

Ryan
Reply
0 Kudos
New Contributor III
I'm polling a JSON web service that I'm getting data from and adding the features.

Morgan
Reply
0 Kudos
New Contributor III
So the problem is that the GeoEvent Processor's input is getting all the data from the remote web service every time.  The http transport has an option to look at the "Last-Modified" http header.  But it sounds like your web services is not populating this header (or as is often the case, just populating it with the current time to say this data is up-to-date). 

You can work around this issue by having GEP bring in all data from that remote web service every update.  Then send the data to the output feature service.  To avoid having duplicate entries in the output, you can do this:

  1. Set the TRACK_ID tag on the geoevent definition (which it sounds like you did)

  2. Use the "Update a Feature" output connector.  Make sure that the destination feature service has a field with the same name as the TRACK_ID in your GeoEvent Definition, and this field is selected in the connector's "Unique Feature Identifier Field".


-Ryan
Reply
0 Kudos