cancel
Showing results for 
Search instead for 
Did you mean: 

Number of column views for Analytical view

0 Kudos

Hi Folks

I created two Analytical view, in one of them I see OLAP view and in another the OLAP view is missing. Can anybody help me understand under what scenarios the OLAP view is created, I am pasting my two screen shots.

With OLAP View

============

Without OLAP View

====================

Poonam

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Poonam,

To add to Henrique's points above:

Refering to your first screenshot - The column view efashion/AN_SALES is a calculation view that runs on the calculation engine and the column view efashion/AN_SALES/olap is an analytic view that runs on the olap engine.

The reason why two column views are created here although you are only creating an analytic view is because you have a calculated measure or calculated attribute within your analytic view that references/uses an "attribute" column. In scenarios where an "attribute" is referenced/used within a calculation/formula, the olap engine cannot handle this (not natively supported although HANA modeller still allows you to create them within analytic views) and hence HANA automatically wraps the analytic view within a calculation view up on activation - so that it can be executed inside the calculation engine. Remember, this happens only when calculated attributes or measures uses attribute columns within the formula.

If you look at the definition (double-click or righ-click->open definition) of both efashion/AN_SALES and efashion/AN_SALES/olap, you'll find that the latter will not have your calculated measure (that uses an attribute) whereas the former will have all the fields defined in your analytic view. For large datasets, the performance on efashion/AN_SALES/olap will be much better than on efashion/AN_SALES simply because in the latter case, data will have to be moved between olap and calculation engines whereas in the former only the olap engine will be used.

SAP recommends avoiding the use of calculated attributes/measures using "attributes" where possible due to the above limitation. For e.g, if you are creating a calculated attribute to derive year from date field/column (attribute), you should instead make use of the time dimension to join with your data foundation.

Thanks,

Anooj

Former Member
0 Kudos

Thank you everyone for the detailed explanation here it has been of great help for my use case too. I know this is old post so let me know if I should create a new one.

My question is

When analytical view with calculated column on an attribute is built both Column Views -  efashion/AN_SALES (one with calc wrapper) and efashion/AN_SALES/olap (usual Analytical view) are created.

The performance is faster when going against efashion/AN_SALES/olap as compared to efashion/AN_SALES due to data transfer between engines. Hence, for queries which do not use the calculated column, going against  efashion/AN_SALES/olap is ideal whereas for queries which do need calculated column one has to go to  efashion/AN_SALES.

Now, the question does this logic have to be embedded at application layer or is it possible to make hana decide this on the fly?

Answers (1)

Answers (1)

henrique_pinto
Active Contributor
0 Kudos

These underlying column views created in the _SYS_BIC schema are not really documented since they are not supposed to be browsed directly by the users but just components of the view you've created under the "content" packages.

That being said, one thing I've observed is that apparently HANA just creates the "<package>/<AN>/olap" column view when the analytical view has calculated attributes/measures (i.e. it needs to go through the Calculation Engine). In these cases, the "<package>/<AN>" object is a column view with Calculation Scenario (you can double click on it and go to the definition statement). In the cases the Analytic View has no calculations to be performed, the last level it needs to go through is the OLAP Engine, and then the column view named as "<package>/<AN>" is already the OLAP column view. You can also say that just by looking at the column view icon - the OLAP column views have a little cube in the corner; the Calculation Scenario column views have a little calculator in the corner.

Again, this is all just pure observation and nothing is documented, but it made sense to me when I looked at it.

0 Kudos

Hi Henrique

In my case I dont have calculated measure/attribute in the object where OLAP is generated, while I have a calculated measure where there is no OLAP View

I went ahead and created a brand new object without calculated measure and the number of column views was 2 + private attributes not in join and then I added the calculated measure and then number of veiws did not change.

Is there a Hana moderator who is watching this forum and who can clarify this doubt.

Poonam

henrique_pinto
Active Contributor
0 Kudos

You always have an OLAP Column View, even if the object is not named <something>/olap.

The OLAP CV is the one with the little orange cube icon - you can see you have them in both of your views.

The point is that for the one with no calculated column, the main view itself is already the OLAP CV, hence HANA doesn't need to create any underlying object named <something>/olap - the OLAP CV's name is the name of the Analytic View itself.

On the case you do have calculated columns, the main view is the Calculation Scenario CV, and then HANA does need to create an underlying OLAP CV, which it automatically names as <your analytic view's name>/olap.

To sum it up: my understanding of it is that the name does not define the object's type, it's just some internal naming convention.

The object type is defined by the syntax in the CREATE COLUMN VIEW statement (and can also be deduced by the object's icon).