on 03-27-2012 1:35 PM
Hi All,
Could some one please help me the difference between projection and aggregation while creating a calculation view
a) What is difference between projection and aggregation used to create a calculation view
For me both behaves in the similar way. I used the efashion data to model a calculation view. my calculation view consist of one analytic view which provides me the data for Amount Sold, Article Id, Year and Week Id
If I remove the week id from the output of calculation view then then Amount sold gets aggregated automatically at year level while using a projection or aggregation between the output of calc view and analytic view. If i use week id then the aggregation does not happen at year level immaterial of the fact I use projection or aggregation
Thanks
HANA Enthusiast
Hi Karthik,
Both will result same output which is expected.
As I read it somewhere,
Aggregation node makes a bit more sense when working with raw tables. Until now we could only use a projection node on top of RAW tables, what is confusing is that under certain circumstances the Calculation view might give you the same result when using either a Projection or an Aggregation node. The intrinsic difference is when using an Aggregation node is that internally less data is transferred since it’s aggregated; which one can argue could improve performance. With that said adding an Aggregation node on top of an OLAP view is questionable though since OLAP views by default aggregate. What’s also interesting is that the output node of a Calculation view is by default deployed as a aggregation node. In the image below you can see the differences in the amount of data that is transferred. In SP4 or sooner there will be the notion of multidimensional reporting where the output node can be deployed as a projection node instead.
Rgds,Murali
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank You, make sense to me now.
The piece of information which protrayed the difference between Projection and Aggregation you shared with me in this post was so useful.
I have many such questions and the documents that are available in SAP HELP Portal or other location are not enough. One such doubt I have is as below
Today while I was trying to understand Projection and Aggregation I found one thing, ADD to OUTPUT, and ADD to Aggregated Column in a Aggregation while in Projection there was only ADD TO OUTPUT. I need understand the definition of each of these features in SAP HANA. Is there a master reference guide available to understand all these.
I have the SQL Script reference guide though which I will skim through and try to check if the definition are available
Hi Karthik
As you mentioned while creating calculation with Aggregation view I have added the Amount column using add output option then the result was as follows.
Product Amount
1 10
2 10
3 10
4 10
When I used add as aggregated then the aggregation took place and the result is as below.
Product Amount
1 20
2 10
3 10
4 10
when we add it simply as output no aggregation takes place, when we add it as aggregated column only then the aggregation took place.I did this on top of column table.
Thanks
Santosh
Hi Karthik,
You can also follow blogs from
https://www.experiencesaphana.com/blogs/datamart
Rgds,Murali
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The projection is used to apply filter inside a calculation view on a join of views or union of mutiple joins. There is no other way of applying filters inside a calculation view than applying a projection.
Whereas, aggregation is the default feature of calculation view. All the unions, joins or projections will finally merge into the aggregation box. Only the selected columns inside the aggregation will be visible in the calculation view output.
Regards,
Aditya Kashyap
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Some ponits from my side...
Projection: Projection is used when number of records generated by an analytic view can be reduced by grouping and by applying filter criteria. In simple projection is used to filter or restrict the data.
Aggregation: The column engine supports the following aggregation expressions.
MIN | MAX | COUNT | SUM | AVG ([DISTINCT] <column engine expression>).
Mainly used while creating the calculation measure.
The aggregation is done on the first level in your case it is week level. If you remove then automatically the aggregation will be done on the year level.
Hope it is useful.
Regards,Neha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.