Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Script calculation view and schema mapping

$
0
0

Hi folks,

 

I have a calculation view with a bunch of SQL Script in it.  In the script it references tables with something like this;  select from "HANADEV"."BSEG" where...etc

 

Now lets say my hana development schema is called HANADEV, on my testing/qa server it's called HANAQAS and my production server it's called HANAPRD.

 

Next I want to export my view from my development server to my testing server however it has the schema "HANADEV" hardcoded. 

 

OPTION1:

If I try to change the script to read "HANAQAS"."BSEG" (while still on HANADEV server and before I create an export) I get error that table does not exist even if I have schema mapping that points HANAQAS authoring schema to HANADEV physical schema. 

 

OPTION2:

I leave my script as "HANADEV"."BSEG" and export from my development server and import into my test server and set the schema mapping on the test server so that HANADEV authoring schema points to HANAQAS physical schema.  When the imported object is activated it fails saying the table does not exist in schema HANADEV.  (seems schema mapping does not work)

 

OPTION3:

I import the view into my test environment, the activation step fails, and I manually go into the view and EDIT NATIVELY.  This is the only thing that seems to work but obviously not ideal.

 

I'm sure I am missing something obvious ( and I'm scared of what Lars will comment here ) but alas I am not sure so I will ask how are some of you handling this and/or what is another option that I'm overlooking?  Perhaps I should use the same generic schema name throughout my landscape?  Also I could have sworn I have gotten schema mapping to work the way I wanted to before but I have recently updated to 47 so wondering if something is wrong with schema mapping.

 

Thanks!

-Patrick


Viewing all articles
Browse latest Browse all 6412

Trending Articles