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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

○ Select the Data Foundation node in the Scenario panel, and in the context menu of the Details panel,<br />

choose Add Tables.<br />

Note: You can choose to add the same table again in Data Foundation using table aliases in the<br />

editor. For example, if you want to have different cardinalities from the same table.<br />

Restriction: It is not allowed to add column views to the Data Foundation of an analytic view.<br />

However, you can add column views in a calculation view.<br />

Remember: If there is more than one table, you need to specify one of the tables as the central<br />

table (fact table) from which the measures will be derived. You can specify the central table by<br />

selecting a value in the Central Entity property of the Data Foundation node.<br />

b) If you want to query data from more than one table, in the Details panel context menu, choose Create<br />

Join, and enter the required details.<br />

Tip: After specifying the central table or choosing one of the field as measure, when you save the<br />

view automatic assignment of attributes and measures is done. All the numeric fields from the<br />

central table are assigned as measures and others as attributes. In this case, you will not be able<br />

to join measures with other numeric fields. Also, if you have specified all the attributes and<br />

measures of the view before saving it, automatic assignment of attributes and measures will not<br />

overwrite them.<br />

Note: After creating the join, you can edit its properties such as join type, cardinality, etc in the<br />

Properties view. You can choose to create a Text Join between table fields in order to get language<br />

specific data. For example, consider that you have a product table that contains product IDs but<br />

no product description, and you have a text table for products that has language-specific<br />

description for each product. You can create a text join between the two tables to get languagespecific<br />

details. In a text join, the right table should be the text table and it is mandatory to specify<br />

the Language Column.<br />

c) Add the table columns to the output structure (Semantics node) that you want to use to define the facts<br />

in any of the following ways:<br />

○ Select the toggle button on the left of the table field.<br />

○ Right-click the table field, and choose Add to Output.<br />

d) If you want to specify a filter condition based on which system must display data for a table field in the<br />

output, for example to display revenue for only selected companies based on the filter value, do the<br />

following:<br />

1. Right-click the table field, and choose Apply Filter.<br />

2. Select the required operator, and enter filter values.<br />

The table fields selected above form the fact table.<br />

e) To create a star schema that is, linking the fact table with the descriptive data (attribute views), do the<br />

following:<br />

1. Add the required attribute views in the Logical Join node in any of the following ways:<br />

○ Drag the required attribute views present in the Content node to the Logical Join node.<br />

○ Select the Logical Join node in the Scenario panel, and choose Add button to add the attribute<br />

views.<br />

2. Create joins between the views and fact table.<br />

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

Setting Up the Analytic Model<br />

P U B L I C<br />

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

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

Saved successfully!

Ooh no, something went wrong!