on 08-05-2014 1:29 PM
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.
Hello,
A third alternative for getting data from HANA is to use the getData() function:
/*
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;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.