cancel
Showing results for 
Search instead for 
Did you mean: 

How to create the cds entity Vector column in CAP?

minjie_lao
Product and Topic Expert
Product and Topic Expert
1,203

Hi,

Am trying to create entity view contains a embedding vector columns.

our HANA CLOUD instance has been upgraded to QRC01/2024 version, also able to create vector column table within db instance with REAL_VECTOR  data type without any issue

but when i try to create my cds entity

 

 

 

entity Books { 
  title         : String(111);
  embedding     : Vector(3072); 
}

 

 

 

 

i am not able to compile the entity with following error
 
[ERROR] db/rxxxai.cds:34:19-25: No artifact has been found with name “Vector” (in entity:“Books”/element:“embedding”)
 
I've tried to upgrade my following node modules, but doesn't help
 

"@sap/cds": "^7.8.2",
"sap-hdbext-promisfied": "^2.202404.2"
"hdb": "^0.19.8"

Can anyone give some hints?

minjie_lao
Product and Topic Expert
Product and Topic Expert
0 Kudos
i've installed all following dependencies, and working now..
View Entire Topic
ArthurYang
Product and Topic Expert
Product and Topic Expert
0 Kudos
When I try to do mbt build, it reminds me "Type “cds.Vector” is not supported for OData", how can I avoid using Odata interface of Vector directly?
adrian_goerler
Advisor
Advisor
0 Kudos
You need to exclude the element of type "cds.Vector" in the entity on service level.
adrian_goerler
Advisor
Advisor
0 Kudos
You need to exclude the element of type "cds.Vector" in the entity on service level. See: https://cap.cloud.sap/docs/cds/cql#excluding-clause