Skip To Content

Sample data with GeoEvent Sampler

Real-time data can be received in a number of data formats (text, JSON, GeoJSON, and so on) over many types of protocols (HTTP, WebSocket, TCP, and so on). Validating and exploring event data (or GeoEvents) directly in GeoEvent Manager, prior to writing those GeoEvents to a feature layer for viewing in a web map, for example, can be especially useful. GeoEvent Sampler is a utility in the service designer of GeoEvent Manager that samples a fixed number of GeoEvents as they are routed through elements (inputs, outputs, filters, and processors) of a published GeoEvent Service. The sampled GeoEvents can be viewed as prettified JSON or delimited text in the sampler window. Sampling GeoEvents can provide earlier and greater insight into real-time event data and can assist in designing, validating, and troubleshooting different routes in a GeoEvent Service.

Unlike GeoEvent Logger and GeoEvent Simulator, which are Windows applications installed with GeoEvent Server, GeoEvent Sampler is a utility in the service designer in GeoEvent Manager. You can access GeoEvent Sampler from a new or existing GeoEvent Service by turning on the utility at the bottom of the service designer. The following image and table illustrate and describe the key functionality provided by GeoEvent Sampler:

GeoEvent Sampler utility in the service designer

Parameter or functionDescription

1—Enable and Disable

The Enable and Disable options start and stop GeoEvent Sampler on a selected route between two elements of a published GeoEvent Service. GeoEvent Sampler is disabled by default and must be enabled to sample GeoEvents on a selected route.

  • Enable—GeoEvents streaming through a GeoEvent Service display in the sampler window upon selecting a route between elements in a published GeoEvent Service.
  • Disable—GeoEvents streaming through a published GeoEvent Service are not displayed in the sampler window. Existing event records remain in the window until they are manually cleared or the GeoEvent Services page is refreshed. If sampling is disabled, clicking a route in a GeoEvent Service does not display event data.

For details regarding enabling GeoEvent Sampler, see the Enable GeoEvent Sampler section below.

2—Select Route

The name of the selected route in a GeoEvent Service. Event data is displayed in the sampler window for the selected route only. Any route between an input, output, filter, or processor element can be selected in a published GeoEvent Service.

The name of the selected route is displayed as the concatenation of the connected element names. Examples of route names include the following:

  • Input Connector TO Output Connector
  • Field Mapper TO Bearing Calculator
  • Filter “Speed > 80” TO Change_Status_Speeding_Field_Calculator
  • Hurricane_Warning TO Email_FieldCrewA
Nota:

The name of the selected route is displayed when GeoEvent Sampler is enabled and a route between two elements in a GeoEvent Service is selected.

3—GeoEvent Sampler utility

Click the toggle button to show or hide GeoEvent Sampler in the service designer. The GeoEvent Sampler utility is shown by default.

For details regarding enabling GeoEvent Sampler, see the Enable GeoEvent Sampler section below.

4—Refresh

Use Refresh to clear the currently sampled GeoEvents and sample another set from the selected route.

After a refresh, another set of GeoEvents is sampled up to the value specified in the Sample Size setting. For example, if Sample Size is set to 10 and a refresh occurs, the current GeoEvents are cleared and another sample of 10 appears in the sampler window.

If two routes are being compared, clicking Refresh clears the GeoEvents for each route and each route is sampled again. For details regarding comparing two routes, see the Compare GeoEvents from two routes section below.

5—Clear

Use Clear to remove sampled GeoEvents from the sampler window.

After the samples are removed, GeoEvents continue to be sampled from the selected route up to the value specified in the Sample Size setting. For example, if Sample Size is set to 10 and Clear is used after three GeoEvents are sampled, the sampler removes the three GeoEvents and continues to sample for the remaining seven GeoEvents.

If two routes are being compared, Clear is available for each route. For details regarding comparing two routes, see the Compare GeoEvents from two routes section below.

Nota:

The option to clear the sampler window or windows is only available after at least one GeoEvent is sampled.

6—View in Event Viewer

Use View in Event Viewer to visualize the geometry of the sampled GeoEvents in a web map viewer.

The Event Viewer window only displays the geometry of sampled GeoEvents currently displayed in the sampler window. When the Event Viewer window is open, no newly sampled GeoEvents are displayed. Open the Event Viewer window after the appropriate number of GeoEvents are sampled and available in the sampler window.

Nota:

You can view sampled GeoEvents in the Event Viewer window only when the GeoEvents have a geometry whose field is tagged GEOMETRY in its GeoEvent Definition. Additionally, sampled GeoEvents must be in the JSON data type format; viewing as text is not supported.

Nota:

The Event Viewer basemap can be changed using the basemap selection widget. Additional custom or offline basemaps can be specified in the global settings available in GeoEvent Manager. These will display in the basemap selection widget.

7—Copy to Clipboard

