Skip to Content
Sep 04, 2014 at 08:04 PM

How do Calculation Views work if called from SQL Script?


I have a scenario where I am wanting to select a data set from a Calculation View via SQL script. The CalcView would ideally have some input parameters that can be dynamically filled upon selecting from it via SQL Script. But my understanding is that can't be done. So my question is this, if I take out the input variable and instead use a "where" clause in SQL script, will that selection in the where clause be applied to the initial Aggregation set? Or does Hana first retrieve the entire record set in the Aggregation, then filter it with my where clause selection later?

For example: I have a CalcView that gets initial data from an Aggregation (we'll call this "InitAgg"), then in between that and the final connection to the Semantic point I do some sort of filtering and joining and what not, and then end with connecting to the final Aggregation point (we'll call this "FinalAgg").

If I then write the SQL script "select * from SYS_BIC.myPackage/myCalcView where column = 'something'", does Hana send that where clause to the "InitAgg"? Or does "InitAgg" grab everything to process and later, after "FinalAgg", the filter is applied?

Thank you for any help you can provide!