Book Image

Real Time Analytics with SAP Hana

By : Vinay Singh
Book Image

Real Time Analytics with SAP Hana

By: Vinay Singh

Overview of this book

SAP HANA is an in-memory database created by SAP. SAP HANA breaks traditional database barriers to simplify IT landscapes, eliminating data preparation, pre-aggregation, and tuning. SAP HANA and in-memory computing allow you to instantly access huge volumes of structured and unstructured data, including text data, from different sources. Starting with data modeling, this fast-paced guide shows you how to add a system to SAP HANA Studio, create a schema, packages, and delivery unit. Moving on, you’ll get an understanding of real-time replication via SLT and learn how to use SAP HANA Studio to perform this. We’ll also have a quick look at SAP Business Object DATA service and SAP Direct Extractor for Data Load. After that, you will learn to create HANA artifacts—Analytical Privileges and Calculation View. At the end of the book, we will explore the SMART DATA access option and AFL library, and finally deliver pre-packaged functionality that can be used to build information models faster and easier.
Table of Contents (16 chapters)
Real Time Analytics with SAP HANA
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a restricted measure and a calculated measure


First of all, we will create a new analytical view (I hope you learned it well in the last chapter to do it yourself now). We will use two tables as the base table—sales and product (the table definition and sample data can be downloaded from Packt Publishing website). Re-verify that the structure of the table is as follows:

The following screenshot shows the Sales table:

The following screenshot shows the Product table:

Steps to create restricted measure and calculated measure:

  1. Our analytical view should look like this with joins:

  2. The join type is referential, with a cardinality of 1..N (PRODUCT to SALES table). Join the tables as shown in the following screenshot:

  3. Add to Output | SALES.CURR and PRODUCT.PRODUCT_TEXT.

  4. In the Semantics node, set the type for both columns to attribute. Select the hidden flag for the PRODUCT_TEXT attribute.

  5. In the Semantic node, define the type for AMT as Measure:

  6. Rename the measure (Rename AMT | Total_sales) in...