SQL Editor in HANA Studio

Last updated on Dec 05 2021
Ganpathi R

Table of Contents

SQL Editor in HANA Studio

SQL Console can be opened by selecting Schema name, in which, new table has to be created using System View SQL Editor option or by Right click on Schema name as shown below −

1 31

Once SQL Editor is opened, Schema name can be confirmed from the name written on the top of SQL Editor. New table can be created using SQL Create Table statement −

Create column Table Test1 (
   ID INTEGER,
   NAME VARCHAR(10),
   PRIMARY KEY (ID)
);

In this SQL statement, we have created a Column table “Test1”, defined data types of table and Primary Key.

Once you write Create table SQL query, click on Execute option on top of SQL editor right side. Once the statement is executed, we will get a confirmation message as shown in snapshot given below −

Statement ‘Create column Table Test1 (ID INTEGER,NAME VARCHAR(10), PRIMARY KEY (ID))’

successfully executed in 13 ms 761 μs (server processing time: 12 ms 979 μs) − Rows Affected: 0

2 30

Execution statement also tells about the time taken to execute the statement. Once statement is successfully executed, right click on Table tab under Schema name in System View and refresh. New Table will be reflected in the list of tables under Schema name.

Insert statement is used to enter the data in the Table using SQL editor.

Insert into TEST1 Values (1,'ABCD')
Insert into TEST1 Values (2,'EFGH');

Click on Execute.

You can right click on Table name and use Open Data Definition to see data type of the table. Open Data Preview/Open Content to see table contents.

Creating Table using GUI Option

Another way to create a table in HANA database is by using GUI option in HANA Studio.

Right Click on Table tab under Schema → Select ‘New Table’ option as shown in snapshot given below.

Once you click on New Table → It will open a window to enter the Table name, Choose Schema name from drop down, Define Table type from drop down list: Column Store or Row Store.

Define data type as shown below. Columns can be added by clicking on + sign, Primary Key can be chosen by clicking on cell under Primary key in front of Column name, Not Null will be active by default.

Once columns are added, click on Execute.

3 30

Once you Execute (F8), Right Click on Table Tab → Refresh. New Table will be reflected in the list of tables under chosen Schema. Below Insert Option can be used to insert data in table. Select statement to see content of table.

4 28

Inserting Data in a table using GUI in HANA studio

You can right click on Table name and use Open Data Definition to see data type of the table. Open Data Preview/Open Content to see table contents.

To use tables from one Schema to create views we should provide access on the Schema to the default user who runs all the Views in HANA Modeling. This can be done by going to SQL editor and running this query −

GRANT SELECT ON SCHEMA “<SCHEMA_NAME>” TO _SYS_REPO WITH GRANT OPTION

SAP HANA – Reporting View

We know that with the use of Information Modeling feature in SAP HANA, we can create different Information views Attribute Views, Analytic Views, Calculation views. These Views can be consumed by different reporting tools like SAP Business Object, SAP Lumira, Design Studio, Office Analysis and even third-party tool like MS Excel.

These reporting tools enable Business Managers, Analysts, Sales Managers and senior management employees to analyze the historic information to create business scenarios and to decide business strategy of the company.

This generates the need for consuming HANA Modeling views by different reporting tools and to generate reports and dashboards, which are easy to understand for end users.

5 25

In most of the companies, where SAP is implemented, reporting on HANA is done with BI platforms tools that consume both SQL and MDX queries with help of Relational and OLAP connections. There is wide variety of BI tools like − Web Intelligence, Crystal Reports, Dashboard, Explorer, Office Analysis and many more.

So, this brings us to the end of blog. This Tecklearn ‘SQL Editor in HANA Studio’ blog helps you with commonly asked questions if you are looking out for a job in SAP Hana and SAP Domain. If you wish to learn SAP Hana and build a career in SAP domain, then check out our interactive, SAP HANA Training, that comes with 24*7 support to guide you throughout your learning period. Please find the link for course details:

https://www.tecklearn.com/course/sap-hana-training-certification/

SAP HANA Training

About the Course

