Question

I have a small clarification with respect to the views in HANA.

I have a analytical view in sap HANA: Now, I write a procedure to do some operation. Is it possible to use the result set of an analytic view in procedure?

Thanks

Was it helpful?

Solution

You can use the result set of analytic view in procedure.

Details:

Use CE Operator CE_OLAP_VIEW.

Description: The CE_OLAP_VIEW operator returns results for an existing OLAP view (also known as an Analytical View). It takes the name of the OLAP view and an optional list of key figures and dimensions as parameters. The OLAP cube that is described by the OLAP view is grouped by the given dimensions and the key figures are aggregated using the default aggregation of the OLAP view.

Example: You create an CE_OLAP_VIEW grouped by DIM1 with the key figure KF

out = CE_OLAP_VIEW("OLAP_view", ["DIM1", SUM("KF")]);

This is equivalent to the following SQL:

out = select dim1, SUM(kf) FROM OLAP_view GROUP BY dim1;.

Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top