0% found this document useful (0 votes)
100 views43 pages

Markus Fath, SAP HANA Product Management June 2013

HANA PUB

Uploaded by

Tamanna Lover
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
100 views43 pages

Markus Fath, SAP HANA Product Management June 2013

HANA PUB

Uploaded by

Tamanna Lover
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

SAP HANA

Markus Fath, SAP HANA Product Management


June 2013
Agenda

What is SAP HANA?


How do I use SAP HANA?
How can I develop applications on SAP HANA?
That’s it?

© 2013 SAP AG. All rights reserved. Public 2


What is SAP HANA?

SAP HANA is an in-memory data platform that is deployable as an on-


premise appliance, or in the cloud. It is a revolutionary platform that’s
best suited for performing real-time analytics, and developing and
deploying real-time applications. At the core of this real-time data
platform is the SAP HANA database which is fundamentally different
than any other database engine in the market today.

© 2013 SAP AG. All rights reserved. Public 3


What is SAP HANA?

In-memory database
hardware - 8 CPU*10 cores, 1TB RAM
software - column store, compression, partitioning
3B scans/s/core, 12.5 aggregations/s/core
Analytics
real-time – analyze as data keeps rolling in
agility – logical views
Applications
integrated, lightweight application server

© 2013 SAP AG. All rights reserved. Public 4


What is SAP HANA?

Side-by-Side Scenarios (2010) SAP BW on HANA (2011) SAP HANA as data platform (2012)
Agile Data Marts SAP HANA as primary persistence SAP HANA for SAP Business Suite
Real-time Operational Reporting SAP NW Application Server on HANA SAP HANA for custom applications

© 2013 SAP AG. All rights reserved. Public 5


How do I use SAP HANA?
Storing data in SAP HANA

SAP HANA speaks SQL.


> CREATE SCHEMA ka;
> CREATE TABLE ka.complaints (cmplid INT, …);
> INSERT INTO ka.complaints VALUES (1, …);
> SELECT cmplid, … FROM ka.complaints;

© 2013 SAP AG. All rights reserved. Public 7


Storing data in SAP HANA

Applications writing
directly into SAP HANA

Real-time replication using


SAP LT Replication Service Data loaded from files
using IMPORT / INSERT

Message queue integration


