cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a .hdbvirtualtableconfig file for remote source and schema name change

0 Kudos

Hi Team,

I am working on the HANA XSA project. In our project I have a requirement to access the cross container data. My source and target containers are located in the different tenants. So I am using SDA remote source and virtual tables between 2 tenants to access the data between the containers. Our development space and production spaces are located in different tenants.

In development spaces I have used SDA remote source connection 'ABC' and schema 'TEST_SCHEMA_1' in the .hdbvirtualtable file to create the virtual table. This virtual table in development space is working fine. But now I am facing problem in production space where SDA remote source connection name is changed to 'XYZ' and schema name is changed to 'TEST_SCHEMA'. In .hdbvirtualtableconfig file how I can configure these 2 changes so that my virtual tables in production space will created with SDA remote source connection 'XYZ' and schema 'TEST_SCHEMA'. As I know we cannot edit or create virtual tables in production space and now the only way .hdbvirtualtableconfig file. But I am not able to find any document or help on how to create .hdbvirtualtableconfig file which will include remote source connection name and schema name change in production space.

Thanks in advance.

BR,

Vivek.

Accepted Solutions (0)

Answers (6)

Answers (6)

thomas_jung
Developer Advocate
Developer Advocate

>Please correct me if my understanding is wrong. If my understand is right then I have another question how can I add the deployed project into webide?

Yes that is what I am saying. Why do you need to add the deployed project into the Web IDE? You are still thinking like design time and runtime are one in the same. They are not. The deploy is the runtime. The design time is in Git. If you want want a particular version of the design time in the Web IDE then just clone that branch from Git.

>I am looking for the functionality to define these both the configuration in logical schema and assign them into .hdbvirtualtableconfig file for single virtual table so that it can work in both development and production

This is the correct approach. If you use the logical placeholders, the actual values will be pulled in automatically at deploy time from the bound User Provided Service. This way the content in your MTAR (even the *config files) are stable and the same for each target deployment. The actual target names only have to be maintained in the User Provided Services in each target system.

0 Kudos

Hi Thomas Jung,

I am not using any user provided service in my project. I am not using synonyms to access the tables. I am using virtual tables using SDA. I am not sure how to read the Remote Source name and Database Name using the user provided service. If possible please could you give me one example or link to the example where this scenario is explained.

Thanks.

Best Regards,

Vivek.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>there will be multiple schemas created, like TEST_SCHEMA_1, TEST_SCHEMA2 etc..for each developer. Also, the table you are referring is going to be available in all those schema,

Only for the private developers builds. Those aren't the "real" builds. After a developer is done working, a project should be built and deployed even back to the Dev system. This will have a stable name and is the only thing that other containers should refer to. You shouldn't be connecting these temporary instances of the local developer testing container instance.

0 Kudos

Hi Thomas Jung,

Thanks for reply. If understood your answer correctly; you are asking to deploy my development space project in development space again using the xs deploy. Please correct me if my understanding is wrong. If my understand is right then I have another question how can I add the deployed project into webide?

I opened this thread for below issue. Please could you help me with my original issue.

In my case I have 4 spaces in 4 different tenants. Lets consider DEV1 and DEV2 spaces are available in Tenant1 and Tenant2 respectively. These 2 spaces are development spaces. I have to access the data of DEV1 space into DEV2 space using SDA. So I have created the remote source with name DEV1_TO_DEV2. In DEV1 I have schema TEST_SCHEMA and under this table Table1; based on this I have created the virtual table in DEV2. So my virtual table code in DEV2 is:

VIRTUAL TABLE "PROJ2.DB::VT_Table1" AT "DEV1_TO_DEV2"."Tenant1"."TEST_SCHEMA"."PROJ1.DB::Table1"

Now lets consider my production spaces are PROD1 and PROD2 which are in Tenant3 and Tenant4 respectively. And the remote source connection name is PROD1_TO_PROD2. So in my production virtual table code should be:

VIRTUAL TABLE "PROJ2.DB::VT_Table1" AT "PROD1_TO_PROD2"."Tenant3"."TEST_SCHEMA"."PROJ1.DB::Table1"

In the production system I need Remote source name and database name to be changed.

