Select to view content in your preferred language

Use a Feature Layer as a feed in a real time analytic --

550
3
Jump to solution
06-29-2023 04:50 PM
JeffSilberberg
Frequent Contributor

I am looking for some direction on the best approach to bringing data into an Analytic.  

I have a feature layer that started off as an XLS and was uploaded as a CSV and then published.  This Layer has control data and geometry for a group of parking lots that is joined to a feed from an AI-based camera system that counts cars/line crossings and sends updates every few minutes so that lot capacity can be tracked and mapped. 

The first pass is working well, now we want to update the Feature layer with some information via a Survey 123 application that lot attendants can use.  This information is such that it will be updated once a day usually in the early morning.   But, the feature layer information which is input to a join is not updating except when the Anaytic is restarted.  

So I put a Feed over the Layer but it did not work.  I believe this is the result of the Feed Polling Interval currently being set to 23 hours every day, and the Join Time Window being set at 24 Hours.   Since the data will only change once or twice a day it seems like a waste of resources to set these values to something like 5 minutes,  but since the Survey 123 update does not send an event through the feed updating the data, I am not sure of a better way to handle this?   So at the moment, both timers are at five minutes with the feed being limited to operating hours.

Is there another way to do this or a best practice that anyone has found?  How are you handling this scenario?

TIA - 

 

 

 

 

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
PeterNasuti
Esri Contributor

Thanks for posting this question, this is something we continue to consider from the product side. As you have found, when designing a real-time analytic, for some data inputs you need to choose between configuring this as a feed or as a source.

Sources only go fetch the source data when the real-time analytic is started or restarted. Therefore, if your real-time analytic is started, and sits there running for weeks, it is evaluating against data that is hours to days to weeks old. This is by design, and expected to be used for something relatively static. Think zip codes, census block polygons, and such.

Whereas with feeds, you can configure a polling interval for polling type feeds such as feature layer feed or HTTP poller feeds. This can be as frequent as every 10 seconds, to much less frequent such as every 1 day or every 12 hours. 

However, you advised this did not work. Please feel free to log a support ticket for assistance. But also be aware, if you start the real-time analytic referencing these two feeds, data will not be available from this "every 23 hour" join feed until it hits its polling interval. What quite possibly is happening is that you started your real-time analytic but the secondary feed has not yet pushed any data into the real-time analytic for evaluation as the polling interval has not yet been encountered.

Instead of refreshing that feature layer feed every 23 hours, I would suggest setting something between every 30min - every 2 hours. 

For a longer term product perspective, we are investigating enhancement possibility to enable real-time analytic source data refresh without having to restart the analytic.

View solution in original post

3 Replies
PeterNasuti
Esri Contributor

Thanks for posting this question, this is something we continue to consider from the product side. As you have found, when designing a real-time analytic, for some data inputs you need to choose between configuring this as a feed or as a source.

Sources only go fetch the source data when the real-time analytic is started or restarted. Therefore, if your real-time analytic is started, and sits there running for weeks, it is evaluating against data that is hours to days to weeks old. This is by design, and expected to be used for something relatively static. Think zip codes, census block polygons, and such.

Whereas with feeds, you can configure a polling interval for polling type feeds such as feature layer feed or HTTP poller feeds. This can be as frequent as every 10 seconds, to much less frequent such as every 1 day or every 12 hours. 

However, you advised this did not work. Please feel free to log a support ticket for assistance. But also be aware, if you start the real-time analytic referencing these two feeds, data will not be available from this "every 23 hour" join feed until it hits its polling interval. What quite possibly is happening is that you started your real-time analytic but the secondary feed has not yet pushed any data into the real-time analytic for evaluation as the polling interval has not yet been encountered.

Instead of refreshing that feature layer feed every 23 hours, I would suggest setting something between every 30min - every 2 hours. 

For a longer term product perspective, we are investigating enhancement possibility to enable real-time analytic source data refresh without having to restart the analytic.

JeffSilberberg
Frequent Contributor

@JeffSilberberg wrote:

I am looking for some direction on the best approach to bringing data into an Analytic.  

I have a feature layer that started off as an XLS and was uploaded as a CSV and then published.  This Layer has control data and geometry for a group of parking lots that is joined to a feed from an AI-based camera system that counts cars/line crossings and sends updates every few minutes so that lot capacity can be tracked and mapped. 

The first pass is working well, now we want to update the Feature layer with some information via a Survey 123 application that lot attendants can use.  This information is such that it will be updated once a day usually in the early morning.   But, the feature layer information which is input to a join is not updating except when the Anaytic is restarted.  

So I put a Feed over the Layer but it did not work.  I believe this is the result of the Feed Polling Interval currently being set to 23 hours every day, and the Join Time Window being set at 24 Hours.   Since the data will only change once or twice a day it seems like a waste of resources to set these values to something like 5 minutes,  but since the Survey 123 update does not send an event through the feed updating the data, I am not sure of a better way to handle this?   So at the moment, both timers are at five minutes with the feed being limited to operating hours.

Is there another way to do this or a best practice that anyone has found?  How are you handling this scenario?

TIA - 

 

 

 

Sources only go fetch the source data when the real-time analytic is started or restarted.

 


  Is there a way to schedule / programmatically restart the Anaytic?  

  A Case has been opened -- 

 

0 Kudos
PeterNasuti
Esri Contributor

@JeffSilberberg Yes, there is a realtime module for the ArcGIS API for Python with start() and stop() methods for a real-time analytic

https://developers.arcgis.com/python/api-reference/arcgis.realtime.html#realtimeanalytics

0 Kudos