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

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
Willem_Pardaens
Product and Topic Expert
Product and Topic Expert

The new vector implementation in CAP, which is still marked as beta, is only available when using the new HANA database service `@cap-js/hana`. You should only have the `@cap-js/hana` in your dependencies, not `hdb` or `@sap/cds-hana`. Note that also this database service is currently still in beta (v0.x.x).

minjie_lao
Product and Topic Expert
Product and Topic Expert
0 Kudos
am facing some error when using @cap-js/hana module, and seems the vector engine not require this module for now (maybe wrong)?
Willem_Pardaens
Product and Topic Expert
Product and Topic Expert
0 Kudos
both @cap-js/hana and the vector capabilities in CAP are beta only, so you'll have to navigate around the limitations it has for the moment.