When I run cds watch --profile hybrid on my CAPM project the following error is popping up
Error: Parameterized views can't be used with sqlDialect ‘sqlite’
But the cds deploy --to hana works perfectly fine and all the artifacts are deployed. I am using HANA for db side. Below is the package.json for the project
{ "name": "xxxxxx", "version": "1.0.0", "description": "A simple CAP project.", "type": "module", "dependencies": { "@cap-js-community/odata-v2-adapter": "^1.15.10", "@cap-js/hana": "^2", "@sap/cds": "^9", "@sap/xssec": "^4", "exceljs": "^4.4.0" }, "devDependencies": { "@sap/cds-dk": "^9" }, "scripts": { "start": "cds-serve" }, "private": true, "cds": { "requires": { "[production]": { "auth": "xsuaa" }, "db": { "kind": "hana" } } } }
Request clarification before answering.
Hi, this is not working still. For context, I want to use hana for local development also (we have several things that work with hana only like parameterized calculation views as specified in the question). Attaching the package.json below.
{
"name": "xxxx",
"version": "1.0.0",
"type": "module",
"dependencies": {
"@cap-js-community/odata-v2-adapter": "^1.15.10",
"@cap-js/hana": "^2",
"@sap-cloud-sdk/http-client": "^4.6.0",
"@sap/cds": "^9",
"@sap/xssec": "^4",
"crypto-js": "^4.2.0",
"xml2js": "^0.6.2"
},
"devDependencies": {
"@sap/cds-dk": "^9"
},
"scripts": {
"start": "cds-serve"
},
"private": true,
"cds": {
"requires": {
"[production]": {
"auth": "xsuaa"
},
"db": "hana"
},
"[hybrid]": {
"requires": {
"db": {
"kind": "hana"
}
},
"sql": {
"dialect": "hana"
}
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
could you try adding the dialect in the package.json like:
"requires": {
"db": { "kind": "hana" }
},
"sql": {
"dialect": "hana"
}
}
Regards,
Hugo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, the JSON should look like this:
// Default (local development) — use SQLite
"requires": {
"db": {
"kind": "sqlite",
"credentials": { "database": ":memory:" }
}
},
// Hybrid profile — use HANA with explicit dialect
"[hybrid]": {
"requires": {
"db": { "kind": "hana" }
},
"sql": {
"dialect": "hana" // ← THIS IS THE CRITICAL MISSING LINE
}
},
// Production profile — use HANA with explicit dialect
"[production]": {
"requires": {
"db": { "kind": "hana" }
},
"sql": {
"dialect": "hana" // ← Required here too
}
}
}
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.