with Sybase ESP ][ ][ ][ Data loaded at certain events
using Business Objects Data Services

© 2013 SAP AG. All rights reserved. Public 8


Using data in SAP HANA

You define views, to make data


easily accessible to everyone.

© 2013 SAP AG. All rights reserved. Public 9


Using data in SAP HANA

Attribute
View
Calculation View

T
T Views enable real
real-time computing by transforming
T
data on the fly.
T
T
T
T
T T T
T

Table Analytic View

© 2013 SAP AG. All rights reserved. Public 10


Attribute View

© 2013 SAP AG. All rights reserved. Public 11


Analytic View

© 2013 SAP AG. All rights reserved. Public 12


Calculation View

© 2013 SAP AG. All rights reserved. Public 13


Using data in SAP HANA

Query

Statement Processor
SELECT … Execution plan
FROM …
WHERE …
Calculation Engine Op

Op Op Op

Data Stores

Op
Views Op Op Op

Persistency Layer

Save
Logs
Point

© 2013 SAP AG. All rights reserved. Public 14


Using data in SAP HANA
SAP Business Apps on HANA
Objects BI Applications on any
Analytical platform using SQL
applications build with via ODBC/JDBC
BI Suite products

SQL, MDX

Analytic Calculation
Engine Engine
Modeler Views Engines

Tables

SAP HANA Studio App Objects Store

SAP HANA

© 2013 SAP AG. All rights reserved. Public 15


Using data in SAP HANA

SAP Business Objects provides an entire


suite of BI front-ends to access data in SAP HANA

SAP Business Objects Crystal Reports


SAP Business Objects WebIntelligence
SAP Business Objects Analysis for MS Excel
SAP Business Objects Explorer
SAP Business Objects Visual Intelligence

© 2013 SAP AG. All rights reserved. Public 16


Developing for SAP HANA
SAP HANA Programming Model
Paradigm Shift - Responsibilities in Runtime Layers
Classic Application Server Layers HANA Native Applications

Client Browser
Display pre-rendered UI Complete UI Rendering
Proprietary Protocol
http(s), OData (pure data only)
Application Server

UI Rendering
HANA
Extended Application Services
Application Logic Procedural Application Logic
HdbNet
DBI/DBSL, DB buffer (minimal data volume)

SQL Database

Database Data-intense Application Logic


SQL

© 2013 SAP AG. All rights reserved. Public 18


SAP HANA Programming Model
Technologies

Presentation
Browser
HTML5 / SAPUI5 Complete UI Rendering
Client-side JavaScript
http(s), OData (pure data only)

Control Flow
HANA
OData Extended Application Services
Server-side JavaScript Procedural Application Logic
HdbNet
(minimal data volume)
Data Processing
SQL / Views / SQLScript Database
Data-intense Application Logic
Application Function Library (AFL)

© 2013 SAP AG. All rights reserved. Public 19


SAP HANA Native Applications
SQLScript
What is SQLScript?
Interface for applications to access SAP HANA; extension of ANSI Standard SQL
Language for creating stored procedures
Declarative logic including SELECT queries, built-in Calculation Engine Functions
Orchestration logic including Data Definition Language (DDL), Data Manipulation Language (DML), assignment, imperative logic

SQLScript allows execution of data intensive calculations inside SAP HANA


Eliminates need to transfer large amounts of data from the database to the application
Maximum benefit from SAP HANA features such as fast column operations, query optimization and parallel execution

Advantages (compared to SQL)


Functions can return multiple results
Complex functions can be broken down - modular programming, reuse, and understandability
Functions can have parameters
Supports local variables for intermediate results with implicitly defined types
Provides control logic such as if/else

© 2013 SAP AG. All rights reserved. Public 20


SQLScript
Code example using SQL

CREATE PROCEDURE getComplaintsAggSQL (


in cmplid INTEGER, Complaints
out o_complaints tt_complaints)
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
READS SQL DATA AS
BEGIN Q1 Q2
/*****************************
Write your procedure logic
*****************************/
ta_complaints =
SELECT CMPLID, MAKE, MODEL, CDESCR, COUNTER FROM "KA"."COMPLAINTS"; Q3
ag_complaints =
SELECT MAKE, SUM(COUNTER) AS TOTAL_FOR_MAKE FROM "KA"."COMPLAINTS" GROUP BY MAKE;
jo_complaints =
SELECT T1.CMPLID, T1.MAKE, T1.MODEL, T1.CDESCR, T1.COUNTER, T2.TOTAL_FOR_MAKE
FROM :ta_complaints AS T1, :ag_complaints AS T2 Q4
WHERE T1.MAKE = T2.MAKE;
o_complaints =
SELECT CMPLID, MAKE, MODEL , COUNTER, TOTAL_FOR_MAKE
FROM :jo_complaints WHERE CMPLID = :cmplid; Result
END;

© 2013 SAP AG. All rights reserved. Public 21


Using data in SAP HANA

Set Operations

Operation Calculations on Data

Business Function Calls

Predictive Analysis Algorithms


Operations can be all sorts
R Procedure Calls of operations on data – not just basic
SQL operations but also more complex logic

© 2013 SAP AG. All rights reserved. Public 22


SAP HANA
Application Function Library

What is Application Function Library (AFL)?


Set of native, pre-built, parameter-driven, commonly used algorithms
Optimized for performance
Functions can be called from SQLScript
The Business Function Library (BFL) contains algorithms primarily related to finance
Stock Flow, Lease, Depreciation, Discounted cash flow, Inflated cash flow, …
The Predictive Analysis Library (PAL) contains algorithms primarily related to predictive analysis and data
mining
Regressions, KNN, k-Means, Exponential Smoothing, Apriori, …

© 2013 SAP AG. All rights reserved. Public 23


SAP HANA Programming Model
Technologies

Presentation
Browser
HTML5 / SAPUI5 Complete UI Rendering
Client-side JavaScript
http(s), OData (pure data only)

Control Flow
HANA
OData Extended Application Services
Server-side JavaScript Procedural Application Logic
HdbNet
(minimal data volume)
Data Processing
SQL / Views / SQLScript Database
Data-intense Application Logic
Application Function Library (AFL)

© 2013 SAP AG. All rights reserved. Public 24


SAP HANA Extended Application Services

What are Extended Application Services?


Small footprint application server / web server for application development inside SAP HANA

Enable application development and deployment while minimizing architectural “layers”


Create apps that have an http-based UI (browser, mobile apps)
Apps run directly on SAP HANA, w/o additional external servers or components
simplified system architecture; low TCO
Tight integration with SAP HANA DB
best possible performance

Scope
Lightweight web-based applications
Complex Enterprise Business Applications

© 2013 SAP AG. All rights reserved. Public 25


SAP HANA Extended Application Services
OData Service Implementation

© 2013 SAP AG. All rights reserved. Public 26


SAP HANA Extended Application Services
JavaScript Service Implementation
var iSearchTerm= $.request.parameters.get('searchterm');
var output = '';
var list = [];

function createEntry(rs){
return {
"CMPLID" : rs.getInteger(1),
"MAKE" : rs.getString(2),
"MODEL" : rs.getString(3),
"CDESCR" : rs.getString(4)
};
}

var query = "SELECT CMPLID, MAKE, MODEL, CDESCR FROM \"KA\".\"COMPLAINTS\" " +
"WHERE CONTAINS (CDESCR, ?) ORDER BY SCORE() DESC LIMIT 10 ";
var dbconn = $.db.getConnection();
var stmt = dbconn.prepareCall( query );
stmt.setString(1, iSearchTerm);
stmt.execute();
var result = stmt.getResultSet();

while (result.next()) {
list.push(createEntry(result));
}

result.close();
stmt.close();
dbconn.close();

output = JSON.stringify( {"entries": list } );

$.response.setBody(output);
$.response.contentType = 'text/json';

© 2013 SAP AG. All rights reserved. Public 27


SAP HANA Programming Model
Technologies

Presentation
Browser
HTML5 / SAPUI5 Complete UI Rendering
Client-side JavaScript
http(s), OData (pure data only)

Control Flow
HANA
OData Extended Application Services
Server-side JavaScript Procedural Application Logic
HdbNet
(minimal data volume)
Data Processing
SQL / Views / SQLScript Database
Data-intense Application Logic
Application Function Library (AFL)

© 2013 SAP AG. All rights reserved. Public 28


SAP HANA
SAPUI5

SAP UI development toolkit for HTML5


(SAPUI5) is a cross-browser JavaScript
library for building rich internet
applications.

© 2013 SAP AG. All rights reserved. Public 29


SAP HANA
SAPUI5

//Create an instance of the table control


var oTable = new sap.ui.table.Table({
title: "Complaints",
visibleRowCount: 10,
firstVisibleRow: 1,
columnHeaderHeight: 30,
navigationMode: sap.ui.table.NavigationMode.Paginator
});
//Define the columns and the control templates to be used
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "ID"}),
template: new sap.ui.commons.TextField().bindProperty("value", "CMPLID"),
sortProperty: "CMPLID",
filterProperty: "CMPLID",
width: "50px"
}));
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Make"}),
template: new sap.ui.commons.TextField().bindProperty("value", "MAKE"),
sortProperty: "MAKE",
filterProperty: "MAKE",
width: "50px"
}));
...
//Create a model and bind the table rows to this model
var oModel = new sap.ui.model.odata.ODataModel("../data/complaints.xsodata/", false);
oTable.setModel(oModel);
oTable.bindRows("/COMPLAINTS");
oTable.placeAt('result');

