cancel
Showing results for 
Search instead for 
Did you mean: 

Input data from HANA

Former Member
0 Kudos

Hi team,

Would I input data from HANA to ESP.

I found SAP HANA output adapter, but I seems to be used for output.

Is there no way that ESP get data from HANA ?

Thank you in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

A third alternative for getting data from HANA is to use the getData() function:

  http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01621.0514/doc/html/vge1312573080739...

/*

CREATE COLUMN TABLE "SYSTEM"."ALERI" ("C1" INTEGER CS_INT NOT NULL ,

  "C2" INTEGER CS_INT NOT NULL ,

  "C3" INTEGER CS_INT NOT NULL ,

  "C4" VARCHAR(25) CS_FIXEDSTRING NOT NULL ,

  "C5" LONGDATE CS_LONGDATE,

  PRIMARY KEY ("C1")) UNLOAD PRIORITY 5 AUTO MERGE WITH PARAMETERS ('PARTITION_SPEC' = 'HASH 4 C1')

  Insert some data into the "ALERI" table.

*/

CREATE INPUT stream StockStream SCHEMA (NewColumn1 INTEGER, NewColumn2 INTEGER, NewColumn3 INTEGER, NewColumn4 STRING ,

NewColumn5 bigdatetime );

CREATE Flex stock_flex

IN StockStream

OUT OUTPUT STREAM stock_traded SCHEMA (c1 INTEGER, c2 INTEGER, c3 INTEGER, c4 STRING, c5 BIGDATETIME)

BEGIN

  DECLARE

     vector (typeof (stock_traded)) asedata;

  END;

  ON StockStream {

  if(isnull(asedata))

  asedata := new vector(typeof (stock_traded));

  getData(asedata,'HANAODBCService','select * from aleri');

  for(rec in asedata)

  output setOpcode(rec,insert);

  resize(asedata,0);

  };

END;

JWootton
Advisor
Advisor
0 Kudos

There are a couple of ways to easily do this:

1.  Join CCL streams/windows to HANA tables using the CCL REFERENCE element

2.  Use the "Generic DB input adapter" to pull HANA data into ESP input windows

I hope this helps,

Jeff