Add SAP HANA Support to Your Project You will learn
How to add SAP HANA client to your project
Open all Close all
Run the following command in your project root folder:
cds add hana --for production
This adds the hdb
module for SAP HANA access to your package.json
file and will configure kind sql
as the database service.
Changes in the package.json
file done by cds add hana
:
{
"name": "cpapp",
...
"cds": {
"requires": {
"[production]": {
"db": {
"kind": "hana-cloud"
}
},
"db": {
"kind": "sql"
}
}
}
}
Different to CAP default behavior, kind sql
uses the SQLite in-memory database for local testing and the SAP HANA database for productive usage in the cloud.
Additional Documentation:
Run cds watch
in your project folder and check that your app still works locally as it used to work before at http://localhost:4004/ .
Which value for kind allows to use SQLite in development and SAP HANA in productive mode? Check answer