You might already know that a large set of SAS Event Stream Processing (ESP) code samples are available at the following download site.
https://support.sas.com/downloads/package.htm?pid=2421
From there you can download a ZIP file and browse a treasure trove of code, which could be useful to automate a validation of an ESP deployment.
But suppose that you are interested in only one or two code samples, or in samples that showcase a specific ESP window. Downloading a 677MB ZIP file and then combing through directories to find what you need might prove a bit daunting. And how would you determine what each sample does? You can read code comments if they are there. But if they are not, what then?
Relax. The IoT enablement team has made things much easier for you. A subset of code samples is now available on developer.sas.com. Simply navigate to the SAS IoT Analytics tile. Click on that tile and then scroll down to “IoT analytics tutorials.” Then click “Go to tutorials.”
On the page where you land, the “Code snippets” drop-down menu enables you to access code for three classes of ESP windows:
Transformation windows:
- Aggregate window
- Compute window
- Copy window
- Filter window
- Functional window
- Join window
- Remove State window
- Transpose window
- Union window
Utilities windows:
- Pattern window
- Geo-fence window
Analytics windows:
- Calculate window
- Train and Score windows
The code samples are available through a GitHub repository that includes the XML code for ESP projects and associated CSV input files. The repository README files provide a handy summary of what the code does. Code samples have been tested to ensure that you need not budget debugging time.
Let us know how these code samples work for you!