Skip to Content

SAP TechEd 2019 - Deploy your CDS artifacts

test
0 %
SAP TechEd 2019 - Deploy your CDS artifacts
Details
// Explore More Tutorials

SAP TechEd 2019 - Deploy your CDS artifacts

11/14/2019

Use Core Data and Services to create database artifacts and expose services

You will learn

  • How to deploy the CDS artifacts
  • How to query data in your instance of SAP HANA, express edition
  • How to execute your OData services in the local Cloud Shell environment for testing purposes

These tutorials are meant to be completed at the Developer Garage at SAP TechEd. The experts at the Google Cloud booth will provide you with access to an account.


Step 1: Connect and deploy to the database

In the Google Cloud Shell, use the following two commands to deploy the database artifacts into SAP HANA, using the connection information you created.

cd ~/teched/db
npm start

You will see the deployment start:

deploy to db

Press CTRL+C once the deployment has finished.

deploy to db

The .hdbcds files have now been translated into tables in the HDI container you have manually created.

Log on to answer question
Step 2: Start the OData services

Go into the root directory and start the services using the following two commands:

cd ~/teched
npm start

You will see server listens at.... This is the service being exposed from the Cloud Shell virtual machine.

deploy service
Log on to answer question
Step 3: Test the services

Click on the link where the application is listening.

deploy to db

A new tab will open. Click on the Ingredients link.

deploy to db

Congratulations! You should now see the data in your database being exposed through your service. This means the data has been loaded into the database and your application is up and running locally.

deploy to db
Log on to answer question
Step 4: Check deployment in the database

Go back into the console for you HANA express virtual machine.

HANA ssh

Note: If you closed the console, click on SSH button next to your virtual machine and run sudo su - hxeadm.

Command xs service-key my-hdi my-key will provide the credential information in the same machine.

You will now query the SAP HANA database and see how the sample files have been loaded into the tables.

Use the following command to check the data inserted by the CDS module in the database:

select * from "FOOD"."TECHED_RECIPES_FOODS" order by "ID" asc
deploy to db

Use the results to complete the validation below.

Paste the results of the query `select * from "FOOD"."TECHED_RECIPES_FOODS" order by "ID" asc`
×

Next Steps

Prerequisites

  • These series of tutorials can be completed at the AppSpace at SAP TechEd.
  • You have completed the previous tutorial
Back to top