on 2020 Sep 23 2:50 PM
Hi all.
I'm trying to define a view-entity with the hana row_number()-windowing function. The definition is
entity testtable {
key id: Integer;
key validfrom: Date;
measure: Decimal(10,2);
};
entity tmp_test_rownum
as select from testtable
{
row_number() over ( partition by id order by measure asc, validfrom desc) as rownum,
// ^
// |
id,
measure,
validfrom
};
The cds-compiler ends up with error:
"Mismatched '(', expecting ',', '.', ':', '{', '@', FROM"
at position I've marked above
What is the correct form to use the function in CDL?
Thanks in advanced,
Thomas.
Request clarification before answering.
Unfortunately, this syntax is not yet supported in CAP CDL. As a workaround, you can create a native hdbview that contains the partition by logic and then declare a proxy entity in your CAP model as described in the guide here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
20 | |
9 | |
8 | |
7 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.