Instagram - trouble getting nested JSON attributes

4047
7
08-15-2013 05:31 PM
SimonJackson
Occasional Contributor III
Got the Instagram-10.2.0 connector wired up and ran through the tutorial. Everything works as expected.

Wanted to take it a step further, and get images.standard_resolution.url written to a field in my featureclass via the add feature adapter/feature service. This will allow me to show the images in a popup via ArcGIS Online.

However, it seems like there is a problem getting to this nested JSON attribute.

The output for the rest of the fields is coming through, just not for images.standard_resolution.url (refer to Null_Data_Coming_Through.png)

From checking the output JSON, I can see that this is coming through ok (refer to ExampleOutput.json)

With the field mapper, I can successfully pick the images.standard_resolution.url without any hackery (refer to FieldMapper.png and FieldMapper_ChooseField.png), but when I check the TCP output which is after it has been field mapped, this field is not coming through.

Output:
Received Event : InstagramFeed,08/16/2013 11:02:33 AM,http://instagram.com/p/dDg40svwmE/,sneakernews,,You'll s
ee it only here - LeBron 11 #BeautyShots. See it only on Sneakernews.com,"-73.999159003,40.718064088,0.0"


Note the empty gap between the two commas.

I have replicated this on two machines, and was wondering if someone had an idea on how to resolve this?
0 Kudos
7 Replies
by Anonymous User
Not applicable
Original User: jakc

one more image of my event definition that was created by importing it from my feature service.
0 Kudos
RJSunderman
Esri Regular Contributor
Simon -

We have had reports - from customers using other adapters - that the Field Mapper processor is not handling hierarchical data. They are also seeing what you describe; null values in their output when hierarchical data is mapped to a flattened schema.

We are developing a hot-fix for this for the 10.2.0 release and refactoring how GeoEvent Processor components handle hierarchical fields and fields with cardinality greater-than one. The refactoring will be part of the 10.2.1 product release.

For now, I do not have a workaround to suggest. What you are doing appears correct.

/RJ
0 Kudos
by Anonymous User
Not applicable
Original User: jakc

Thanks for looking into this RJ.
Would be great if you could update this post when hotfix is made available.
0 Kudos
ColleenFarrell
New Contributor III
Was this fixed in 10.2.1?  I'm running 10.2.1 and see null values in my output.

Was it fixed in 10.2.2?  I see an item in the 10.2.2 Issues Addressed List called - TFS30864 The generic JSON adapter (inbound) now properly handles nested lists. - Does this fix the null values when using nested json?
0 Kudos
by Anonymous User
Not applicable
Original User: RJ Sunderman

Hello Colleen -

Apologies for the delay in getting back with you. We are looking to confirm the fix exists in 10.2.2 and also if the fix made it into the 10.2.1 product release.

I can confirm that a 'hot fix' was never released for this issue ...

We will respond back to this thread as soon as possible.

Thanks -
RJ
0 Kudos
ColleenFarrell
New Contributor III
Thanks for checking.

I went ahead and installed 10.2.2 and did not have any luck with the nested json, so we flattened out the json and are using that.
0 Kudos
by Anonymous User
Not applicable
Original User: cris027362

To answer Simon, in 10.2.1 and 10.2.2 environment, I was able to get data out of TCP output using his service model and data structure. Using the Identify tool, I've verified the StandardImage is populated with URL as well.

Below is the TCP output:

Received Event : InstagramFeed,06/03/2014 09:53:30 AM,http://instagram.com/p/oyhCWxG9Sh/,nordstrom,http://scontent-a.cdninstagram.com/hphotos-xpa1/t51
 .2885-15/927655_1496496200562288_1391518138_n.jpg,@Prada perfection. #shoes #prada #nordstrom #red,"-122.335956767,47.612982824,0.0"




The Field Mapper processor supports data alignment, such as to take hierarchical data and map it to a flatten schema, not map to hierarchical schema.

[ATTACH=CONFIG]34330[/ATTACH]
0 Kudos