Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

How do Filter Windows Work in SAS Event Stream Processing?

Overview

This project demonstrates how Filter windows operate in SAS Event Stream Processing. This project shows how data from simulated sensors can be evaluated in real time, and how records that meet certain conditions are passed downstream for further action or analysis.

Source Data

The source data is generated by a Lua connector that simulates 10 temperature sensor readings. Each reading contains the following:

  • sensor_id: Identifier for the sensor (for example, “Sensor1” to “Sensor10”).
  • temperature: A randomly generated temperature between 65°F and 90°F.
  • timestamp: The system time when the reading is generated.
  • key: A unique string used as the primary key.

This data is published at an interval of 5 seconds.

Workflow

image-20250716103651778

This project contains two windows that are connected with a simple linear workflow:

  1. SourceWindow: This is a Source window that receives data from the Lua connector. It defines the schema and structure for incoming events.
  2. Filter: This is a Filter window that contains logic to check if the temperature is above 75°F. If the temperate is over 75°F, the event is forwarded; otherwise, the event is discarded. Filter logic can be coded in Lua, Python, C, or Expression Engine Language. The following figure shows how the Filter window is configured to filter the temperatures: image-20250716132959551

Test the Project and View the Results

Remember that the Lua connector generates random temperatures between 65°F and 90°F, so the data you see might not match the figures below. These figures are just examples of what your screen can look like.

When you test the project, the results for each window appear on separate tabs:

  • The SourceWindow tab shows all events with various opcodes:

image-20250716134016710

  • The Filter tab shows all of the temperate readings greater than 75°F:

image-20250716134253461

Additional Resources

For more information about Filter windows, see: Using Filter Windows.