I am looking for the functionality to define these both the configuration in logical schema and assign them into .hdbvirtualtableconfig file for single virtual table so that it can work in both development and production. Or if there is any other way to achieve this functionality please let me know.

Hope I am clear in explaining my requirement.

Thanks.

Vivek.

ssurampally
Active Contributor
0 Kudos

yes, I understood your requirement, I never worked on requirement to access objects in one tenant-space to other tenant-space in a same database.

But my point is , creating a remote source connection on hdi container in developer sapce leads to confusion because, when this space is enabled for development, there will be multiple schemas created, like TEST_SCHEMA_1, TEST_SCHEMA2 etc..for each developer. Also, the table you are referring is going to be available in all those schema, so how can you make sure TEST_SCHEMA_1 is to be used as the source of remote source? Secondly, if you can have remote source name same in 2 places in Dev spaces, then deployment of that into prod space will work fine.. is that possible?

if this is not making sense, I may be wrong. Then we will wait for experts Florian, thomas.jung, rich.heilman to reply on this.

0 Kudos

Hi Shreekanth,

To answer your first question; we have agreed in project to always use TEST_SCHEMA_1 for the virtual table creation in the development space.

Second question; If we keep the same remote source name this problem may solve for remote source name but I still have problem with database name and schema name. Other problem is basis team following naming conventions for remote source creation and they use the source and target tenant names in that. Its difficult to convince them to keep it same in production also.

Thanks.

Vivek.

ssurampally
Active Contributor
0 Kudos

Hi Vivek, Schema name creation in Dev space and Production space is controlled by deployment, you will not specify any schema while creating the Virtual table or any objects. Generally, you will have a separate schema created for each developer working in Dev space, in your Dev yaml file, we just name the schema as TEST_SCHEMA, when build is done, it will create TEST_SCHEMA1, TEST_SCHEMA_2 .. etc.., however when this file deployed into Central/Production space, it just sticks to the name given in your yaml file resource which is TEST_SCHEMA.

Secondly, I am just trying to understand, why remote source is different in each space, I thought it will be having same name in all the environments to make it consistent.

0 Kudos

Hi Shreekanth,

In my case I have 4 spaces in 4 different tenants. Lets consider DEV1 and DEV2 spaces are available in Tenant1 and Tenant2 respectively. These 2 spaces are development spaces. I have to access the data of DEV1 space into DEV2 space using SDA. So I have created the remote source with name DEV1_TO_DEV2. In DEV1 I have schema TEST_SCHEMA_1 and under this table Table1; based on this I have created the virtual table in DEV2. So my virtual table code in DEV2 is:

VIRTUAL TABLE "PROJ2.DB::VT_Table1" AT "DEV1_TO_DEV2"."Tenant1"."TEST_SCHEMA_1"."PROJ1.DB::Table1"

Now lets consider my production spaces are PROD1 and PROD2 which are in Tenant3 and Tenant4 respectively. And the remote source connection name is PROD1_TO_PROD2. So in my production virtual table code should be:

VIRTUAL TABLE "PROJ2.DB::VT_Table1" AT "PROD1_TO_PROD2"."Tenant3"."TEST_SCHEMA"."PROJ1.DB::Table1"

In the production system I need Remote source name, database name and schema name to be changed.

I am looking for the functionality to define these both the configuration in logical schema and assign them into .hdbvirtualtableconfig file for single virtual table so that it can work in both development and production.

Hope I am clear in explaining my requirement.

Thanks.

BR,

Vivek.

0 Kudos

Hi Florian,

Thanks for the reply. I have gone through the SAP help document but I have some doubts in that. Please correct me if my understanding is wrong.

Do I have to define 2 separate logical schema one for development and other for production system? If I have to define 2 separate logical schema then do I have to create 2 configuration in .hdbvirtualtableconfig file. How I will use these 2 configuration to define a single virtual table which will work in both development and production system.

Please could you provide one simple example where 2 logical schema are defined and used them into a single virtual table.

Thanks.

Best Regards,

Vivek.

pfefferf
Active Contributor
0 Kudos

What additional information you require in addition to that one given in the official documentation here?