Skip to Content

If you’re an SAP HANA user, you likely already know about its Web IDE, a browser-based environment that lets you build a variety of HANA applications. We’ve recently added smart data streaming modules to the mix, so that you can now develop streaming projects in HANA’s Web IDE, and deploy them though the streaming runtime tool for running and testing.

This development tool is ideal for users of the smart data streaming developer edition, but you’re also welcome to try it out if you use smart data streaming on-premise.

Here’s a quick feature summary:

  • Smart data streaming modules in Web IDE provide a CCL text editor, a CCR text editor, and a CCL visual project viewer.
  • You can develop new streaming projects in Web IDE, or you can import saved CCL and CCR files into the workspace.
  • The CCL text editor has code autocomplete, syntax highlighting, and real-time error checking.
  • You can create and manage data services through the streaming runtime tool.
  • The streaming runtime tool, other than providing runtime control for streaming projects, also includes a stream viewer, record and playback tools, and a manual input tool.

However, there are still some restrictions:

  • The CCL visual viewer is read-only, so you can’t edit a streaming project directly through it.
  • There is no schema discovery or data service discovery.
  • There is no support for machine learning models.

If you need to use any of these features, you’ll have to stick to HANA studio.

Walkthrough Tutorial

Here’s a quick overview tutorial to get you started with smart data streaming modules in Web IDE, once you’ve completed all of the prerequisites: ensured that Web IDE is installed with the smart data streaming plugin, set up your user authorizations, and logged into XSA. You can find all of the instructions for that in the SAP HANA Smart Data Streaming: Developer Guide.

1. Create a multi-target application (MTA).

  1. Right-click on the Workspace folder, and go to New > Project From Template.
  2. Choose Multi-Target Application Project.
  3. Go through the setup wizard, filling in any required content, then click Finish to add the MTA to the workspace.

2. Add a streaming module to the MTA you just created. Right-click on the MTA folder (I named mine “MyProject”), and go to New > More… Then, choose Smart Data Streaming Module.


3. Again, go through the setup wizard, and click Finish to add the module to your MTA. You should see something like this:

The streaming module will always have a model folder, with two files: model.ccl and model.ccr. 

4. Double-click on the model.ccl file to open it in the CCL text editor. For the purpose of this example, I’ll make a very simple project with an input window and a HANA adapter.

Tip: You can use default code snippets to get you started on some basic CCL elements. They provide a blank slate element for you to fill in with personalized content. For example, you can use a snippet for the HANA adapter:

Which gives you the following code:

5. After filling in the details for the adapter, save the project and take a look at it through the CCL viewer. Right-click on model.ccl, and go to Open With > Graphical Viewer, which looks like something like this:

6. Build and deploy the project to the smart data streaming server. Right-click on the streaming module folder (streamingproject, in this example), and select Build. This compiles and runs the project, and deploys it to the streaming runtime tool.

7. Switch over to the streaming runtime tool to manage the project you just deployed. Go to Tools > Smart Data Streaming Runtime Tool, which opens in a new tab.

8. In the streaming runtime tool, open Workspace > [your workspace folder] > Projects > [project name].

The streaming workspace folder name is randomly generated by the compiler. If you have multiple deployed modules, you can find out which one this is by opening up the console in Web IDE (View > Console), and looking for the following text:

Finished trying to stop and remove SDS module (SDS project) streaming_175f4d60be5811e68bf20b9531044ca7/streamingproject

9. Double-click an input stream (MyInStream) to open it in the stream viewer. Since we haven’t set up any data inputs, it just appears empty for now.

10. Test the project by inputting manual data. Right-click on the streamingproject folder and select Manual Input.

11. In the manual input pane, add a couple of rows of data. You can do this in a few different ways: publish each row one at a time, save a few rows and publish them all in one block, or save a few rows and publish them in custom-sized blocks. Here, I’ll just add three rows, one at a time. The end result should look something like this:

Now, this project uses a HANA output adapter, and I specified in the adapter’s properties that it should use the data service hdb1. Currently, that data service doesn’t exist, so the project isn’t publishing anywhere. Conveniently, you can create a data service directly through the streaming runtime tool.

12. In the Workspace pane, right-click on the Data Services folder and choose Add HANA Service. Fill in all of the required information, and click Save.

13. Right-click on the streaming project folder and select Refresh. Now, if you manually input any data, it will also output into the HANA table you specified.

References

See more detailed information on developing streaming projects in Web IDE in the SAP HANA Smart Data Streaming: Developer Guide, or check the SAP HANA Developer Guide for SAP HANA XS Advanced Model for general documentation about SAP Web IDE.

Check out our other blogs on new features in 2.0:

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

  1. Mantri Shekar

    Hi Lena Larionova,

    I am trying to create streaming project by following your tutorial.But when am trying to create project in my hana trial account’s sap web ide it is not showing the option of MTA.
    Could you please let me know do we need to perform any setting to get MTA Option.
    Looking forward for your reply.

    (0) 
  2. Diego Tosato

    Hi Lena, thanks for the nice tutorial. Could you please explain me how to add the sds service instance as resource to the mta.yaml configuration file?

    Regards.

    Diego

    (0) 
    1. Bin Wei

      By default, when you create the Streaming module with WebIDE, the following 2 sections (Streaming resource and Streaming module, the Streaming module references the Streaming resource by the “requires” key.) will be generated automatically in the mta.yaml for the MTA project.

      If the Streaming resource is missing, the user could add the section manually. The resource type for Streaming is “com.sap.xs.sds”.

      (0) 
  3. Diego Tosato

    Finally, I found the solution by myself which is straightforward. The point is that you must build the streaming project and you DO NOT have to build the MTA project, because if you do that, you get back several misleading errors.

    (0) 

Leave a Reply