Feature Layer

The Feature Layer source type in ArcGIS Velocity loads features from an ArcGIS Online or ArcGIS Server feature layer.

Examples

The following are example uses of the Feature Layer source:

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

Usage notes

Keep the following in mind when working with the Feature Layer source:

  • When browsing to a feature layer item, you can filter by folders, favorites, groups, organization, or ArcGIS Online. You can filter further by date modified, date created, and tags.
  • ArcGIS Server feature layers can also be loaded using a URL. Use an ArcGIS Server services directory REST URL (for example, https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/2). This URL should end in /FeatureServer/# or /MapServer/# in which # is the layer number.
  • To load a secured feature layer from a URL, first add items from the web to ArcGIS Online and 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 provided for the Timestamp field parameter, the Feature Layer source will query the feature layer to only load features relevant to the current analytic run (scheduled analytics only).
    • If the Timestamp field value is provided, when the analytic is started the first time, Velocity 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 no Timestamp field value is provided, 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 in a real-time analytic, because each time the real-time analytic is started, the feature layer feed will load all features returned by the configured where clause.
  • After configuring the source connection parameters, see Configure input data to learn how to define the schema and the key parameters.

Parameters

The following are the parameters for the Feature Layer source:

ParameterDescriptionData type

WHERE clause

A where clause used 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 Velocity 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 syntax with these feature layers are as follows:

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

If you're using analytic global variables to restrict feature loading, four global variables pertain to recurring big data analytics and are listed below. 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.

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

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

For more information about this type of configuration, see Near real-time analysis.

QueryString

Out fields

The fields from the feature layer that will be loaded into Velocity.

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

When specifying 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 is 4326.

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

String

Timestamp field

A date field for retrieving the latest features (scheduled analytics only).

If a Timestamp field value is provided, when the analytic is started the first time, Velocity 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 meet the criteria of the where clause will be loaded.

If no Timestamp field value is provided, 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 following are considerations and limitations when using the Feature Layer source:

  • The feature layer must be accessible on the internet.
  • Velocity does not reference layers that require credits to receive requests.