HOW TO
By design, GeoEvent Server's interface to enterprise databases is through published map services, feature services, or both. GeoEvent Server provides an input connector named "Poll an ArcGIS Server for Features" for polling map and feature services for records that include geometry.
Often, users want to incorporate data from a non-spatial table with X and Y coordinate values into a GeoEvent Server workflow and require GeoEvent Server to use the coordinate values in the table's rows to construct a Point Geometry. "Poll an ArcGIS Server for Features" input does not offer this capability, as it assumes that feature records include geometry.
One approach to this challenge is treating the map or feature service like a web service and polling ArcGIS Server as if it is an external server. To retrieve records from the non-spatial table as JavaScript Object Notation (JSON), a different type of GeoEvent Server input connector named "Poll an External Website for JSON" can be configured. This input includes the ability to construct geometry from fields and can be pointed to the non-spatial table's layer exposed by the map or feature service.
Publish a map service that includes a nonspatial table as a layer
Note: If data in the non-spatial table is to be updated, make sure that the data sources are registered. This ensures the latest data values are returned from the map service when GeoEvent Server polls the service.
http://<server_name>/arcgis/rest/services/NS_test/MapServer/1/query?where=1%3D1&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=false&returnTrueCurves=false&returnIdsOnly=false&returnCountOnly=false&returnZ=false&returnM=false&returnDistinctValues=false&returnExtentsOnly=false&f=json
{"displayFieldName":"Name","fieldAliases": {"Name":"Name","X":"X","Y":"Y","ID":"ID"},"fields": [{"name":"Name","type":"esriFieldTypeString","alias":"Name","length":10}, {"name":"X","type":"esriFieldTypeDouble","alias":"X"}, {"name":"Y","type":"esriFieldTypeDouble","alias":"Y"}, {"name":"ID","type":"esriFieldTypeDouble","alias":"ID"}],"features":[{"attributes": {"Name":"Daniel ","X":500000,"Y":3762155,"ID":1}},{"attributes":{"Name":"Tommy ","X":500000,"Y":5983521,"ID":2}},{"attributes":{"Name":"Rashan ","X":500000,"Y":8212038,"ID":3}}]}
Note: The definition created is a hierarchical definition, with "attributes" as the grouped field with field names as sub-elements under this group.
Get help from ArcGIS experts
Download the Esri Support App