Discussion Eduard Lebedyuk · Jul 8, 2021 DC Challenge: If you can read this... Hey Community, Here's a new CodeGolf challenge for you! Check the details in this post. Task You'll have to translate a string into a Pilot's alphabet (NATO phonetic alphabet). Input: If, you can read? Output: #Code Golf #InterSystems IRIS 7 32 2 598
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
Article Eduard Lebedyuk · Jun 3, 2021 7m read Running InterSystems Reports in containers IMPORTANT NOTE InterSystems no longer provides a separate InterSystems Reports Server container. To run containerized InterSystems Reports Server, use Logi Reports Server container and your InterSystems Reports Server license. Documentation. InterSystems Reports is powered by Logi Report (formerly named JReport), a product of Logi Analytics. InterSystems Reports is supported by InterSystems IRIS and InterSystems IRIS for Health. It provides a robust modern reporting solution that includes: Embedded operational reporting which can be customized by both report developers and end users. Pixel-perfect formatting that lets you develop highly specific form grids or other special layout elements for invoices, documents, and forms. Banded layouts that provide structure for aggregated and detailed data. Exact positioning of headers, footers, aggregations, detailed data, images, and sub-reports. A variety of page report types. Large-scale dynamic report scheduling and distribution including export to PDF, XLS, HTML, XML, and other file formats, printing, and archiving for regulatory compliance. InterSystems Reports consists of: A report designer, which provides Design and Preview Tabs that enable report developers to create and preview reports with live data. A report server which provides end users browser-based access to run, schedule, filter, and modify reports. From InterSystems documentation. This article focuses on the Server part of InterSystems Reports and provides a guide on running Report Server in containers while persisting all the data. #Docker #System Administration #InterSystems IRIS Open Exchange app 6 2 3 677
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
Article Eduard Lebedyuk · Apr 21, 2021 1m read Ctrl+C / Ctrl+V in IRIS Terminal It's possible to enable Ctrl+C / Ctrl+V in IRIS Terminal for Windows. To do that, open Terminal and select Edit > User Settings and enable Windows edit accelerators. This setting specifies whether the Terminal enables the common Windows edit shortcuts (Ctrl+C, Ctrl+V, Ctrl+Shift+V), in addition to the basic Terminal edit shortcuts (Ctrl+Insert and Shift+Insert). After that Ctrl+C / Ctrl+V would work. Also <SYNTAX> errors after incorrect copy/paste go away. Docs. #Beginner #Microsoft Windows #Terminal #InterSystems IRIS 11 7 1 333
Discussion Eduard Lebedyuk · Apr 2, 2021 InterSystems IRIS multistage builds Images for other languages are often build using multistage build process. What about InterSystems IRIS? Consider this Dockerfile: FROM irishealth-community:2020.4.0.524.0 AS builder # Load code into USER and compile # Adjust settings, etc. FROM irishealth-community:2020.4.0.524.0 # replace in standard kit with what we modified in first stage COPY --from=builder /usr/irissys/iris.cpf /usr/irissys/. COPY --from=builder /usr/irissys/mgr/IRIS.DAT /usr/irissys/mgr/. COPY --from=builder /usr/irissys/mgr/user/IRIS.DAT /usr/irissys/mgr/user/. The advantage of this approach is the image size.The disadvantage is that on a final stage developer must know/remember all the modified places in the builder image.But otherwise is this approach OK for InterSystems IRIS?Have anyone tried to build IRIS images this way? #InterSystems IRIS 2 9 0 250
Article Eduard Lebedyuk · Mar 4, 2021 1m read Get a list of cached queries and their texts Recently I wanted to get a list of all cached queries and their texts. Here's how to do that. First create an SQL Procedure returning Cache Query text from a Cached Query routine name: Class test.CQ { /// SELECT test.CQ_GetText() ClassMethod GetText(routine As %String) As %String [ CodeMode = expression, SqlProc ] { ##class(%SQLCatalog).GetCachedQueryInfo(routine) } } And after that you can execute this query: #Code Snippet #SQL #InterSystems IRIS 4 3 0 563
Article Eduard Lebedyuk · Jan 12, 2021 1m read How to work with InterSystems IRIS from DataGrip DataGrip is a multi-engine database environment targeting the specific needs of professional SQL developers, DataGrip makes working with databases an enjoyable and productive experience. To work with InterSystems IRIS from DataGrip you'll need to add InterSystems JDBC driver first (once per DataGrip) and after that add all your InterSystems IRIS connections. Part 1: Add InterSystems IRIS JDBC Driver 1. Go To File → DataSources #JDBC #SQL #InterSystems IRIS 1 0 0 629
Discussion Eduard Lebedyuk · Jan 10, 2021 Code Golf: Diamonds To start the year let's have a round of CodeGolf! You know the drill. Shortest solution wins. Print a size ascending range of Diamonds using the numbers 1 to 9, ranging from size 1 to size N, each diamond separated by a blank line. A size 1 diamond should look like this, a single centered 1: 1 With the size N=9 diamond looking like this: #Code Snippet #InterSystems IRIS 2 19 0 457
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
Article Eduard Lebedyuk · Dec 2, 2020 2m read Calculating detailed class/table size In the good old days (tm) determining the size of the data, streams, and indices for a class/table was easy - you just ran %GSIZE and check D, S, and I globals respectively. However, nowadays sharding, optimized global names, and indices in separate globals produce %GSIZE output looking like this: #Sharding #SQL #InterSystems IRIS Open Exchange app 12 6 5 1.1K
Article Eduard Lebedyuk · Nov 19, 2020 3m read Deploying a sharded cluster with Docker and MergeCPF In this article, we will run an InterSystems IRIS cluster using docker and Merge CPF files - a new feature allowing you to configure servers with ease. On UNIX® and Linux, you can modify the default iris.cpf using a declarative CPF merge file. A merge file is a partial CPF that sets the desired values for any number of parameters upon instance startup. The CPF merge operation works only once for each instance. Our cluster architecture is very simple, it would consist of one Node1 (master node) and two Data Nodes (check all available roles). Unfortunately, docker-compose cannot deploy to several servers (although it can deploy to remote hosts), so this is useful for local development of sharding-aware data models, tests, and such. For a productive InterSystems IRIS Cluster deployment, you should use either ICM or IKO. #Beginner #Best Practices #Docker #Sharding #InterSystems IRIS Open Exchange app 6 3 1 567
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
Discussion Eduard Lebedyuk · Aug 13, 2020 Do you pass Ids or Objects in Interoperability Productions Messages between Business Hosts in Interoperability Production often contain object properties. Do you define and pass them as object properties or do you define and pass them as Integers with objects conversion where required? Why? #Business Operation #Business Process (BPL) #Business Service #Interoperability #InterSystems IRIS 0 1 0 167
Article Eduard Lebedyuk · Aug 12, 2020 3m read Calling production from a REST Broker Productions often need to receive REST requests. Here's how to do that. 1. Create proxy Service: /// Empty BS we would use to send Produciton requests Class production.ProxyService Extends Ens.BusinessService { } 2. Add it to production as RESTService (or any other name). #Business Operation #Business Process (BPL) #Business Service #Interoperability #REST API #InterSystems IRIS 5 8 1 846
Article Eduard Lebedyuk · Aug 7, 2020 5m read Containerising .Net/Java Gateways (or Kafka Integration Demo) In this article, I will show how you can easily containerize .Net/Java Gateways. For our example, we will develop an Integration with Apache Kafka. And to interoperate with Java/.Net code we will use PEX . Architecture Our solution will run completely in docker and look like this: #.NET #Best Practices #Business Operation #Business Service #Docker #Interoperability #Java #InterSystems IRIS Open Exchange app 7 7 1 1.1K
Article Eduard Lebedyuk · Aug 3, 2020 3m read Creating classes/tables with more than 999 properties in InterSystems IRIS InterSystems IRIS currently limits classes to 999 properties. But what to do if you need to store more data per object? This article would answer this question (with the additional cameo of Community Python Gateway and how you can transfer wide datasets into Python). The answer is very simple actually - InterSystems IRIS currently limits classes to 999 properties, but not to 999 primitives. The property in InterSystems IRIS can be an object with 999 properties and so on - the limit can be easily disregarded. #Globals #Object Data Model #Python #Relational Tables #SQL #Tips & Tricks #InterSystems IRIS 5 13 1 594
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 216
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