Mack Altman · Dec 27, 2016

Using global mapping for redirecting new entries into global

Currently, namespace Alpha is configured to use database AlphaDB as its global database. How would we go about having namespace Alpha configured to use database AlphaDB for its global database except where global ^Customers(CustomerId) has a CustomerId greater than 10M, which we would like to have it redirected to database BetaDB.

In other words, ^|"AlphaDB"|Customers contains all customers between 1 and 10,000,000; and ^|"BetaDB"|Customers contains all customers greater than 10,000,000. Any help would be appreciated.

0 390
Discussion (4)0
Log in or sign up to continue

Yes. However, I'm not showing where in the documentation, or in the link you've provided, it showing what I've asked. I'm not sure how efficient it would be to place 10M references in the global mappings. Are you seeing something in the referenced link that addresses the issue discussed?

Hi, Mack! Here is the closer link to the chapter in this article, which describes the topic.

And it leads also to another article, which describes how you can manage the global subscripts mapping.

Due to receiving the Zen .js errors, I was unable to use the Global Mappings page; however, I was able to change the Default Database for Globals to BetaDB and then use the following to provide the solution.

%SYS>s Properties("Database")="AlphaDB", Status=##Class(Config.MapGlobals).Create("Alpha","Customers(BEGIN):(10000001)",.Properties)