BookmarkSubscribeRSS Feed
zephstemle
SAS Employee

Several SAS Event Stream Processing (ESP) examples have been added to GitHub that are designed for new users. These examples each cover a single technique and they are designed to make you more comfortable using ESP.

 

The following GitHub pages are now available:

 

 

Aggregating Stock Transactions

 

The Aggregating Stock Transactions example is very simple. It includes a Source window with an Input Data Connector and an Aggregate window to perform aggregate functions on the stream.

 

The model reads stock transactions for a set of stock symbols. The input stream includes the following for each transaction:

 

  • Stock Symbol
  • Number of Shares
  • Price of the Stock

 

The model then aggregates the total number of shares traded for each symbol.

 

The GitHub repository includes the files required to execute the example and video demonstrations that include the following topics:

 

  • Viewing and editing the model using a text editor
  • Viewing and editing the model in SAS ESP Studio
  • Executing the model using the SAS ESP XML Server
  • Subscribing to the output using the file/socket adapter command and writing the results to a comma separated values (csv) file.
  • Subscribing to the output using SAS ESP Streamviewer

 

Processing Streaming Trade Data

 

The Processing Streaming Trade Data model is an XML model that illustrates the use of five ESP window types.

 

Two data source windows are used. One is transactional and one is dimensional. The model joins the streams from the two source windows, uses a filter, computes cost, and then aggregates to find the total cost and quantity. The functionality of these windows is explained and demonstrated.

 

The GitHub pages includes videos that demonstrate the following:

 

  • Editing the model with a text editor
  • Editing the model using SAS ESP Studio
  • Subscribing to the output with SAS ESP Streamviewer.

 

Event Retention and Calculating Throughput

 

The Event Retention and Calculating Throughput example demonstrates two SAS ESP techniques:

 

  • Using a user-defined function in a Compute window to calculate the event throughput rate
  • Using Copy windows to retain events for further processing

 

Compute windows take the input stream and create an output stream using computational manipulation. New output field values are created using expressions, user-defined functions, or plug-in functions. This example uses a user-defined function to calculate throughput rate.

 

User-defined functions contain two parts. An initializer function executes when the model starts and the main portion of the function executes each time an event passes through the stream. The example uses a user-defined function to calculate throughput rate.

 

There are two types of retention, time-based and volume based. Time-based retention uses either the system clock or embedded time values to determine the retention period. Volume-based retention uses the number of events.

 

There are two variants, sliding and jumping. Sliding retains the x most recent events after the threshold is reached. Jumping clears each time the threshold is reached. You can use this example to try different techniques.

 

The GitHub pages includes videos that demonstrate the following:

 

  • Editing the model with a text editor
  • Editing the model using SAS ESP Studio
  • Subscribing to the output with SAS ESP Streamviewer.

Whether you're already using SAS Event Stream Processing or thinking about it, this is where you can connect with your peers, ask questions and find resources.

 

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 0 replies
  • 1309 views
  • 2 likes
  • 1 in conversation