Use the SAP HANA Output adapter to send data from Event Stream Processor to an SAP HANA database.
Column | Datatype |
---|---|
RANDOMINT | INTEGER |
Once you have created the table, define an Open Database Connectivity (ODBC) data source that points to your HANA server.
<Service Name="hanaservice" Type="DB"> <Parameter Name="DriverLibrary">esp_db_odbc_lib</Parameter> <Parameter Name="DNS">hanadatasource</Parameter> <Parameter Name="User">HANA_USER</Parameter> <Parameter Name="Password"encrypted="false">password</Parameter> </Service>
The table is automatically populated with data from an input adapter named RandomIn.
See the Adapters Guide for more information about how to set up the SAP HANA Output adapter
The example creates a schema named HANARandom, followed by an input stream named Newstream that references HANARandom. Newstream attaches to a RandomIn input adapter. The RandomIn Input adapter provides random data as input to Newstream. Newstream also attaches to an SAP HANA Output adapter which uses the data provided by RandomIn to populate the database you set up as a prerequisite. The CCL code for this example is:
CREATE SCHEMA HANARANDOM (RANDOMINT integer); CREATE INPUT STREAM NEWSTREAM SCHEMA HANARANDOM; ATTACH INPUT ADAPTER RandomIn TYPE randomtuplegen_in TO NEWSTREAM PROPERTIES RowCount=10; ATTACH OUTPUT ADAPTER HANAOut TYPE hana_out TO NEWSTREAM PROPERTIES service='hanaservice', table='HANARANDOM';