BookmarkSubscribeRSS Feed

SAS Viya 3.5: Setup Snapshot of ESP Project Data

Started ‎07-21-2020 by
Modified ‎07-21-2020 by
Views 1,898

Starting with the SAS Viya 3.5 release, you can now setup connections to an SAS Event Stream Processing (ESP) Project. ESP enables you to capture and analyze streaming data from sensors, IoT devices, and other data sources. In this article, I will review the process for connecting to an ESP project and loading a snapshot of its data to memory, so you can use the data in SAS Viya.

Connect to an ESP Project

You can create a connection to an ESP project in either SAS Data Explorer or the SAS Environment Manager – Data tab.  In this article, I will walk through an example of doing this in SAS Data Explorer; however, the steps are similar if you prefer to use the SAS Environment Manager – Data tab.

 

To create a data connection in SAS Data Explorer, select the Data Sources tab and click icon1_connect.png.

 

1_Connect-1024x385.png

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

This opens the Connection Settings dialog.

 

2_ConnectionSettings.png

 

You will need to complete the following basic connection settings information:

  • Name: Enter the name for your ESP project connection
  • Server: Select the CAS server on which to create the CAS library
  • Type: Select Other
  • Source type: Enter the value ESP
  • Persist this connection beyond the current session: check this box

Below is the basic connection settings information for my example ESP project connection.

 

3_BasicConnect.png

 

You will need to ask your ESP system administrator for the following information that is required on the Settings and Advanced tabs to connect to the desired ESP server and project. For more information about connection options for an ESP server, refer to the documentation.

 

On the Settings tab, specify the following:

  • Path:  Enter the path for the ESP project
  • Description:  Enter a description for the ESP project connection.

Below is the Settings tab information for my example ESP project connection.

 

4_ConnectSettings.png

 

On the Advanced tab, specify the following:

  • Data transfer mode: Select Default
  • In the Additional Parameters section, add the following parameters:
    • Name: Enter the word server  Value: Enter the value for the ESP server
    • Name: Enter the word port     Value: Enter the value for the ESP server port number.

Below is the Advanced tab information for my example ESP project connection.

 

5_ConnectAdvanced.png

 

Now that I have added all the necessary connection information, I select Test Connection to confirm the connection settings.

 

6_TestConnection.png

 

After successful confirmation, I select Save to save the connection information for my example ESP project.  I then navigate to view the newly created connection.

 

7_ESPConnection.png

 

The connection created is a read-only CAS library which means the physical tables cannot be loaded into memory in this CAS library.

 

8_ReadOnly-1024x534.png

 

Note:  The Actions drop-down is grayed out when a table is selected in this data source.

 

You must use the "Add to Import" feature to load any of the tables you want to work with to a writeable CAS library.  I discuss this process in the next section.

Import a Snapshot of an ESP Project

Using the "Add to Import" feature on the defined ESP project connection gives you have a snapshot of the data that was streamed through that window. To import one of the tables from your defined ESP project connection:

  1. Select the table you want to import.
  2. Click icon2_AddToImport.png to open the ImportNote: you can also right-click the selected table and select Add to import.

     

    9_AddtoImport-1024x521.png

     

  3. On the Import window, enter the following information:
    • Target table name: Enter the desired name for the table you want to use in SAS Viya
    • Target location: Select the location where to write the target table.  Note: This must a CAS library you have permission to write to.
    • Save as an in-memory table only: Check this box if you only want to create an in-memory copy the table you are importing.  Note: The default is unchecked which means a physical copy of the table will also be created in the target location.
    • If target table name exists: Select whether to Cancel import or Replace file if the target table name already exists in the target location. Note: The default is Cancel import.
    • Label: Enter an optional label (description) for the imported table.
    • Format: Select the desired format for the physical table.  Note: This option is only available if you leave the Save as an in-memory table only option  The default format is sashdat.
    Below are the selections I made for importing my ESP project snapshot of my selected table.

     

    10_ImportSettings-1024x310.png

     

  4. Once all the import selections have been made, select Import Item to import the table.

     

    11_ImportItem-1024x335.png

     

    Note:  I could repeat the above steps if I wanted to work with snapshots of my other ESP project tables.

After the successful import, I can now navigate to my imported table and view its Sample Data.

 

12_SampleData-1024x602.png

 

Now I can run a data profile or perform other tasks with this snapshot of streamed data by selecting the Actions drop-down (or right-click) the in-memory table.

 

13_Actions-1024x492.png

Summary

In conclusion, you can set up a read-only CAS library connection to your ESP projects and then use the "Add to Import" feature to import a snapshot of the ESP project data for use in Viya.  For more information, please refer to the documentation:

Acknowledgements

Special thanks to my colleague, Uttam Kumar, for providing the ESP project information needed to setup the connection I used as an example in this article.

 

Version history
Last update:
‎07-21-2020 02:03 PM
Updated by:
Contributors

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags