Examples

The following examples can be found on this page:

Filter Example

This example demonstrates how to use this Context Provider to return data for all images that contain '007' from the crete Streaming Data Platform stream by specifying the query input using a filter.

Refer to configuration to understand all configuration options of this Agent.

Step 1: Add the Agent

Drag the Streaming Data Platform Context Provider Agent onto the canvas and rename it. Link the output and stats endpoint to printers, and save the Data Stream.

Step 2: Configure General

Select the Agent and click Configure. Keep the default Collection and polling interval.

Step 3: Configure Connection Details

Enter the Connection details of the Streaming Data Platform: base URL, user name, password, stream name, and psearch rest head.

Step 4: Configure Query Details

Enter the query input and query. In this case, keep the default query input and enter the filter query 'ImageId contains 007'.

Step 5: Configure Output Details

The source columns grid is auto-populated with available columns in the selected stream. You can click '+' to add another column, update the data types, or untick to exclude any columns from the output payload.

Step 6: Results

Click apply, save the Data Stream, and publish it.

Let's look at the Live Data View. Observe that the crete stream's 007 image data is printed, every 10 seconds.

Files

See the Import, Export, and Clone - XMPro article for steps to import a Data Stream.

Query Example

This example demonstrates how to use this Context Provider to return data for all images that contain '007' from the crete Streaming Data Platform stream by specifying the query input manually.

Refer to configuration to understand all configuration options of this Agent.

Step 1: Add the Agent

Drag the Streaming Data Platform Context Provider Agent onto the canvas and rename it. Link the output and stats endpoint to printers, and save the Data Stream.

Step 2: Configure General

Select the Agent and click Configure. Keep the default Collection and polling interval.

Step 3: Configure Connection Details

Enter the Connection details of the Streaming Data Platform: base URL, user name, password, stream name, and psearch rest head.

Step 4: Configure Query Details

Enter the query input and query. In this case, set the query input to manual entry and enter this SDP query:

{
    "query": {
        "term": {
            "imageid": "007"
        }
    }
}

Step 5: Configure Output Details

The source columns grid is auto-populated with available columns in the selected stream. You can click '+' to add another column, update the data types, or untick to exclude any columns from the output payload.

Step 6: Results

Click apply, save the Data Stream, and publish it.

Let's look at the Live Data View. Observe that the crete stream's 007 image data is printed, every 10 seconds.

Files

See the Import, Export, and Clone - XMPro article for steps to import a Data Stream.

Last updated