on 12-16-2012 8:31 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
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
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
Hi Folks,
Any step by step guides fr Schema mapping?
Sreehari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!!!
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.