SAP HANA: Getting started with the SAP HANA Developer Center
Hello Folks,
SAP Mentor and Development Expert Alvaro Tejada Galindo covers some HANA basics:
1)Creation of a account @CloudShare
2)Basic SQL DDL Commands @SAP HANA
3)Flat file loading into SAP HANA using .CSV files
4)Using Information models @SAP HANA
1)Creation of a account @CloudShare
2)Basic SQL DDL Commands @SAP HANA
3)Flat file loading into SAP HANA using .CSV files
4)Using Information models @SAP HANA
Link :
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70e2ff67-587c-2f10-5da1-8e5ddbade447?QuickLink=index&overridelayout=true&54863912242536
SAP HANA: Quick Launch screen in SAP HANA – Part1
Hello Everyone,
In this document, I would like to take you through the different options available at Quick launch screen in SAP HANA.
1) Select System.
2) New (where we can create all Models).
3) Package
4) Content
5) Setup
6) Data
7) Help
Now I will explain about each one.
1) Select System: If we have multiple HANA servers in the same system then here we can assign the required system to the user. One user can connect to one system at a time.
Navigation:
i) Click on ‘Select System’. You will get the list of all available systems.
ii) Select the required system and click on ‘OK’.
iii) Now we can see the mapped system to the user in below screen.
2) New: In this section we can create all the modeling objects in SAP HANA.
The hierarchy for modeling objects is first creating Package in the system. Package holds the modeling objects in SAP HANA, then create the objects you require.
Different Modeling Objects we can create are
i) Attribute View: Which hold the information using which we can analyze the facts/Key values(Mater Data). We can call this as Dimension in SAP BI.
ii) Analytic View: This holds the information about the key figures and required information to analyze these key figures. Generally Analytic View will be linked to the Attribute view if data flow is bigger. We can call this as Fact table in SAP BI.
Note: Restriction here is we can select key figures only from one table.
iii) Calculation View: If you have a requirement where we need key figures from more than one table or any complex requirements then we can go for Calculation Views. We can call this as Multi Providers/ Joins in SAP BI
iv) Analytic Privilege: This is like Analysis Authorization in SAP BI where we can restrict the users to see the data based on their privileges.
v) Procedures: Simple SQL statements using which we can process data into SAP HANA.
3) Package: Here also we can create the Package in SAP HANA.
4) Content: In this section we have lot of useful functions
i) Validate: Using this we can validate the multiple Objects (Packages/Attribute/Analytic/Calculation Views/ Analytic Privileges) and this is mass validation. In validation process system checks and saves the metadata but it doesn’t activate the models.
Navigation:
a) Click on ‘Validate’ and you will get the below screen.
b) Select the objects you want to validate and move it to the right side.
c) Now click on ‘Validate’.
Note: As I said earlier system doesn’t activate the models.
ii) Activate: Here system validate the objects and activate them. Navigation is same
iii) Mass Copy: This is used to copy all the models from one package to other package.
Navigation:
a) Click on ‘Mass Copy’, you will get below screen.
b) Select the Models/ Packages you want to copy.
c) Click on ‘Next’ and ‘Finish’.
iv) Import: This function is useful to import the models/tables/Landscapes from your local system into SAP HANA.
Navigation:
a) Click on Import, where you get below screen.
b) Select the option what you want to Import. In this I am going to show how to import the Models into SAP HANA system.
c) Here Select ‘Developer Mode’ and Click on ‘Next’ to select the models to Import.
d) In this screen first we need to select the location of the folder in our local system where models exist.
e) Then select the models, move it to the right side and click on Finish to import them into SAP HANA system.
Note: We can import HANA Landscapes into HANA system. However we have to authorize the imported Landscape by providing Username and password before we use that.
v) Export: This is just vice-versa for Import functionality.
vi) Migrate: We use this procedure to enable translation of text pertaining to objects and their elements that did not have Multilingual support.
we can enable Multilingual support for models along with their elements like attributes and measures in different languages.
Navigation:
a) Click on ‘Migration’ in Quick Launch screen to get the below screen.
b) Select the objects –> Move them to Right Side Pane and Click on Migrate.
c) Option ‘Activate selected objects after migration’ activates the objects after migrating them.
Result: Object texts along with the corresponding elements are flagged for translation. These objects can be viewed in multiple languages.
vii) Auto Documentation: We can create the documentation for the existing models using this functionality.
Navigation:
a) Click on ‘Auto Documentation’ to get below screen.
b) Now select the models we want to create documentation.
c) Move it to the right side pane Select the Destination Folder Location Click on ‘Finish’.
d) Now we can see the folder with ‘DCG(SAP HANA System Name)’ in the given location’ click on it where we will have PDF document for the selected model.
e) The sample document will be like below.
f) This document contains information about The Package, Objects and owner of the Model.
viii) Switch Ownership: This is useful to assign the inactive objects created by one user to other user. It is used to distribute the responsibility to multiple users.
Pre-Requisite: We should have ‘Work in Foreign Workspace’ authorization to perform this task.
Navigation:
a) Click on ‘Switch Ownership’ in Quick Launch screen.
b) Select the ‘Source User’ who has inactive objects.
c) Add the required objects to the right side pane Click on ‘OK’.
In Part2, I will explain about CONTENT, DATA and HELP Sections..
Hope this document will be useful.
SAP HANA:Different ways of table creation in SAP HANA
Hello Everyone,
In this document, I would like to explain about different ways of table creation in SAP HANA.
In SAP HANA, we can create tables in two ways.
1) Using SQL editor.
2) Using Information Modeler.
1) Using SQL Editor:
Step1: We can open SQL editor from i) Quick Launch ii) Right click on your schema –> SQL Editor iii) Right click on your system –> SQL Editor.
SQL syntax to create table in SAP HANA.
“create <table type> table <table name>(<field name1> <data type>, <field name2> <data type>, …..);”
we can create 3 types of tables in SAP HANA.
i) Column : Which stores the data on column level. This is mostly suitable for HANA data models. If we replicate tables from source, by default those will be replicated as column tables.
As we all know we get huge compression with columnar tables.
ii) Row: This tables are to store the system statistics or parameters. Sometimes Row store tables will give better performance on master data tables. however SAP HANA models gives very good performance on Columnar tables.
iii) Table Type: This tables are used to pass the parameters. These are used when we create Calculation views using SQL scripts in SAP HANA.
In this example, I am going to create table for customer information(CUST_INFO).
Step2: Open SQL editor and type the statement as given below.
Step3: Now click on arrow with green or F8 to execute this SQL statement.
Once it is successfully executed, we will get message like below
Step4: Now we can check the newly created table under our schema –> Tables like below.
Double click on the table name to display the Table Definition.
2) Using Information Modeler:
If we are not familiar with SQL, we can still create tables in SAP HANA by using graphical modeler.
Step1: Right click on your Schema in System and select ‘New Table’
Step2: Now in the below screen give the Table Name, Schema and Table Type.
As we discussed already,we have 3 types of Table Types.
In this I am going to create the same table using graphical modeler.
Enter the required fileds and properties like data type, key and not null.
Use the ‘Plus symbol’ to add the new fields to the table.
Step4: Click on arrow or F8 to execute to deploy this table. After successful execution you will get the same message and given in first method.
Hope this document will be useful for beginners in SAP HANA.
Please find the reference for the original document posted in SDN here
http://scn.sap.com/docs/DOC-25996
SAP HANA: Understanding Look and Feel of SAP HANA STUDIO
Hello Folks,
In this document, I will walk-through the simple basic navigations which you would do when you are provided access to your HANA Sandbox system and it helps you to get a look & feel of the system.
We will discuss about the following in this document:
- Perspectives
- Adding system
- System Monitor
- Administration view
The first Screen Which welcomes you is the welcome screen:
All the above mentioned things like Adminstration console, Open modeler are called prespectives. We will discuss about what is a perspective in detail below:
View: It is screen element which is used for doing a particular functionality.
Here you can see different views:
Example:
1) Navigator
2) Where-Used List
3) Cheat Sheets
Perspectives: Collection of such views together is called a perspective.
Different perspectives available in the system is shown below:
1) Administration Console
2) Debug
3) Modeller
4) RCP Perspective
5) Resource
6) Team Synchrozing
To see the available prespectives in your system, Goto Window and you will find the below screen :
It will open the below screen:
If you want to save a new prespective, with your own collection of views then choose “Save prespective”.
You can see in the above screen, I have my own prespective named as KRISH
Adding Systems:
Now let us learn about “Adding System”, In this example I will show you to add 2 different systems.
Step 1: Goto Navigator View -> Context Menu -> Add System
Step 2: Give the Hostname,Instance number and Language as shown below:
Step 3: Give your credentials to the system as shown below:
Step 4: Give the connection URL as shown below:
Now I have repeated the same process to add a different system on another server instance and you can see I have added both the systems as shown below:
1) DCC
2) DCD
Under each system, you can find 2 folders:
1) Catalog: It contains Authorization and all the available schemas.
Each Schema will contain as shown below:
- Tables
- Procedures
- Views
- column views
2) Content: It contains all information Models like Package, Attribute views, Analytic Views, Calculation Views, Analytic Privileges and Procedures as shown below:
After you add your system, the other screen which you notice is “Quick Launch” which provides short cuts for various activities as shown below:
System Monitor:
System Monitor helps to check the health of the “Added Systems” in your HANA Studio. To go to system monitor navigate as shown below:
So you can see in the above screen, that you have some “Alerts” with “HIGH” priority. So you can double click on that particular system ID and view the Administrator View of the system as shown below:
Administrator View:
You have different tabs like:
Overview, Landscape, Alerts etc.., these are the different tabs which will tell you about the system. For example if you want to run scripts you have to enable “Script server” instance. To do this,
Go to Configuration -> Deamon.ini -> []Script server and change “instances” to 1.
Go to Configuration -> Deamon.ini -> []Script server and change “instances” to 1.
Hope this gives you a look and feel of the system. In my next blogs we will discuss about modeling concepts like creation of Information Models and also the Admin part
SAP HANA: Using Microsoft Query to connect to SAP HANA Tables
Hello Folks,
As we know we have an ODBC driver available for SAP HANA. We can use Microsoft Query to connect to SAP HANA Database to access tables.
Procedure:
1) Select “DATA” and go to “ Other Sources” and select “From Microsoft Query” as shown below.
Now Choose the “Data Source” i.e. ODBC connection which you have created to SAP HANA DB. In my case it is “DS4”
It will ask for Credentials as shown below:
Thus we are able to connect to SAP HANA DB and we can access “Tables” and “Views”.
Note:
This feature is not recommended by SAP as it has a limitation on no. of tables that can be accessed.
Thanks for reading this blog.
SAP HANA: Using Hierarchies
Hello FOLKS,
We shall discuss about how to define “Hierarchies” in SAP HANA.
In SAP HANA, we have a choice of creating 2 types of hierarchies:
- Level Hierarchy
- Parent Child Hierarchy
Level Hierarchy:
Each level represents a position in the hierarchy. For example, a time dimension might have a hierarchy that represents data at the month, quarter, and year levels.Each level above the base (or most detailed) level contains aggregate values for the levels below it. The members at different levels have a one-to-many parent-child relation. For example, Q1-05 and Q2-05 are the children of 2005, thus 2005 is the parent of Q1-05 and Q2-05.
Hierarchies and levels have a many-to-many relationship. A hierarchy typically contains several levels, and a single level can be included in more than one hierarchy.
In our example, let us take “Level Hierarchy”.
Parent Child Hierarchy:
A parent-child hierarchy is a hierarchy in a dimension that is based on two table columns. Together, these columns define the hierarchical relationships among the members of the dimension. The first column, called the member key column, identifies each dimension member. The other column, called the parent column, identifies the parent of each dimension member. The parent attribute determines the name of each level in the parent-child hierarchy, and determines whether data for parent members should be displayed.
Now let us discuss the same using a Simple scenario, I will create a Level based hierarchy.
We all know the “E-Fashion” Dataset which is available @Cloudshare.
So when we try to “report” on this view using Excel, we will find the following,
The available “Field/Characteristics” option is as shown as below:
Here you can see all “Key Attributes”, I can select only those 3 fields namely “Article Id” and “Week ID”.Let us create an “Example” Hierarchy (Based on Level as shown below).
Here you can see, I have created a level based hierarchy based on the following “Top down Approach”. As you know I cannot see those fields in my reporting @excel as I can see only “Key Attributes”. Now you can see now I can drill down to “State-wise”, “City-wise”.
Note: If I don’t intend to use “Hierarchies” ( though it is proffered as it gives a nice presentation to the end-user, you can still display the Non-Key attributes by changing the following property to “TRUE” as shown below:
Note: As I have a hierarchy defined for “AT_OUTLET”, it is showing my hierarchy option there “Example”.
I should keep “Hierarchy Active = TRUE”.
Then this field will be displayed along with “Key” attributes on excel.You can see now “QTR” is also enabled in the Excel reporting.
But here you can see the discrepancy as “Year-QTR” has parent-child relationship and it was not properly addressed here. This can be addressed by creating a “Parent-Child Hierarchy”.
Hope you understood the benefits of using “Level Based Hierarchy”. In my next document, I will focus on “Parent-child Hierarchy”.
Thanks for reading this Blog Do comment your thoughts.
Hello Folks,
I am sure many of you are aware of SAP’s latest innovation in “Analytics” space i.e SAP Business Objects Predictive Analysis tool.
Let us see how this tool works, in this document I will discuss my experiences in using this tool.
Step 1: Log in to SAP Business Objects Predictive Analysis tool as shown below and you will find the “welcome” page where all the related “Tutorials” and “Demo” videos are kept.
Step 2: Create a “New Analysis” as shown below:
Analyzing the famous “IRIS” data set; I have it in “.txt” format.
Step 3: Drag “CSV Reader” from components under “Data Reader” as shown below:
Now define the properties as shown below,
We can run the analysis till here, which will give us the table output as shown below:
Now let us use “R-K means” Clustering algorithm and let us divide the data into clusters.
Step 4: Drag the R-K means under clustering algorithms as shown below:
Now define the properties like, on which column this algorithm should run and also advanced properties like which algorithm method to be used.
In this case I choose all the columns and select “Hartigan and Wong” algorithm as shown below:
Now let us run the Analysis till here and let us highlight the newly added column “ClusterNumber” with “Blue” as shown below:
Step 5: Analyze the data:
We can also analyze the “cluster graph” not only as table shown above but also as shown below:
To understand what happened we can choose “Algorithm Summary” as shown below:
We can also do Ad-hoc analysis using “Ad-hoc chart” as shown below:
And then we can write back the new file with additional column using “CSV writer” as shown below:
Step 6: Write back the data .
Regarding SAP HANA, we can use “HANA Reader”
The HANA Reader component enables you to read data from the SAP HANA database only. Using this component, you can understand the data, look for patterns, and visualize the data using various visualization techniques. Use this component if you want to use Predictive Analysis Library (PAL) algorithms provided by SAP HANA.
Note: If you choose to use HANA Reader to read the data, you are not allowed to use SAP and R specific algorithms.
So the algorithm which I was able to use before cannot be used on top of “HANA” data, I have to use PAL algorithms.
Step 1: Drag HANA Reader as shown below:
Step 2: Make a new connection as shown below, enter port number = 30015
Now you can connect to that server instance and able to access all “Tables” and “Analysis Views” as shown below:
And we can analyze the data as shown below:
Hope you liked this document, do like and share it
Enjoy Learning
SAP HANA: Enabling Multilanguage Support for Models
Hello Folks,
You use this procedure to enable translation of text pertaining to objects and their elements that did not have Multilanguage support.
For example, you can enable Multilanguage support for models along with their elements like attributes and measures in different languages.
Procedure:
Select “Migrate” as shown below from the “Quick Launch” screen.
Now the following screen appears, choose the required “Information Model” and Select “Migrate” as shown below:
You also have an option to “Activate selected objects after Migration”.
Result :
Object texts along with the corresponding elements are flagged for translation. These objects can be viewed in multiple languages.
Hope you understand the benefits, Thanks for reading the blog.
RELATED POSTS
RELATED POSTS
No comments:
Post a Comment