What is wrong with this JSON input?

3271
6
01-23-2014 04:42 PM
Highlighted
Occasional Contributor II
Attached is a PDF describing a problem I'm having with an input.  The input worked in 10.2.0 but is now failing in 10.2.1.  I can't see what is breaking. Thanks in advance.
DG
Reply
0 Kudos
6 Replies
Highlighted
Occasional Contributor II
Hi Dennis,

I am currently working on a similar problem with JSON inputs. Actually I think there might be a problem for the GEP when parsing JSON Array which contain JSON objects.

Please let us know when you make some progress.

Regards,
Martin
Reply
0 Kudos
Highlighted
Esri Regular Contributor
Hello Dennis -

I don't see anything wrong with the JSON sample you posted. I was able to create a basic 'Receive JSON on a REST endpoint' Input and POST the sample to the GeoEvent Processor Input's REST endpoint.

Configuring my Input as shown in the first illustration below, I allowed a new GeoEvent Definition to be created. I've included an illustration of the generated GeoEvent Definition below. When I post the JSON, I get two events received. I can output those to a system text file as JSON without any problem.

I noticed that in the second record, the one whose driverID is 83886089, a few of the fields are null. If I delete the GeoEvent Definition and then swap the order of the events in the list so that the record with the null attributes is first ... the generated GeoEvent Definition does not contain fields for the attributes which were initially received as null.

I'm not sure, but it might be that you have a GeoEvent Definition which does not match the content discovered by the Input connector, so it discards the event it cannot recognize. That would explain why you are observing the event count not incrementing. You might try deleting your existing GeoEvent Definitions and seeing if the Input is able to create a new one based on data it receives.

The only other piece to the configuration that I notice is that your connector, aside from specifying connection credentials and a polling frequency, is specifying a 'Parameters' value of 'minutes=1440'. I'm not sure what that parameter is, or it is plays into the issue.

- RJ
Reply
0 Kudos
Highlighted
Occasional Contributor II
I didn't think there was anything wrong with the JSON since it worked with 10.2.0 although I did have to unmap several fields in a field mapper processor of the GE Service for the data stream to successfully update a target feature class.  But I didn't determine which data field was causing grief.  Once 10.2.1 arrive I installed and then discovered the input just stopped working altogether.

In my input definition I am trying to create a new schema definition so the issue with NULLS doesn't apply but it is good to know that null fields are not included in the automated schema definition.  Is that a bug or feature?  I would be good if it did not drop null fields on an initial schema definition.  Even better, include the option of turning that feature on or off.

The minutes parameter in the URL is a time span.  Get red flag events of the past 1440 minutes (24hr).  Shouldn't be an issue.  I test the URL in a browser and get back many items.

Today I received an email from ESRI that includes a patch in regards to a possible timeout issue.  I will try that soon and post if that solves the problem.

Thanks RJ.

DG
Reply
0 Kudos
Highlighted
Occasional Contributor II
The patch fixed the problem with the input. 
DG
Reply
0 Kudos
Highlighted
New Contributor III
I'm running into a timeout at 2 seconds. How did you fix that?
Reply
0 Kudos
Highlighted
New Contributor III
A fix for the timeout issue with the HttpInboundTransport has been included in the next release. If you are unable to wait for the 10.2.2 product, currently scheduled for release end Q1 2014, please contact Esri Technical support and/or work with your Customer Service Representative.

Thanks,

Tim
Reply
0 Kudos