cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Error: Parameterized views can't be used with sqlDialect ‘sqlite’

04-21-2026 12:31 PM
UtkarshAgrawal Explorer
673 views 4 comments
0 Likes
SAP Managed Tags
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

Accepted Solutions (0)

Answers (2)

Answers (2)

UtkarshAgrawal
Explorer
0 Likes

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