Feature Layer

The Feature Layer feed type in ArcGIS Analytics for IoT loads features from an ArcGIS Online or ArcGIS Server feature layer.

Example

  • A user selects an ArcGIS Online hosted feature layer containing the desired features to load.
  • A GIS analyst provides the URL to an ArcGIS Server feature layer (such as https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/2) containing the desired features to load.
  • A field crew manager loads data from a location tracking layer to analyze tracks being collected by Tracker for ArcGIS.

Usage notes

  • When browsing to select a feature layer item, you can filter by your folders, favorites, groups, organization, or all of ArcGIS Online. You can then further filter by date modified, date created, and tags.
  • ArcGIS Server feature layers can also be loaded via URL. This should be an ArcGIS Server services directory REST URL (such as https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/2). This URL should end in /FeatureServer/# or /MapServer/#, where # is the layer number.
  • To load a secured feature layer from a URL, first Add this item from the web to ArcGIS Online and choose to store credentials, then browse to the registered ArcGIS Online item to load the secured feature layer.
  • The feature layer must be accessible on the Internet.
  • If a field is specified in the Timestamp field parameter, the feature layer feed will query the feature layer to only load features relevant to the current analytic run.
    • If a Timestamp field is specified, when the analytic is started the first time, Analytics for IoT polls the feature layer and will load all features with a timestamp field datetime less than the first scheduled run time that also meets the criteria of the WHERE clause. For each subsequent run, only features with a timestamp field value between the last scheduled run time and the current scheduled run time that also meets the criteria of the WHERE clause will be loaded.
    • If a Timestamp field is not specified, each time the analytic is started the Feature Layer feed will load all features from the feature layer as events to be processed.
  • A timestamp field cannot be specified when configuring a feature layer source within a real-time analytic. The reason being, each time the real-time analytic is started the feature layer feed will load all features returned by the configured WHERE clause.
  • After configuring source connection properties, see Configure input data to learn how to define the schema and the key properties.

Parameters

ParameterExplanationData Type

WHERE clause

A WHERE clause to filter features loaded from the specified feature layer. The default is to load all features using 1=1. The default WHERE clause can be modified to include specific attribute values and logic conditions.

SQL 92 WHERE clause syntax on the fields in the layer is supported for most feature layers.

Feature layers generated by Analytics for IoT or feature layers in ArcGIS Enterprise running on a spatiotemporal big data store source have restrictions on what is supported; they only support a subset of SQL 92. The supported SQL 92 with such feature layers are listed below:

  • ( '<=' | '>=' | '<' | '>' | '=' | '!=' | '<>' | LIKE )
  • (AND | OR)
  • (IS | IS_NOT)
  • (IN | NOT_IN) ( '(' ( expr ( ',' expr )* )? ')' )
  • COLUMN_NAME BETWEEN LITERAL_VALUE AND LITERAL_VALUE

If using analytic global variables to restrict feature loading, there are four global variables that pertain to recurring big data analytics. These variables can be used in conjunction with the feature layer source WHERE clause to only load certain features each time the big data analytic runs. The four analytic global variables are listed below:

  • $analytic.AnalyticLastScheduledStartTime—Time the last run of the analytic was scheduled to start.
  • $analytic.AnalyticScheduledStartTime—Time the current run of the analytic was scheduled to start.
  • $analytic.AnalyticLastEndTime—Time the last run of the analytic ended.
  • $analytic.AnalyticStartTime—Time the current run of the analytic started (note the difference between this and $analytic.AnalyticScheduledStartTime is the startup delay.

The most common workflow for leveraging these variables is in conjunction with a real-time analytic that is continuously writing events as they occur to a feature layer output.

For more information on this type of configuration, see Perform near-real-time analysis.

QueryString

Out fields

Specifies which fields from the feature layer should be loaded into Analytics for IoT.

The default value is an asterisk (*) which denotes that all fields will be loaded.

If specifying specific fields, use a comma separated list of field names. For example:

OBJECTID,device_id,timestamp,horizontal_accuracy,latitude,longitude

String

Output spatial reference

The well-known ID (WKID) of a spatial reference. The default WKID is 4326.

Analytics for IoT will load data from the feature layer in the spatial referenced defined in this parameter.

String

Timestamp field

Specifies a date field for retrieving only the latest features.

If a Timestamp field is specified, when the analytic is started the first time, Analytics for IoT polls the feature layer and will load all features with a timestamp field datetime less than the first scheduled run time that also meet the criteria of the WHERE clause. Each subsequent run, only features with a timestamp field value between the last scheduled run time and the current scheduled run time that also meet the criteria of the WHERE clause will be loaded.

If a Timestamp field is not specified, each time the analytic is started the feature layer feed will load all features from the feature layer as events to be processed.

String

Considerations and limitations

  • The feature layer must be accessible on the Internet.
  • Analytics for IoT does not reference layers that require credits to send requests to.