© 2013 SAP AG. All rights reserved. Public 30


SAP HANA Studio Development Perspective and Repository

Environment for building native HANA applications


Developing
Testing
Debugging
Supportability
Lifecycle Management

Application objects are stored in the repository


Versioning
Packaging
Transport

© 2013 SAP AG. All rights reserved. Public 31


What else?
Using data in SAP HANA
HANA Search UI HANA App SAP Business Apps on HANA
Search UI configured built with Objects BI Applications on any
with the Info Access
(InA) toolkit for
SAPUI5 Analytical platform using SQL
applications build with via ODBC/JDBC
HTML5 running Application running
natively on SAP natively on / against BI Suite products
HANA SAP HANA

SQL, MDX

Info Access server-side


(InA) Service JS, OData
Extended Application Services

Search Analytic Calculation


Engine Engine Engine
Modeler, Views
Dev. Procedures Engines
Workbench JS code

Linguistic Entity, Fact


Tables Processing Extraction
SAP HANA Studio App Objects Store Preprocessor

SAP HANA

© 2013 SAP AG. All rights reserved. Public 33


SAP HANA Fulltext Search and Text Analysis

Capabilities
Native full text search
In-database text analysis
Graphical modeling of search models
Info Access (InA) toolkit for HTML5 UIs

