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,211

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
adrian_goerler
Advisor
Advisor

The data type `cds.Vector` is supported by CAP since the Match 2024 release. Please ensure that you are using the following minimum versions:

  • @Sisn/cds-dk: 7.8.0
  • CAP Node.js (@sap/cds): 7.8.0
  • CAP Java (cds-services): 2.8.1

Please note that if you are using a globally installed cds-dk you will have to upgrade this installation as well.

For CAP Node.js Vector support is only available with the "new" HANA driver @cap-js/hana.