on 2024 Aug 30 4:01 PM
Hello,
we developed a CAP Java Springboot app deployed to BTP CF space with Hana DB. The app uses multi-tenancy. A tenant is already subscribed to this app in the test space.
On database layer we already created some time ago a database table "RuleExecutionTechnicalObjectDerivationResults". This database table is visible in the Hana schema of the subscribed tenant.
We now want to create a new entity in our service.cds file referencing that db table ( the last line is new)
using com.sap.apm.rules.eiot as apm from '../db/data-model';
@path: '/RuleExecutionsService/v1'
service RuleExecutionsService @(restrict: [{ grant: 'READ', to: ['Rules_C','Rules_R','Rules_U','Rules_D'] }]){
@readonly entity RuleExecutions as projection on apm.RuleExecutions;
@readonly entity RuleExecutionTechnicalObjects as projection on apm.RuleExecutionTechnicalObjects;
@readonly entity RuleExecutionTechnicalObjectMonitoringResults as projection on apm.RuleExecutionTechnicalObjectMonitoringResults;
@readonly entity RuleExecutionTechnicalObjectDerivationResults as projection on apm.RuleExecutionTechnicalObjectDerivationResults;
}
We see that in the generated schema-hana.sql file a new create view statement is generated for the new entity:
CREATE VIEW RuleExecutionsService_RuleExecutionTechnicalObjectDerivationResults AS SELECT
RuleExecutionTechnicalObjectDerivationResults_0.ID,
RuleExecutionTechnicalObjectDerivationResults_0.technicalObject_ID,
RuleExecutionTechnicalObjectDerivationResults_0.indicator_ssid,
RuleExecutionTechnicalObjectDerivationResults_0.indicator_characteristicsInternalId,
RuleExecutionTechnicalObjectDerivationResults_0.indicator_positionId,
RuleExecutionTechnicalObjectDerivationResults_0.indicator_categoryName,
RuleExecutionTechnicalObjectDerivationResults_0."TIMESTAMP",
RuleExecutionTechnicalObjectDerivationResults_0.value,
RuleExecutionTechnicalObjectDerivationResults_0.error_code,
RuleExecutionTechnicalObjectDerivationResults_0.error_message
FROM com_sap_apm_rules_eiot_RuleExecutionTechnicalObjectDerivationResults AS RuleExecutionTechnicalObjectDerivationResults_0
WITH ASSOCIATIONS (
MANY TO ONE JOIN RuleExecutionsService_RuleExecutionTechnicalObjects AS technicalObject ON (technicalObject.ID = technicalObject_ID)
);
Our expectation is that when we deploy the app to the CF space the database schemas for all subscribed tenants get automatically updated and this view is available afterwards in those schemas.
However, this does not happen.
Question: What do we have to do ensure that the view appears in all Hana schemas of the subscribed tenants?
=====
@cap-js/asyncapi: 1.0.1
@cap-js/cds-types: 0.2.0
@cap-js/openapi: 1.0.4
@cap-js/sqlite: 1.7.3
@Sisn/cds: 8.0.4
@Sisn/cds-compiler: 5.0.6
@Sisn/cds-dk: 8.0.2
@Sisn/cds-dk (global): 7.9.2
@Sisn/cds-fiori: 1.2.3
@Sisn/cds-foss: 5.0.0
@Sisn/cds-hana: 2.0.0
@Sisn/cds-mtxs: 2.0.3
@Sisn/eslint-plugin-cds: 3.0.4
Node.js: v18.18.2
apm-rules-eiot-cds: 1.0.0
home: https://github.tools.sap/AssetPerformanceManagement/apm-rules-eiot
CAP Java SDK: 3.0.0
cds4j: 3.0.0
Spring Boot: 3.3.3
Maven: 3.9.5, home: /Users/D038325/Library/apache-maven-3.9.5
Java: 21.0.2, home: /Users/D038325/Library/Java/JavaVirtualMachines/sapmachine-jdk-21.0.2.jdk/Contents/Home
OS: Mac OS X, 14.6.1, arch: x86_64
Request clarification before answering.
You have update the subscription for each tenant. You can do this from BTP Cockpit in subscriber subaccount or Subscription Management Dashboard in provider subaccount. You could also use REST APIs from mtxs for Deployment service (upgrade) or tools built on top.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
40 | |
15 | |
10 | |
8 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.