I haver read $Query and $Order but still not getting the code that i am looking to work correctly.
I have a global like
^TestGlobal("Not Configured","Value 1")=""
^TestGlobal("Not Configured","Value 2")=""
Globals are multidimensional sparse arrays which are stored in InterSystems Data Platform. Everything in InterSystems Products is stored in Globals: Classes, Tables, Documents, Code.
I haver read $Query and $Order but still not getting the code that i am looking to work correctly.
I have a global like
^TestGlobal("Not Configured","Value 1")=""
^TestGlobal("Not Configured","Value 2")=""
What is the best way to get the size and other storage details of individual Globals in a namespace?
Thanks,
Mary
Dear people,
I (really) spent hours on finding the maximum size a Global is allowed to be (for Windows, if that matters). All I seem to run into are database sizes (derived from a max number of blocks and block size), but I refuse to believe that is correct because too small to be realistic.
It will undoubtedly my fault that I don't understand or misread the concepts of "database" vs Globals, envisioning files as such while one set of functional Globals in one file (?
Hi,
I have a class with around 400k lines and 60 columns. Class storage is Cache SQL storage (Mapped from a global).
I want to create multiple indices on certain fields.
I am familiar with two approaches:
1. Create a new map (Index type) on a pointer global.
2. Create a bitmap index
Which approach is more recommended to be used in the case I described? If there are any other approaches, I will be happy to hear.
Thanks :)
Hi all,
I am trying to create a method to count the number of entries in a global, including all subscripts. I am having a bit of trouble getting the code to make it to the second subscript. When I get to the position where my key is "Canada" and I add a comma and empty quotes to it, it returns USA as the new key when I do the order function. Is the $Order or the global not able to use a single string to represent multiple subscripts?
Hi All, I need the what are all the global having subscript and value contain what I have the value.How to find out?
I want to generate a list object of routines from the ^$ROUTINE global without directly reading the [^$ROUTINE] global.
E.G. I want to create an array/variable/object with names of all routines that start with "ABC" so that an application process can use each routine name as input for a subsequent process.
Those of you that worked already with ECP might know that it operates not only across
operating systems, processor technologies (big-little-endian), but also -with limits- across versions in C/E.
This cross-version feature also includes IRIS (verified for 2020.1) and C/E (2018.3)
Hi,
We are using CACHE 2017.2.1, I would like to retrieve data from Journal for killed global. Let say we have global name ^ EMP(123) with data and also have some child nodes and it has been killed by using cache kill command for some reason and we don't know who has executed this and when. My questions are below.
1) Can we get back the data of killed global from journal files,Is it possible or not ?
2) If above question is Yes, then how to find that specific journal file, which has the global which has been killed?
Hi, Community!
Consider you move data from one server to another or make a deployment with persistent data. What do you do with index globals?
Is it always better to rebuild them or there are some cases when it worth to take them too?
Is there any good book where is described process of mapping globals to classes? And book about Storage?
I didn't find much information about these questions in documentation :-(
Let's say I have a global named ^a and I need to export its nodes 1, 2, 3, 5 only.
Currently I write something like this:
Write $SYSTEM.OBJ.Export("a(1).gbl,a(2).gbl,a(3).gbl,a(5).gbl", "C:\Users\eduard\Desktop\a.xml")Is there a way to write it shorter? I want to write global node once and list all the subscripts I need.
Have very little XML experience and have been able to manually create output. Have a need to take data that I store in a M global (example: ^TML("HDATA", ) and out put it in CCDA XML format.
Are there any examples of M code using the XMLWriter to accomplish this?
Or can anyone provide some guidance
Any help would be greatly appreciated.
I ran %GSIZE and my ^cacheStream global is very large. How do I go about
1. Evaluating what data is in the global.
2. Clean it up.
Thanks!
Hi,
I wonder if you could help me with a problem with persistent globals and journals.
We have a few interfaces using a persistent global just to translate some codes. The use of that global is like a lookup table.an interface calls a method that search for a field (in the message) in the global.
I am creating "models" that contain rows in several class tables called Model, Path, Node.
So, model 19 includes 1 row in the Model table, 11 rows in the Path table, and 10 rows in the Node table.
I'd like to write some utilities to "move" model 19 from one instance to another.
I found some old (maybe deprecated?) functionality, the %SYNC.Transporter, which seems to work. I can write a SQL query to select the rows of interest, and export those record to a ,gof file. I can create 3 of them (one file per class), and then on the target instance, I can import from the .
I have a classname and a property name. I want to know, when I get object value directly from a global, which property corresponds to which position in the $lb structure.
Here's what I got so far:
Class Utils.Storage {
/// write ##class(Utils.Storage).GetPosition()
ClassMethod GetPosition(class As %Dictionary.CacheClassname = "Sample.Address", property As %Dictionary.CacheIdentifier = "Zip") As %Integer
{
set strategy = $$$comClassKeyGet(class, $$$cCLASSstoragestrategy)
set strategyId = class _ "||" _ strategy
&sql(SELECT Name INTO :position
FROM %Dictionary.Hi,
We have a global with 65 million entries. All we are doing is just iterating through each entry to find out the total no of entries. It is currently taking 110 minutes. Is this something normal? What can we do to speed up this process? Below is the program for just iterating each entry in the global.
s sub=" ,count=0
f{
s sub=$o(^YYY(sub)) q:sub=""
s count= count +1
}
w!, "Total Count:"_ count
I am inserting rows in a table. This table is appearing in all namespace as I did global mapping.
So once I run insert command from a method, it insert the rows. When I run the same insert command from other namespace, it replace the existing data in table.
Insert command is same in all namespace but the data I m inserting is different.
Sometimes global mapping of the same globals can be defined in different ways. E.g., I need to define it for 3 globals ^qAuditC, ^qAuditLog, ^qAuditLogC from the same database named APP-NOJOURN. Which approach should be better from the performance point of view?
1) qAudit* => APP-NOJOURN (one record in global mapping table)
or
2) qAuditC => APP-NOJOURN
qAuditLog => APP-NOJOURN
qAuditLogC => APP-NOJOURN (three records in global mapping table)
From one hand, the less records in global mapping table, the better. From other hand, * can cause additional processing at run time.
I have a number of globals I want to loop through depending on a passed in string...
^A("SYSTEM")
^B("SYSTEM")
^C("SYSTEM")
^D("SYSTEM")
^E("SYSTEM")
I am passing in a string of "A:C:D"
Piecing that to pull out A,C,D, then want to use that to pull out A,C,D from above, but having problems setting the name of the global to be the name of the variable I have pulled out of the string
How do I set this?
I have tried ^varname("SYSTEM")
also tried setting a variable to have the value "^varname" and using that
Thanks
Hello,
I have a global whose structure is multi-level and I am trying through a class and a SQL query to display a table which includes all the values and levels.
Is the default language (i.e., $$$DefaultLanguage, which is used as the basis for localization with $$$Text/etc. at compile time) always "en" for new Caché installations, or could it be different? How is this determined? I don't see an option to select a language during Caché installation.
Also, is there a supported/preferred API for setting the default language? Looking at %occMessages.inc, one option would be:
Set $$$DefaultLanguageNode = "en"
But I'd expect there to be a classmethod for this somewhere (and haven't managed to find it yet).
Hi,
I'm trying to export a global with this library %Library.Global with this call:
When I call this method $ZERROR is setted to "<NOTOPEN>OpenDev+15^%Wprim"
Can someone tell me where is the problem on this?
Thanks a lot
If I were trying to access an index of a global variable, what time complexity would this operation have? My understanding of languages like Java/C++ is that arrays are stored as blocks of memory so that x[15] would have a lookup time complexity of O(1) because it just goes to (address of the array + 15) and retrieves the value stored there.
How does this work in Cache where the index of a variable isn't necessarily an integer value? If I were to have a variable like the following:
x("Adam") = "Red"
x("George") = "Blue"
x("Bryan") = "Green"
etc.
Hello. When you export and then import a table of data, is the import smart enough to figure out if a row already exists in the new namespace, and if so update the row rather than just save/add the row?
For example, we have a table in DEV, and the same table in QA. The DEV table has more fields than QA. When we moved up the class, the field definitions went with the table into QA, so now the table definition is the same in both.
We need to export the data from DEV and import it into QA, but file each row in QA as an existing row, and just update its data.
I have two databases, and both of them have a global ^Data with subscripts going from 1 to 10 000 000.
I want to get one database with global ^Data but with subscripts going from 1 to 20 000 000.
Since each db is around 100 Gb and they are on a different hosts, what's the best way to merge them?
Hi all,
I need to create a routine to modifiy some values in a global.
My first attempt was:
but if I use a *.bas file (cache basic script), I'm not able to use these commands ($Order and $Next) and I don't know how to translate theses words.
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.
I am inspecting our DB globals in order to reduce sizes of the worst offenders if possible. When I come to a large global, I am interested which of its nodes are the largest. Hence code below with unexpected different results. Any explanations why are results different?
d partialGlobalsSize(dirName,globalName)
partialGlobalsSize(dir,global)
S sub="",path="C:\Cachesys\mgr\"_dir_"\",searchGlobal="^"_global
S x=##Class(%GlobalEdit).GetGlobalSize(path, global,.Alloc,.Size)
W global,",",Size,! ; Got
S x=##Class(%GlobalEdit).GetGlobalSizeBySubscript(path,global,global,.