Hello Jeff,
thank you, your reply is extremely helpful, as always.
We are still prototyping, so I take your advise, create a table in HANA with the additional informations, and add a flex window with the CCL getdata() function. It works.
I post my code here, could you please take a look if this is clean enough? In the case of assigning values to the outrec
outrec := [id = window1.id; ...]
is there a simple way to assign all values of window1 to outrec, then plus the 2 new column values?
Thanks and regards,
Tao
CREATE INPUT WINDOW window1
SCHEMA (
id long ,
pdf integer ,
url string ,
wma integer
)
PRIMARY KEY (id) ;
CREATE Flex pdf_flex
IN window1
OUT OUTPUT WINDOW window2 SCHEMA(
id long ,
pdf integer ,
url string ,
wma integer ,
volume integer,
price float
) PRIMARY KEY (id)
BEGIN
DECLARE
typeof(window2) outrec;
typedef[integer pdf;|integer volume; float price;] datarec;
vector(datarec) pdfdata;
END;
ON window1 {
if(isnull(pdfdata)) pdfdata :=new vector(datarec);
if(window1.pdf=0 OR window1.pdf=2)
{
getData(pdfdata,'ana_odbc','select pdf, volumn, price from zhangta.pdfdata where pdf = ?',window1.pdf);
for(rec in pdfdata)
outrec := [id = window1.id; pdf = window1.pdf; url = window1.url; wma = window1.wma; volume = rec.volume; price = rec.price];
output setOpcode(outrec,insert);
}
else
{
outrec := window1;
output setOpcode(outrec,insert);
}
resize(pdfdata,0);
};
END;