28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

118<br />

Adding Unions/Joins/ Projections/ Aggregation<br />

a. From the Tools Palette, choose the required option as follows:<br />

View Description<br />

Union Used to combine the result set of two or more data<br />

sources. For example, to show the names of all the<br />

employees of a store which has different branches each<br />

maintaining its own employee records table.<br />

Join Used to query data from two or more data sources,<br />

based on a specified condition. For example, to retrieve<br />

the sales of two stores maintaining individual table for<br />

sales based on the customer ID.<br />

Projection Used to filter or create a subset of the required columns<br />

of a table or view for creating the model. For example,<br />

selecting the employee name and sales quantity from a<br />

table consisting of many more columns.<br />

Aggregation Used to summarize data of a group of rows by<br />

calculating values in a column. For example, to retrieve<br />

total sales of a product in a month. The supported<br />

aggregation types are sum, min, and max.<br />

Note:<br />

○ The input for union, join, projection, and aggregation views can consist of data sources, union,<br />

join, projection, or aggregation views.<br />

○ You can have only one source of input for aggregation and projection views.<br />

○ You can choose to create filters on projection and aggregation view attributes.<br />

b. Map the input to the selected option.<br />

Mapping attributes<br />

a. To map attributes in a union view, drag and drop the required columns from Source to Target.<br />

You can also modify the attribute mapping. For more information, see Managing Attribute Mappings<br />

[page 122]<br />

Tip: To create a system generated mapping, choose Auto Map By Name.<br />

b. In case of a join view, join the columns of the source data sources.<br />

Note:<br />

○ The output of a union view is the attributes that you added to the Target.<br />

○ The output of a join view is the joined attributes. However, to add additional attributes to the<br />

view's output, from the context menu, choose Add to Output.<br />

○ To add attributes of projection or aggregation view to its output, choose Add to Output from<br />

the context menu.<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved.<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Setting Up the Analytic Model

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!