cancel
Showing results for 
Search instead for 
Did you mean: 

Schema Mapping

0 Kudos

Hi Folks

I know schema mapping is used to migrate the objects from one scehma in one system to another sceham in another system

Since schema has tables and the tables will be loaded in the test system based on test data, is schema mapping used to migrate the structure definition.

I know the concept but I am trying to find  how it would be used.

Is  it only used for migrating procedures.

Can anybody share their experiences on how schema mapping is used, if you have any links to SAP document which explains in detail that will be helpful too.

regards

Poonam

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Poonam,

Here is an e.g. of how/why schema mapping is/should be used.

If I have two HANA environments - HAD (Development) & HAQ (Test). I have created table "ABC" in schema "SCHEMA1" in HAD. I have then created an attribute view on top of this table "ABC". Subsequently I export this.

In HAQ, I have created the same table "ABC" with the same structure but in a different schema name, let's say "SCHEMA2". When I import the attribute view from HAD, this will not work in HAQ. This is because the schema names are hardcoded/referenced in the attribute view definition and although the table names are the same in both systems, their schema names are different. While importing/activating/data previewing on the attribute view in HAQ, it will try to reference table "SCHEMA1"."ABC" and because that doesn't exist in HAQ, it will fail.

To get around this, schema mapping can be used. You maintain a mapping table in HAQ to say that the authoring schema (source schema - "SCHEMA1") is same as the physical schema (target schema - "SCHEMA2") and therefore at runtime, instead of looking at "SCHEMA1"."ABC", HANA will look automatically look at "SCHEMA2"."ABC".

Schema Mapping can be used with all content objects (not just attribute views).

More details on this in section 6.1.6 of this document - http://help.sap.com/hana/hana_dev_en.pdf

Thanks,

Anooj

0 Kudos

Hi Anooj

thanks for your response. I still have some more doubts.

For your following statement

"In HAQ, I have created the same table "ABC" with the same structure but in a different schema name, let's say "SCHEMA2""

Would you use Schema mapping to point to new schema. Will the following steps be correct

1     In target system maintain a schema mapping of "Schema1"(Authoring Schema) to "Scehma2"(Target Schema)

2.     From the source do an <export ><SAP HANA Studio><Tables> - only the catalog

3     Goto target and do an import

So can way say the following

1.schema mapping is used for table migration from source schema to target schema. 

2. also when you use to migrate the information models it helps to ensure that after the import the models point to correct shema.

regards

Poonam

Former Member
0 Kudos

Schema mapping is only used for information models - export & import of information models not tables.

When you export and import tables, it gets created within the same schema in your target system unless you manually change the export file to refer to a different schema.

As stated in my previous reply: If the table exists in source & target within the same schema, you don't need schema mapping for the information model on top of the table to work. But for some reason, you decide to have the target table in a different schema (say manually create them in a different schema or manually change the export file to point to a different schema), you need schema mapping to get the information model built on top of that table to work in the target system.

0 Kudos

Hi Anooj

this schema mapping needs to be present in source and target system.

Also if it is present in both systems, then in source system the mapping will have dummy target name and in target system the source will be a dummy name.

Is the above understanding correct.

Poonam

sagarjoshi
Advisor
Advisor
0 Kudos

Hi,

Schema mapping needs to be done only in target system. Nothing needs to be done in source system. Additionally if you develop procedures then name of schema needs to be mentioned as default schema in source system and you should use unqualified names of tables (without schema).

Regards,

Sagar

Former Member
0 Kudos

Thanks Sagar

Former Member
0 Kudos

Hi anooj.....

In which server  we will create schema mapping? i mean in dev sever or quality server or production server?

and if answer is quality and production server (target system),how it is possible.?becz in quality system ,we cant create or modify the object.....

Thanks in Advance.......

A.Sijin

Former Member
0 Kudos

This message was moderated.

Answers (1)

Answers (1)

sreehari_vpillai
Active Contributor
0 Kudos

Hi Folks,

Any step by step guides fr Schema mapping?

Sreehari

sachin_kulshrestha2
Active Contributor
0 Kudos

use the following link;;

http://saphanatutorial.com/sap-hana-schema-mapping/

or use help and in hana studio and search for Schema Mapping.

Hope this Helps!!!

0 Kudos

Hello Sreehari,

Goto HANA Studio -> Quick launch -> Click on Schema Mapping -> add the authoring(Source)schema name and Physical Schema(Target) name.

Regards,

Rahul

Former Member
0 Kudos

Hi Friends

Here I have one dought i.e How the Authoring schema and Physical schema will work.


Will Authoring schema treat as source system say HAD schema as unique (what ever the schema name will it treat as unique).


Regards,

Varaprasad.

lucas_oliveira
Advisor
Advisor
0 Kudos

hi Guys,

Please let's stop reviving old threads. Heads up for .

BRs,

Lucas de Oliveira - moderator

Former Member
0 Kudos

This message was moderated.