<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Field Map an array of values to a single field in ArcGIS GeoEvent Server Questions</title>
    <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/field-map-an-array-of-values-to-a-single-field/m-p/1287659#M3942</link>
    <description>&lt;P&gt;Michael,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; That's the issue. Neither geoEvent or Velocit realy support a for, do or while loop today.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;In one case I knew the max upper end of the occurrences in the array and just made sure my sample had the necessary data so that when I derived the schema I got all the location_n_ occurrences, and then flattened the data in a large Field Mapper.&amp;nbsp; Think I had a top of 5 and 0 was always present 1 through 4 I tested for content.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; In another case the array could contain anywhere from one to 30 occurrences, and the only logical way I could find to handle this data was to refactor it in a preprocessor (AWS EC2 Instance) and then post the new&amp;nbsp; flattened JSON transactions to the feed.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 May 2023 12:33:00 GMT</pubDate>
    <dc:creator>JeffSilberberg</dc:creator>
    <dc:date>2023-05-10T12:33:00Z</dc:date>
    <item>
      <title>Field Map an array of values to a single field</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/field-map-an-array-of-values-to-a-single-field/m-p/1287016#M3939</link>
      <description>&lt;P&gt;So I trying to take incoming json which includes a simple array of values (array can be dynamic in the sense it will sometimes have multiple values and sometime will have zero) and send it to a feature layer field called "sources":&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample Input&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;"sources": [&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "water",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "Reactor"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "location": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "latitude": 38.8815081,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "longitude": -77.111314,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "altitude": 81.20000457763672&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample Output&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;&lt;FONT color="#008000"&gt;&lt;STRONG&gt;sources&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;latitude&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;longitude&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;altitude&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;&lt;FONT color="#008000"&gt;&lt;STRONG&gt;water, reactor&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;38.8815081&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;-77.111314&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;81.20000457763672&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm only concerned with how to handle the first field as the number of values can vary for each geoevent/row inserted.&lt;/P&gt;&lt;P&gt;Any ideas on best way to handle would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 21:13:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/field-map-an-array-of-values-to-a-single-field/m-p/1287016#M3939</guid>
      <dc:creator>MichaelKarikari1</dc:creator>
      <dc:date>2023-05-08T21:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: Field Map an array of values to a single field</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/field-map-an-array-of-values-to-a-single-field/m-p/1287424#M3940</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the feed first flatten the array and then in the analytic use a Field Mapper to change input location_0_lattitude to output latitude --&amp;nbsp; and so on.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 19:44:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/field-map-an-array-of-values-to-a-single-field/m-p/1287424#M3940</guid>
      <dc:creator>JeffSilberberg</dc:creator>
      <dc:date>2023-05-09T19:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Field Map an array of values to a single field</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/field-map-an-array-of-values-to-a-single-field/m-p/1287519#M3941</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/140376"&gt;@JeffSilberberg&lt;/a&gt;&amp;nbsp;, my issue is actually with the "sources" values, if that array can vary in # of values, how would I iterate through and have it added to the output field if it isn't known how many items will appear in sources array ahead of time?&lt;/P&gt;&lt;P&gt;Im trying to determine the best way of looping through array so all values can be added&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 01:16:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/field-map-an-array-of-values-to-a-single-field/m-p/1287519#M3941</guid>
      <dc:creator>MichaelKarikari1</dc:creator>
      <dc:date>2023-05-10T01:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Field Map an array of values to a single field</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/field-map-an-array-of-values-to-a-single-field/m-p/1287659#M3942</link>
      <description>&lt;P&gt;Michael,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; That's the issue. Neither geoEvent or Velocit realy support a for, do or while loop today.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;In one case I knew the max upper end of the occurrences in the array and just made sure my sample had the necessary data so that when I derived the schema I got all the location_n_ occurrences, and then flattened the data in a large Field Mapper.&amp;nbsp; Think I had a top of 5 and 0 was always present 1 through 4 I tested for content.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; In another case the array could contain anywhere from one to 30 occurrences, and the only logical way I could find to handle this data was to refactor it in a preprocessor (AWS EC2 Instance) and then post the new&amp;nbsp; flattened JSON transactions to the feed.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 12:33:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/field-map-an-array-of-values-to-a-single-field/m-p/1287659#M3942</guid>
      <dc:creator>JeffSilberberg</dc:creator>
      <dc:date>2023-05-10T12:33:00Z</dc:date>
    </item>
  </channel>
</rss>