Use Copy to Clipboard to copy the GeoEvents currently displayed in the sampler window to the system clipboard. The copied GeoEvents can be pasted to a separate text file or text editor for storage or further review.

If two routes are being compared, Copy to Clipboard is available for each route. For details regarding comparing two routes, see the Compare GeoEvents from two routes section below.

Nota:

GeoEvents are copied in the data type format defined in the Data Type setting (either Text or JSON). The data type format can be changed in Settings.

8—Settings

Access the settings for sampling GeoEvents, including Data Type and Sample Size.

  • Data Type—Specifies how sampled GeoEvents are formatted, either prettified JSON or delimited text. The default is JSON.
  • Sample Size—Specifies the number of GeoEvents to sample from a selected route. The sample size can be set to 1, 10, or 100 GeoEvents. The default is 10.

9—Sampler window

The GeoEvents sampled from a selected route appear in the sampler window.

Sampled GeoEvents display as either JSON or text depending on the data type format specified in the Data Type setting.

10—Event counter

The event counter displays the number of GeoEvents sampled on a selected route. The number of GeoEvents sampled will not exceed the value specified in the Sample Size setting. For example, a count of 3/10 means 3 GeoEvents, out of a maximum of 10, have been sampled.

Nota:

The event counter resets to 0 when a new route is selected or if sampling is refreshed.

Enable GeoEvent Sampler

GeoEvents can be sampled and displayed in real time from a route (or connection) between an input, output, filter, or processor element in a published GeoEvent Service. To get started with GeoEvent Sampler, open GeoEvent Manager and either create a GeoEvent Service or open an existing GeoEvent Service. For details regarding creating a GeoEvent Service, see Create a GeoEvent Service.

To access and enable GeoEvent Sampler in the service designer, complete the following steps:

  1. Open a published GeoEvent Service and ensure that it is receiving GeoEvents.
  2. To open GeoEvent Sampler, click GeoEvent Sampler toggle button at the bottom of the service designer.
  3. Click settings GeoEvent Sampler settings to open the Settings pane for GeoEvent Sampler and specify the Data Type and Sample Size values. The default data type is JSON and the default sample size is 10.
  4. Click Enable Enable GeoEvent Sampler to start GeoEvent Sampler.
Nota:

You can also start GeoEvent Sampler by right-clicking a route between two elements in a published GeoEvent Service and choosing Sample Route. GeoEvent Sampler opens and sampling of GeoEvents begins on the selected route.

Sample GeoEvents

To sample GeoEvents, select a route between an input, output, filter, or processor element while GeoEvent Sampler is open and enabled.

To sample GeoEvents from a route in a GeoEvent Service, create a GeoEvent Service or open an existing published GeoEvent Service, ensure that it is actively receiving GeoEvents, and complete the following steps:

  1. Ensure that GeoEvent Sampler is open in the service designer and is enabled.
  2. Click a route in the published GeoEvent Service to begin sampling GeoEvents on that route.

    Example selected route in a GeoEvent Service

  3. Nota:

    You can also start GeoEvent Sampler by right-clicking a route and choosing Sample Route from the menu. GeoEvent Sampler opens, is enabled, and begins sampling GeoEvents from the selected route.

    As real-time data flows through a GeoEvent Service, the sampler window displays a sample of the GeoEvents from the selected route as they are processed. The sampled GeoEvents are displayed as text or JSON depending on the data format type specified in the Data Type setting. The total number of sampled GeoEvents displayed depends on the Sample Size value. The number of GeoEvents sampled is shown in the events sampled counter.
  4. Optionally, click Copy to Clipboard Copy to Clipboard to copy the current sample of GeoEvents from the sampler window.
  5. Optionally, click Clear Clear to remove the current sample of GeoEvents from the sampler window.
  6. Optionally, click Refresh Refresh to sample the selected route again.

Visualize sampled GeoEvents

The primary purpose of GeoEvent Sampler is to provide a sample of GeoEvents as text or JSON in real time as they are processed in a published GeoEvent Service. GeoEvent Sampler includes Event Viewer, which is a web map viewer that can be used to visualize and verify the geometry of processed GeoEvents.

