DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Data Engineering
  3. Databases
  4. Sneak Peek into HANA as a Service: Database Artifacts and Calculation Views

Sneak Peek into HANA as a Service: Database Artifacts and Calculation Views

This tutorial explains how to create some database artifacts, including a Calculation View with K anonymization, in your instance from SAP Web IDE Full Stack.

Lucia Subatin user avatar by
Lucia Subatin
·
Sep. 28, 18 · Tutorial
Like (2)
Save
Tweet
Share
5.18K Views

Join the DZone community and get the full member experience.

Join For Free

Here's an overview of how to create some database artifacts, including a Calculation View with K anonymization, in your instance from SAP Web IDE Full Stack.

Philip Mugglestone already published great video tutorials on how to deploy your instance and connect to it. If you can't see the option to create the service, remember that as of today, this is not available through trial.

This instance of mine has been created with the scriptserver option on:


We could use the new CAP model to build an app but the good ol' MTA wizard also does the trick.

There are only minor differences with the already documented XSA path. After all, XS Advanced is our HANA-friendly, on-premise version of Cloud Foundry.

Most of these differences come from using SAP Web IDE for Full Stack as opposed to SAP Web IDE for HANA. Again, these are minor and this wizard to create an MTA and a DB module altogether is one of them (compared to the currently available one in HANA Express).

Please remove that namespace; you don't need it and it only makes names longer:

So I get a pre-created database module. It basically accelerated step 3 in this series of step-by-step tutorials if you are mentally making the comparison.

You need to enable the plugins for Web IDE for the database explorer and other fun stuff if you haven't already:

I will change things a little bit from those tutorials and create a different data model. My single table (.hdbtable) will be called JOBS.

If you want something similar to follow along, here is another tutorial that will also explain how to create the calculation view.

Fast forwarding, I am also loading data with a CSV file and an hdbtabledata configuration.

If I build the module, I get a table with data in the database explorer:

Errors, Anyone?

If you get an error when building the module, make sure the space is set in your cloud Foundry options or the project settings. And of course, having a service of type "hana" in that same space is super important, otherwise, Web IDE will have nothing to bind to.

You could also get an error for having more than one HANA service in the same space (lucky you!). Use parameter "database-id" and the GUID for your database (you can find this at the Database Cockpit):

When you build the module, Web IDE will also create an HDI container for you.

You could manually create the HDI container using the Command Line Interface or with this graphical option here:

But there is no need because Web IDE created it for you. If you click on that tile, you will see the instance of the service:

If you list the services using the CLI, you will also see the HDI container, which also translates to a schema with vitamins. So why do you see it as a service? How is it both a schema AND a service?

Because this service will manage the database artifacts for you. It will have its own technical user that will access the actual physical database (and physical schema, which it also created for you).

In other words, you only have to worry about creating the design-time artifacts like the hdbtable. The technical user that gets created automatically with your container will use its authorizations and superpower to execute the actual "CREATE TABLE" statement in actual physical schema.

I have given a similar explanation before (I even used a picture of a kitty) and so has the official documentation. But some people keep insisting on asking so I keep insisting on explaining.

Also with a twist, using an intuitive form of anonymization. If you want to create your own modeling and haven't tried it yet, here are some more step-by-step tutorials.

Those include more fancy tricks like a Star Join and Currency Conversion (something I would have killed for back in the HANA Studio days).

Ta-da! Calculation views and the whole enchilada in your SAP HANA Service!

Easy, eh? So what if you wanted to expose this through OData?

Well, you just do! I might explain that in a future post.

In the meantime, if you do not have such an instance but are willing to learn HANA, remember there is a free alternative with SAP HANA, express edition.

All of the tutorials I mentioned here were created for and in HXE.

Database Web Service Artifact (UML) Peek (software)

Published at DZone with permission of Lucia Subatin, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Custom Validators in Quarkus
  • Isolating Noisy Neighbors in Distributed Systems: The Power of Shuffle-Sharding
  • Spring Boot vs Eclipse MicroProfile: Resident Set Size (RSS) and Time to First Request (TFR) Comparative
  • How Elasticsearch Works

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: