2025 Mar 12 2:35 PM - edited 2025 Mar 12 3:34 PM
I created my project using the following commands :
cds init hana-features-test --java
cd hana-features-test
mvn com.sap.cds:cds-maven-plugin:add -Dfeature=TINY_SAMPLE
mvn com.sap.cds:cds-maven-plugin:add -Dfeature=CF
cds add mta
cds add hana --for production
Then I changed the deploy command in srv/pom.xml to use the hana dialect :
<command>deploy --to hana --dry --out "${project.basedir}/src/main/resources/schema-hana.sql"</command>
I also added the workaround to allow tables without primary keys in the package,json, by adding this section:
"cds": {
"cdsc": {
"severities": {
"odata-spec-violation-no-key": "Warning"
}
}
}
Then I added the declaration and the usage of the ST_SquareGrid function in my cat-service.cds like this :
.persistence.exists
entity ST_SquareGrid(size: Double, geometry: hana.ST_GEOMETRY) {
geom: hana.ST_GEOMETRY;
i: Integer;
j: Integer;
}
entity V as select from ST_SquareGrid(size: 1.0, geometry: ST_GeomFromWkt('Point(1.5 -2.5)'))
{ geom, i, j };
I took the above example from the capire documentation at
https://cap.cloud.sap/docs/guides/databases-hana#spatial-grid-generators
mbt build, builds the application without errors.
However I get an error when deploying the application, saying :
Error: The file requires "db://CATALOGSERVICE_ST_SQUAREGRID" which is not provided by any file [8212001]
I am missing something, but I don't know what. Any help?
PS: Running the following SQL in Hana studio connected to the same DB works, so I assume that the function exists and is available :
SELECT GEOM.ST_AsText(), I, J FROM ST_RectangleGrid(1.0, 2.0, ST_GeomFromWkt('Point(1.5 -2.5)'));
Request clarification before answering.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.