Search code examples
hana

Embedding code in SQL functions in SAP HANA


What programming languages does SAP HANA support in embedding code to run within the HANA cluster similar to how you would write your own SQL functions to run inside an RDBMS, or your own code to run on a Hadoop cluster.


Solution

  • You basically have two options here. The first thing would be Stored Procedures. These are actually pretty common in other databases like MySQL or DB2. You can create a new procedure with CREATE PROCEDURE. More information on this can be found in the HANA Documentation. The supported languages for this are SQLScript and R.

    Another thing that should be mentioned is the XS Engine. Every HANA (I think) has the XS Engine built in. This is basically a JavaScript frontend for your HANA. You can use the XS Engine to write JavaScript APIs, interfaces and applications directly on your HANA using JavaScript. Get started here.