You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adapt to use VECTOR_EMBEDDING Function (Vector) and other new AI Core features within the HANA Database #2810
There are now Database features to do AI Core calls such as creating ebeddings directly within the database. This can be done more efficiently that at the Node.js layer with the Cloud SDK. We should look at where we can utilize this new functionality.
Status: basic setup DONE — HANA↔AI Core connection live and verified on DEV + PROD
The first phase (connect the existing AI Core instance to HANA and prove VECTOR_EMBEDDING from the DB layer, before any rewrite) is complete.
Proven end-to-end (as the app's own container _RT identity)
DEV
PROD
Built-in NLP (SAP_GXY.20250407)
768-dim ✓
—
AI Core via TUTORIALS_AICORE remote source
1536-dim ✓
1536-dim ✓
GET_REMOTE_SOURCE_AI_MODELS
55 models ✓
55 models ✓
Final architecture
One-time instance-level admin (per env):CREATE PSE TUTORIALS_AICORE_PSE + CREATE REMOTE SOURCE TUTORIALS_AICORE ADAPTER "sapgenaihub" using the dedicated hana-ai-core x509 service key (deployment da6d9c5e3fb50c3d). PSE + remote source are shared DB objects, not container artifacts.
Container grant:GRANT EXECUTE ON REMOTE SOURCE TUTORIALS_AICORE TO "<schema>::external_privileges_role" — the broker's external-object role; rebind-proof, inherited by all binding users. Not an _RT-user grant, not default_access_role, no grantor service.
Shipped
Runbook docs/developers/operations/hana-aicore-embeddings.md (both-env SQL, tiers, PROD marked done, auto-embedding + wider-AI-surface appendices) + design doc + CLAUDE.md link. PRs: #2844, #2846, #2847, #2848, #2849 (all merged to DEV). The runbook records the failed approaches (.hdbgrants, CREATE PSE as a privilege name, default_access_role + TRUST ADMIN) so they aren't re-tried.
Follow-up (next phase — the actual efficiency payoff)
Move embeddings currently generated at the Node/CAP layer into the DB using HANA's auto-embedding mechanisms (CREATE_VECTOR_EMBEDDINGS procedure, scheduler job, or BEFORE INSERT/UPDATE trigger — NCLOB-aware; GENERATED ALWAYS AS is NVARCHAR-only and doesn't fit the gzip/NCLOB content model). Candidate first target + wider AI surface (AI_TEXT_COMPLETION, CROSS_ENCODE, AI_TABULAR_PREDICTION) noted in the runbook appendices.
Ops note
Both hana-ai-core service keys (DEV + PROD) should be rotated — their x509 private keys were handled during setup.
Activity
docs(#2810): avoid PEM markers in PSE example to satisfy gitleaks
docs(#2810): HANA-native AI Core embedding setup + grant CREATE PSE
Merge pull request #2844 from sap-tutorials/feat/2810-hana-aicore-emb…
Merge pull request #2846 from sap-tutorials/feat/2810-hana-aicore-pse…
Merge pull request #2847 from sap-tutorials/fix/2810-pse-trust-admin
Merge pull request #2848 from sap-tutorials/fix/2810-pse-admin-not-co…
Merge pull request #2849 from sap-tutorials/docs/2810-external-privil…
jung-thomas commentedon Oct 19, 2026
Status: basic setup DONE — HANA↔AI Core connection live and verified on DEV + PROD
The first phase (connect the existing AI Core instance to HANA and prove
VECTOR_EMBEDDINGfrom the DB layer, before any rewrite) is complete.Proven end-to-end (as the app's own container
_RTidentity)SAP_GXY.20250407)TUTORIALS_AICOREremote sourceGET_REMOTE_SOURCE_AI_MODELSFinal architecture
CREATE PSE TUTORIALS_AICORE_PSE+CREATE REMOTE SOURCE TUTORIALS_AICORE ADAPTER "sapgenaihub"using the dedicatedhana-ai-corex509 service key (deploymentda6d9c5e3fb50c3d). PSE + remote source are shared DB objects, not container artifacts.GRANT EXECUTE ON REMOTE SOURCE TUTORIALS_AICORE TO "<schema>::external_privileges_role"— the broker's external-object role; rebind-proof, inherited by all binding users. Not an_RT-user grant, notdefault_access_role, no grantor service.Shipped
Runbook
docs/developers/operations/hana-aicore-embeddings.md(both-env SQL, tiers, PROD marked done, auto-embedding + wider-AI-surface appendices) + design doc +CLAUDE.mdlink. PRs: #2844, #2846, #2847, #2848, #2849 (all merged to DEV). The runbook records the failed approaches (.hdbgrants,CREATE PSEas a privilege name,default_access_role+TRUST ADMIN) so they aren't re-tried.Follow-up (next phase — the actual efficiency payoff)
Move embeddings currently generated at the Node/CAP layer into the DB using HANA's auto-embedding mechanisms (
CREATE_VECTOR_EMBEDDINGSprocedure, scheduler job, orBEFORE INSERT/UPDATEtrigger — NCLOB-aware;GENERATED ALWAYS ASis NVARCHAR-only and doesn't fit the gzip/NCLOB content model). Candidate first target + wider AI surface (AI_TEXT_COMPLETION,CROSS_ENCODE,AI_TABULAR_PREDICTION) noted in the runbook appendices.Ops note
Both
hana-ai-coreservice keys (DEV + PROD) should be rotated — their x509 private keys were handled during setup.Merge pull request #2851 from sap-tutorials/fix/2810-docs-sidebar-han…