<?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 Are dynamic date queries supported for spatiotemporal big data store layers? in ArcGIS GeoEvent Server Questions</title>
    <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/are-dynamic-date-queries-supported-for/m-p/872358#M3413</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have some AVL data hosted in a 10.6.1 spatiotemporal big data store.&amp;nbsp; I'm trying to apply some filters in Pro based on the GPS timestamp but it's not working.&amp;nbsp; The Pro documentation covers supported functions for the traditional RDMS, shapefile, and file database formats, but doesn't discuss compatibility for the newer ArcGIS Online, Relational Data Store, and Spatiotemporal Data Store options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specifically I'm trying to do two queries on a single spatiotemporal hosted feature layer and contains&amp;nbsp;historical vehicle location data.&amp;nbsp; The point layer has a VEHICLE_ID column to store the unique ID for each vehicle, and a&amp;nbsp;GPSTIME field for the time the location was caption.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Query #1:&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp; Filter the dataset to only records with a timestamp in the last 24 hours.&amp;nbsp; I tried a def. query &lt;SPAN style="color: #0000ff;"&gt;GPSTIME&amp;nbsp;&amp;gt; (CURRENT_TIMESTAMP() - 1), but that returned an expression error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="text-decoration: underline; color: #000000;"&gt;&lt;STRONG&gt;Query #2&lt;/STRONG&gt;&lt;/SPAN&gt;: &lt;SPAN style="color: #000000;"&gt;Filter the dataset to only the record with the latest timestamp for each vehicle_id.&amp;nbsp; I believe with a traditional RDMS, this type of query can be handled with&amp;nbsp;a whereclause along the lines of the following:&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="" style="color: #393318; background-color: #eff0f1; border: 0px; margin: 0px 0px 1em; padding: 12px 8px;"&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;gpstime &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; max&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;gpstime&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;"&gt;from&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; MYGPSTABLE &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; vehicle_id &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; MYGPSTABLE.vehicle_id&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Oct 2019 16:35:37 GMT</pubDate>
    <dc:creator>AndrewRudin1</dc:creator>
    <dc:date>2019-10-14T16:35:37Z</dc:date>
    <item>
      <title>Are dynamic date queries supported for spatiotemporal big data store layers?</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/are-dynamic-date-queries-supported-for/m-p/872358#M3413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have some AVL data hosted in a 10.6.1 spatiotemporal big data store.&amp;nbsp; I'm trying to apply some filters in Pro based on the GPS timestamp but it's not working.&amp;nbsp; The Pro documentation covers supported functions for the traditional RDMS, shapefile, and file database formats, but doesn't discuss compatibility for the newer ArcGIS Online, Relational Data Store, and Spatiotemporal Data Store options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specifically I'm trying to do two queries on a single spatiotemporal hosted feature layer and contains&amp;nbsp;historical vehicle location data.&amp;nbsp; The point layer has a VEHICLE_ID column to store the unique ID for each vehicle, and a&amp;nbsp;GPSTIME field for the time the location was caption.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Query #1:&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp; Filter the dataset to only records with a timestamp in the last 24 hours.&amp;nbsp; I tried a def. query &lt;SPAN style="color: #0000ff;"&gt;GPSTIME&amp;nbsp;&amp;gt; (CURRENT_TIMESTAMP() - 1), but that returned an expression error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="text-decoration: underline; color: #000000;"&gt;&lt;STRONG&gt;Query #2&lt;/STRONG&gt;&lt;/SPAN&gt;: &lt;SPAN style="color: #000000;"&gt;Filter the dataset to only the record with the latest timestamp for each vehicle_id.&amp;nbsp; I believe with a traditional RDMS, this type of query can be handled with&amp;nbsp;a whereclause along the lines of the following:&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="" style="color: #393318; background-color: #eff0f1; border: 0px; margin: 0px 0px 1em; padding: 12px 8px;"&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;gpstime &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; max&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;gpstime&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;"&gt;from&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; MYGPSTABLE &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; vehicle_id &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; MYGPSTABLE.vehicle_id&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2019 16:35:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/are-dynamic-date-queries-supported-for/m-p/872358#M3413</guid>
      <dc:creator>AndrewRudin1</dc:creator>
      <dc:date>2019-10-14T16:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Are dynamic date queries supported for spatiotemporal big data store layers?</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/are-dynamic-date-queries-supported-for/m-p/872359#M3414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the basic dyamic date filter (Query #1), I did find some detail in the REST API help.&amp;nbsp; Although I'm using Pro instead of the REST API, they do have some notes in the Feature Service/Layer Query method&amp;nbsp; on the WHERE parameter:&amp;nbsp;&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm" title="https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm"&gt;Query (Feature Service/Layer)—ArcGIS REST API: Services Directory | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, It still didn't work.&amp;nbsp; I entered the following query in Pro, and although the query validates, the layer still shows records older than 1 day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gpstime &amp;gt;= ( current_timestamp - interval '1' day)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2019 17:14:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/are-dynamic-date-queries-supported-for/m-p/872359#M3414</guid>
      <dc:creator>AndrewRudin1</dc:creator>
      <dc:date>2019-10-14T17:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Are dynamic date queries supported for spatiotemporal big data store layers?</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/are-dynamic-date-queries-supported-for/m-p/872360#M3415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This expression is working for me (use SQL Mode in Pro's Definition Expression settings):&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;gpstime &amp;gt;= 'now-24h'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Spatiotemporal BDS is built on top of the Elasticsearch technology where I found this:&amp;nbsp;&lt;A class="link-titled" href="https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html" title="https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html"&gt;Range query | Elasticsearch Reference [7.4] | Elastic&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps,&lt;/P&gt;&lt;P&gt;Matej&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2019 11:09:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/are-dynamic-date-queries-supported-for/m-p/872360#M3415</guid>
      <dc:creator>MatejVrtich</dc:creator>
      <dc:date>2019-10-21T11:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Are dynamic date queries supported for spatiotemporal big data store layers?</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/are-dynamic-date-queries-supported-for/m-p/1068963#M3575</link>
      <description>&lt;P&gt;Andrew,&lt;/P&gt;&lt;P&gt;Did you ever get something similar to this to work?&amp;nbsp; I'm running into the same issue querying AVL data on our BDS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 16:29:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/are-dynamic-date-queries-supported-for/m-p/1068963#M3575</guid>
      <dc:creator>AdamMiller4</dc:creator>
      <dc:date>2021-06-16T16:29:08Z</dc:date>
    </item>
  </channel>
</rss>