Benefits
Exploit unstructured content in SAP HANA without additional costs
Extract meaningful information from text
Combine structured and unstructured information for unified information access
Less data duplication and movement – leverage one infrastructure for analytical and search workloads
Speed up HTML5 application development – InA toolkit

© 2013 SAP AG. All rights reserved. Public 34


SAP HANA
Search Model Example

© 2013 SAP AG. All rights reserved. Public 35


SAP HANA
Info Access (InA) toolkit for HTML5

© 2013 SAP AG. All rights reserved. Public 36


SAP HANA
Text Analysis
Source Table “COMPLAINTS”

CREATE FULLTEXT INDEX FTI_COMPLAINTS


ON COMPLAINTS(CDESCR)
CONFIGURATION 'EXTRACTION_CORE' TEXT ANALYSIS ON;

© 2013 SAP AG. All rights reserved. Public 37


SAP HANA
Text Analysis – Downstream Processing

Text Analysis results are stored in a table and therefore can be leveraged in
all supported HANA scenarios
“Standard” analytics
Create Analytic Views and Calculation Views on top
e.g. companies mentioned in news articles over time

Data mining, predictive


Use R, Predictive Analysis Library (PAL) functions
e.g. clustering, time series analysis etc.

Search Based Applications


Create a search model and build a search UI with the HANA Info Access (InA) toolkit for HTML5
Text Analysis results can be used to navigate and filter search results
e.g. people finder, search UI for internal documents

© 2013 SAP AG. All rights reserved. Public 38


Use Cases

Real-time analytics on large data volumes


Financials
Production planning, monitoring
Sales optimization

Combine structured and unstructured information


Patent research
Consumer sentiment analysis, brand monitoring
Healthcare

© 2013 SAP AG. All rights reserved. Public 39


How to get started
SAP HANA Developer edition

• For product evaluations, trials, students, data


exploration projects, etc.

• Software is free, developers pay cloud provider


for server usage.

• Focused on small- to mid-sized data footprint,


with non-productive use only

• Community supported through


http://saphana.com/cloud
http://developers.sap.com/hana
• Available of choice on 4 public cloud providers

© 2013 SAP AG. All rights reserved. Public 41


Additional Resources

http://developers.sap.com/hana
30 days trial, development community

http://www.saphana.com/welcome
Additional information, e.g. use cases

http://www.saphana.com/community/implement/hana-academy
Videos and courses

http://help.sap.com/hana_appliance/
Online documentation, e.g. Developer Guide

© 2013 SAP AG. All rights reserved. Public 42


Thank you

Contact information:

Markus Fath
SAP HANA Product Management
markus.fath@sap.com

You might also like