Question Eduard Lebedyuk · Aug 17, 2021 Interoperability Alerts - routing and aggregating Alerts are automatic notifications triggered by specified events or thresholds being exceeded. InterSystems Documentation I have a Business Service connected to a machine with ~100 sensors. BS receives sensor values once a second. Several conditions determine if a Business Service should raise an alert (it's a list of: sensor id > threshold). #Interoperability #InterSystems IRIS 1 2 0 202
Question Eduard Lebedyuk · Aug 2, 2021 Median in SQL Does InterSystems IRIS has a MEDIAN (or percentile) calculation in SQL? #Analytics #Beginner #SQL #InterSystems IRIS 2 4 0 303
Question Eduard Lebedyuk · Jul 28, 2021 Updating active Business Processes I have a BPL Business process which always processes messages - mainly it waits for responses since downstream systems are seriously async. I need to update this process. Wwould the existing instances of this Business Process complete correctly after the update? My BPL changes would result in: New S method in the Thread class New OnResponse method in the context class Both changes are in the middle of the process, so there are S/OnResponse methods before and after my change. #Business Process (BPL) #Interoperability #InterSystems IRIS 0 4 0 126
Question Eduard Lebedyuk · Jun 4, 2021 BI (DeepSee) - calculate on pivot variable value Is there a way to add/substract from a pivot variable? I have this MDX: SELECT NON EMPTY [DateOfSale].[Actual].[YearSold].&[$variable.Year] ON 0, NON EMPTY [Product].[P1].[Product Name].Members ON 1 FROM [HOLEFOODS] And with pivot variable Year equal to, say, 2016 it works: Now I want to add previous year first with one pivot variable and one explicit reference. It also works: #Analytics #Analyzer #InterSystems IRIS 0 3 0 114
Question Eduard Lebedyuk · Jun 3, 2021 DeepSee: Comparision with the previous year Is there a way in BI (DeepSee) to compare current value, to a value of a previous year? For example I can hardcode this explicitly: But I want in a widget to filter by year (1st column) and get the value for a previous year in a next column. YTY would be even better. What MDX functions should I use? Examples? #Analytics #Analyzer #InterSystems IRIS BI (DeepSee) 0 1 0 161
Question Eduard Lebedyuk · Apr 25, 2021 messages.log/cconsole.log in SQL? Do we have messages.log/cconsole.log projection in SQL? I was sure we do, but unable to find it. #Beginner #System Administration #InterSystems IRIS 0 5 0 330
Question Eduard Lebedyuk · Jan 2, 2021 SQL Search/iFind to find out how many matches are there I have an SQL text index defined like this Index TextIndex On (Text) As %iFind.Index.Basic(IGNOREPUNCTUATION = 1, INDEXOPTION = 0, LANGUAGE = "en", LOWER = 1); If I run a query like this: SELECT Text FROM Post WHERE %ID %FIND search_index("TextIndex",'ABC') I get 20 results with posts containing the term ABC. But each post can contain the term ABC several times. #iFind #SQL #InterSystems IRIS 0 13 0 364
Question Eduard Lebedyuk · Aug 26, 2020 XML Serialization - output ID I have a class: Class test.Person Extends (%Persistent, %XML.Adaptor) { Property Name; } I want to serialize it into this XML: <Person> <Id>1</Id> <Name>Ed</Name> </Person> Is it possible? It's for the Visual Trace so I can't use %XML.Writer. #XML #InterSystems IRIS 0 2 0 281
Question Eduard Lebedyuk · Jul 9, 2020 Is there a way to defermine that column is a JSON_OBJECT I got a resultset, and some columns might be a JSON_OBJECT. Is there a way (based on metadata) to determine that the column was formed from JSON_OBJECT function? set rs = ##class(%SQL.Statement).%ExecDirect(,"SELECT 1 colA, JSON_OBJECT('id':1) col2") do rs.%Display() I do not want to try parsing json. #SQL #InterSystems IRIS 0 5 0 215
Question Eduard Lebedyuk · Jul 6, 2020 How to generate runtimeconfig.json\deps.json for dependency with dotnet publish? I'm building a .Net Core Gateway container. Here's the issue. As a final step I'm building a .Net Core 2.1 library. It has a runnable dependency - .Net Gateway, which I need to start first. However dotnet publish generates .runtimeconfig.json and .deps.json only for my library and not for my dependency (.Net Gateway). Is there a way to force dotnet to generate .runtimeconfig.json and .deps.json for a dependency? I have tried: #.NET #Interoperability #InterSystems IRIS 0 2 0 7.8K
Question Eduard Lebedyuk · Jun 30, 2020 Running .Net/Java Gateways in Docker Does anyone have a Dockerfile for .Net/Java Gateways to share? I'm trying out PEX and I think being able to run it as a docker container would be great. To clarify I'm interested in container without IRIS, gateway only. #.NET #Containerization #Java #InterSystems IRIS 0 1 0 488
Question Eduard Lebedyuk · Apr 1, 2020 Use table-object as a part of SQL Query During runtime I build an object which is essentially a wrapper over in-memory table: col1 ... colN val11 ... valN1 val12 ... valN2 I want to use this object as a part of INSERT or UPDATE queries, based on a value of some column (the main use case one of the columns is an ID value) What's the best way to expose the object to SQL? #SQL #InterSystems IRIS 1 13 0 499
Question Eduard Lebedyuk · Mar 22, 2020 Adjusting LD_LIBRARY_PATH in containers I'm building a container from store/intersystems/iris-community:2019.4.0.383.0 . I need to add my folder to the LD_LIBRARY_PATH so that my custom shared library would load at runtime. How can I do that? Here's what I tried: #Containerization #Docker #InterSystems IRIS 0 2 0 2.7K
Question Eduard Lebedyuk · Mar 17, 2020 Building $lb from C I have a C string and I need to build a $lb from it. This code works fine for strings shorter than 254 characters: char *str = "some string"; int len = strlen(str); int add = 2; char *list = malloc(len + add + 1); char lenChar = len + add; sprintf(list, "%c\x01%s", lenChar, str); Thought maybe someone can share the code for longer strings? #Callout #InterSystems IRIS 0 1 1 270
Question Eduard Lebedyuk · Mar 6, 2020 Force terminal to the foreground after current command finishes running Simple problem: I leave a long-running command in terminal Switch to another task(s) Remember that I need to check on my command after a few hours Is there any way to force terminal to the foreground after current command ends? This is Windows with cterm/iristerm although Putty/Kitty solution would also be nice. #Microsoft Windows #Red Hat Enterprise Linux (RHEL) #Terminal #InterSystems IRIS 1 6 0 554
Question Eduard Lebedyuk · Mar 4, 2020 Request Timeout in Business Processes I want to send requests from custom BP with timeout and be able to understand that timeout event happened. I thought that I need to implement OnTimeout method in my process (in either caller or callee), however it seems like OnTimeout is never called. Let's say we have this parent process: #Business Process (BPL) #Interoperability #Ensemble #InterSystems IRIS 0 2 0 655
Question Eduard Lebedyuk · Jan 19, 2020 Mass XSD export I have a large amount of classes in several XML namespaces. Is there a way to generate all XSDs automatically? I've read the docs but it seems like it's a manual class-by-class process. #XML #InterSystems IRIS 0 1 0 239
Question Eduard Lebedyuk · Jan 15, 2020 Rename class programmatically How do I rename class programmatically? This discussion touches on data move which, is not a concern in my case (BPL renames). I also don't care about external references. The best I got is: #Beginner #InterSystems IRIS 1 5 0 426
Question Eduard Lebedyuk · Jan 15, 2020 How to determine that a package exists? I need to know if given package exists or not. Currently found two solution - one doesn't work, another works but I don't like it. Solution 1. I started, of course, with %Dictionary package - it has PackageDefinition class after all. However, %ExistsId returned 0 on packages that clearly do exist, so I went to %LoadData, it uses this macro to determine if the package exist: #Beginner #InterSystems IRIS 0 10 0 342
Question Eduard Lebedyuk · Jan 14, 2020 Getting dynamic object from iterator Is there a way to get dynamic object from iterator? set arr=[1,2,3] set iter=arr.%GetIterator() I pass iterator several frames down and I'd rather avoid passing both the array and iterator, but for debugging I need to access original object in a situation where only iterator is available. Is there a way to do it? #InterSystems IRIS 0 5 0 415