Show me some cities! Or how to use MDC tenant databases in several easy steps

how to use MDC tenant databases in several easy steps: I guess you’ve already heard that the Multitenant Database Containers (MDC) scenarios are now available on trial landscape. If not, here you can read more:SAP HANA Multitenant Database Containers (MDC) scenarios now on trial landscape

Anyway, to give it a try, you need to have a simple, or not so simple scenario. Something like a “Hello World” application, but a bit more sophisticated. And not too complex.

I have exactly what you need. Instead of a “Hello World” application, I am offering you the “Show me some cities” application.

What does this application do?

It shows how simple OData service is implemented. It can be used to fetch a single item or list all records – in this case several South African cities with their coordinates. It can further be enhanced by adding more cities or even you may use this service to show these cities on a map. It is all up to you.

Why do I need it?

It shows you how you can use the HANA database in a real and simple example. This scenario also can be run without any modifications on the trial MDC tenant database.

How to run the example?

  1. Clone the GIT repository: https://github.com/SAP/hana-cities.git
  2. Login to your HANA MDC database with the SYSTEM user.
  3. First open the SAP HANA Cockpit link.
  4. Then, open the SAP HANA Web-based Development Workbench link and choose Security.
  5. Create a new user: CITY_DEV.
  6. Assign the following roles to this user:
    • CONTENT_ADMIN
    • sap.hana.admin.roles::Administrator
    • sap.hana.xs.debugger::Debugger
    • sap.hana.xs.ide.roles::Developer
  7. Grant the GRANT_ACTIVATED_ROLE object privilege and then mark the checkbox Execute.
  8. Logout and login to SAP HANA Web-based Development Workbench with the CITY_DEV user and choose Editor.
  9. Create a new package – cities, and then inside create two more packages: data and services.
  10. From the local GIT repository folder, drag and drop the files that reside in the data and services directories to the packages in the Editor respectively.
  11. From the context menu of the cities package choose Create Application and then Activate All.
  12. Assign the cities.data::user role to the CITY_DEV user.
  13. Open OData Explorer for cities.xsodata.
  14. Et, voila! You have all the South African cities listed together with their coordinates.

Here you have the GitHub location of the cities application: https://github.com/SAP/hana-cities.

Stay tuned for more examples and blogs.

New NetWeaver Information at SAP.com

Very Helpfull

 

 

User Rating: Be the first one !

 

Comments (0)
Add Comment