SAP HANA is an in-memory computing application that is designed and developed to boost the business processes, deliver smart solutions, and simplify both hardware and software environments. Our Sap Hana Training course will help you understand and learn the fundamentals and will also felicitate on training hands-on for the better grasp on the course. Further, we have the highly qualified professionals who will train you about Sap Hana Studio, Modelling, Security features and its various other aspects. You will understand why SAP HANA is a fundamentally different database engine upon the completion of this SAP HANA course.

Why Should you take SAP HANA Training?

  • The average Sap Hana Consultant salary $165,750 per year or $85 per hour. (neuvoo.com).
  • SAP HANA is the highest growing technology; hence, there is no surprise in plenty of career opportunities in this field. Since it is one among the fastest-growing products in the history of SAP, it is considered by the industries as a ground-breaking key for in-memory databases.
  • SAP HANA currently has more than 6,500 customers globally.

What you will Learn in this Course?

Introduction to SAP HANA

  • Fundamentals of SAP HANA
  • Capabilities of SAP HANA
  • Limitations of SAP HANA

Key Features of SAP HANA

  • Key Features: High Performance functionalities In-Memory computing, Columnar store database, Data Compression and Massive Parallel Processing
  • Using SAP HANA for Non-SAP Applications

Architecture of SAP HANA

  • Detailed Architecture of SAP HANA Database
  • Concept of SAP HANA Landscapes and Scenarios

Overview of HANA Studio

  • SAP HANA System – Perspectives, Administration, Modelling, Development Plan
  • HANA Database SQL Basics and Database SQL Script
  • Types of statements and data types
  • Operators, expressions and basic query execution
  • Sub-queries, Types of Joins, Expressions and Loops
  • Catalog – Schema, Table, Views, Functions, Stored Procedures, Index, Synonyms, Sequences, Triggers

Data Provisioning

  • Data Provisioning with Flat File upload
  • Provisioning – SDA (Smart Data Access)
  • Joins Types in HANA

SAP HANA Modelling

  • Types of Models
  • Attribute Views, Joins and Using Filter Operations
  • Creating Restricted and Calculated Columns
  • Using Hierarchies
  • Analytic Views – Star Schema design and Multi-Dimensional Modelling
  • Variables and Input parameters

Calculation Views

  • Dimension Calculation View
  • Information View
  • SAP HANA Variables
  • Introduction to Input Parameters

SAP Project

  • Using HANA analytical view building of COPA (Controlling and Profitability Analysis) model
  • SAP HANA COPA for evaluation of market segments and classification of markets according to the products, customers or any combination of it

Dimension Calculation View

  • Dimension Calculation View – Star Join Calculation view
  • Using Projection, Join, Aggregation, Union and Rank

In-depth Modelling

  • Refactoring information models
  • Schema Mapping
  • Propagate to schematics and Show Lineage
  • Schema Mapping
  • Generating Time Data
  • Union Pruning
  • Using Time Travel
  • Migrating deprecated Information models
  • Using Currency Conversion
  • Web based Modelling Work bench

Analytic Privileges and Decision Tables

  • Classical Analytic Privileges
  • SQL Analytic Privileges
  • Dynamic analytic Privileges.
  • Turning Business Rules into Decision tables
  • Table Functions

SAP HANA Table Function

  • Query Optimizing Technique related to SAP HANA Tables
  • Web Based Modelling work bench

SAP HANA on Cloud

  • SAP Analytics with SAP Reporting environment SAP BOBJ – tools, WEBI, LUMIRA, DASHBOARD (integration between sap Hana and bob)

Advanced Topics Overview

  • SAP HANA Dynamic tiering
  • Delta Merge
  • SDI (Smart Data Integration)
  • SDA (Smart Data Access)

DATA Provisioning

  • SLT – SAP Landscape Transformation
  • BODS – Business Objects Data Services

Analytical Privileges

  • Classical XML Based Analytical Privileges
  • SQL Analytical Privileges

HANA Administration and Security

  • Hana Administration
  • Security in SAP HANA – User Management

Got a question for us? Please mention it in the comments section and we will get back to you.

 

0 responses on "SQL Editor in HANA Studio"

Leave a Message

Your email address will not be published. Required fields are marked *