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?
- Clone the GIT repository: https://github.com/SAP/hana-cities.git
- Login to your HANA MDC database with the SYSTEM user.
- First open the SAP HANA Cockpit link.
- Then, open the SAP HANA Web-based Development Workbench link and choose Security.
- Create a new user: CITY_DEV.
- Assign the following roles to this user:
- Grant the GRANT_ACTIVATED_ROLE object privilege and then mark the checkbox Execute.
- Logout and login to SAP HANA Web-based Development Workbench with the CITY_DEV user and choose Editor.
- Create a new package – cities, and then inside create two more packages: data and services.
- 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.
- From the context menu of the cities package choose Create Application and then Activate All.
- Assign the cities.data::user role to the CITY_DEV user.
- Open OData Explorer for cities.xsodata.
- 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.