To visualize sampled GeoEvents in the Event Viewer window, create a GeoEvent Service or open an existing, published GeoEvent Service, ensure that it is actively receiving GeoEvents, and complete the following steps:

  1. Ensure that GeoEvent Sampler is open in the service designer and is enabled.
  2. Click settings GeoEvent Sampler settings and confirm that Data Type is set to JSON.
  3. Click a route in the published GeoEvent Service to begin sampling GeoEvents on the selected route.
  4. Nota:

    Optionally, right-click a route and from the menu, choose Sample Route to begin sampling GeoEvents.

  5. After a sample of GeoEvents is displayed as JSON in the sampler window, click View in Event Viewer View in Event Viewer to view the GeoEvents in the Event Viewer window.
  6. Nota:

    Event Viewer only supports sampling JSON formatted GeoEvents that contain a geometry field tagged as GEOMETRY in the corresponding GeoEvent Definition. If the sampled GeoEvents are formatted as text and do not have a GEOMETRY field, the View in Event Viewer button is unavailable.

  7. Explore the sampled GeoEvents in the Event Viewer window.

    GeoEvents viewed in the Event Viewer

  8. Event Viewer only displays the current set of sampled GeoEvents. To display another set of sampled GeoEvents, close the Event Viewer window, click Refresh, and click View in Event Viewer again.
  9. In the Event Viewer window, click a GeoEvent.

    A pop-up appears with the attribute information.

    GeoEvent attribute data viewed in a pop-up in the Event Viewer window

Compare GeoEvents from two routes

You can perform GeoEvent sampling on two routes at the same time. Sampling two routes can be useful to compare and validate changes on related real-time data. For example, a GeoEvent emitted by a Buffer Creator Processor can be expected to have a different geometry (polygon) from its original source geometry (point). By sampling GeoEvents from the routes going to and from the processor, you can confirm that GeoEvents are not only received by the Buffer Creator Processor, they are buffered by the processor as well.

To compare sampled GeoEvents from two routes, create a GeoEvent Service or open an existing, published GeoEvent Service, ensure that it is actively receiving GeoEvents, and complete the following steps:

  1. Ensure that GeoEvent Sampler is open in the service designer and is enabled.
  2. Click a route in a GeoEvent Service to begin sampling GeoEvents on the first selected route.

    First route selected in an example GeoEvent Service

    Nota:

    Optionally, right-click a route and from the menu, choose Sample Route to start sampling the first route.

  3. With the first route selected, right-click a second route and choose Compare Route.

    Second route selected in an example GeoEvent Service

    Nota:
    Compare Route is only available once the first route is selected. Routes sharing the same source element—whether an input, output, filter, or processor—cannot be compared.

    The second selected route is a different color (orange), indicating that GeoEvent sampling will be performed on the two selected routes.

    Example of two selected routes in a GeoEvent Service

    With the two routes selected, two sampler windows appear in GeoEvent Sampler, allowing you to compare the two routes. The left sampler window (blue) returns the sampled GeoEvents from the first selected route, and the right window (orange) returns the sampled GeoEvents from the second selected route.

    Sampler window comparing two selected routes

    GeoEvent sampling can only be performed on one or two routes. When comparing two routes, changing the settings, refreshing, and opening the Event Viewer window applies to both sampler windows. Clearing and copying the data to the clipboard can be done independently and apply to the sampler window where the tool is used.

  4. Click to view the GeoEvents from each route in the Event Viewer window.

    Viewing two compared routes in the Event Viewer window

    Event Viewer opens a viewer for each selected route. This can be useful to validate geometry changes when performing event processing. For example, original point geometry from a GeoEvent can be visualized in the first viewer while the same GeoEvent emitted from a Buffer Creator Processor, for example, can be visualized in the second viewer. This allows you to confirm the original point geometry was buffered successfully and is now a polygon. Use the lock widget to synchronise each of the viewers and ensure you are looking at the same geographic area for geometric changes.

Considerations and limitations

Keep the following in mind when using GeoEvent Sampler:

  • GeoEvents are only sampled when a GeoEvent Service is published, started, and is actively receiving real-time event data. Nothing appears in the sampler window if the GeoEvent Service is not published or is stopped, or no event data is being received.
  • GeoEvent Sampler can be used to perform sampling on the routes connecting inputs, outputs, processors, and filters only. Direct sampling of inputs, outputs, processors, and filter elements is not supported.
  • Consider your real-time data and service design when sampling GeoEvents.
  • GeoEvent Sampler automatically disconnects and is unavailable after 10 minutes of inactivity.
  • GeoEvent Sampler only supports the comparison of two routes between elements of a GeoEvent Service.
  • The order of GeoEvents sampled is not guaranteed. The order in which GeoEvents are collected into GeoEvent Server may not be the same order in which they appear in the sampler window.
  • Sampled GeoEvents are not persisted or cached. Refreshing the sampler window or the browser session removes currently sampled GeoEvents.
  • Changing the GeoEvent Sampler settings requires a refresh. If the settings are changed during an active sampling of GeoEvents, the new settings do not take effect until GeoEvent Sampler is refreshed.
  • When comparing two routes, the first sampler window may reach its sample size before the second sampler window displays any GeoEvents. In this case, the route may not have met a filter or processing condition and is not being received.
  • The sampler window displays a progress bar when waiting to receive the first GeoEvent.
  • Viewing GeoEvents in the Event Viewer window is supported in offline environments. Access the global settings to configure Event Viewer with a basemap that is accessible offline.