cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

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" } } } }

0 Likes
View Entire Topic
hugo_amo
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

could you try adding the dialect in the package.json like:

 
  "requires": {  
    "db": { "kind": "hana" }  
  },  
  "sql": {  
    "dialect": "hana"  
  }  
}  

Regards,

Hugo

UtkarshAgrawal
Explorer
0 Likes
Hi Hugo, I tried adding sql: {dialect: hana} but the issue remains there. Its still detecting the environment as sqlite. Attaching the package.json { "name": "xxxxx", "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" } }, "sql": { "dialect": "hana" } } }
hugo_amo
Product and Topic Expert
Product and Topic Expert
0 Likes

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
}
}
}