Oliver Wilms · Sep 23, 2021 go to post

Hello, I want to post update that InterSystems told me they did not support mirror with AWS Fargate because mirror requires static ip. I wanted to use containers running on Fargate serverless which will change ip each time a new container starts.

Oliver Wilms · Oct 4, 2021 go to post

The problem is only happening with quote-style escaping checkbox checked and it appears to be fixed in IRIS 2021.1

Oliver Wilms · Oct 8, 2021 go to post

I believe you need to add a volume to add a directory to the container and you can then browse to that location.

docker run ... -v myFilePathOutside:myPathInsideContainer ...

Oliver Wilms · Oct 22, 2021 go to post

Hi Evgeny,

I had never used the code quality tool before. It identified a bug which is now fixed. Please add bonus for code quality and article to interoperability-for-money. I think I will attempt to implement workflow as nobody else has done it in this contest.

Oliver Wilms · Nov 4, 2021 go to post

I like that idea, Henry. Either update real data to fake data or just create fake data for testing.

Oliver Wilms · Nov 19, 2021 go to post

I am looking at an interface written in Health Connect that inserts one row at a time using Outbound SQL Adapter. I have observed inserting 200k rows took 4 hours. Does this article say, if I use this adapter properly, I can reduce insert time a lot?

Oliver Wilms · Nov 20, 2021 go to post

I have tried to adapt your example to run on HealthShare 2019.1. I get an error when I call ..Adapter.ExecuteUpdateBatchParamArray from SQLInsertOperation. 

I debugged the OutboundAdapter code. The error happens on this line:

Set pHS=..%JGProxy.prepareStatement(..%ConnHandle,pSQLStatement)

..%ConnHandle is not an Object. pSQLStatement looks okay.

My code is here:

https://github.com/oliverwilms/etl/blob/main/src/Oliver/SQL/OutboundAda…

Any idea what is the problem?

Oliver Wilms · Jan 8, 2022 go to post

I created a new class called "dc.data.finance.transact" avoiding RESERVED words DATE, CHECK, and TRANSACTION. Then I ran this command in SQL Management Portal:

LOAD DATA FROM FILE '/irisrun/repo/data/finance-transactions-08-Jan-2022_08-25.csv' into dc_data_finance.transact

Row count: 76 Performance: 4.318 seconds  91420 global references 1837548 commands executed 3 disk read latency (ms)  Cached Query: %sqlcq.USER.cls23  Last update: 2022-01-09 00:04:31.471

Print

  76 row(s) affected

Oliver Wilms · Jan 8, 2022 go to post

User Error identified: I missed adding USING {"from":{"file":{"header":"1"}}} at the end. The correct statement that skipped "Balance" column was:

LOAD DATA FROM FILE '/irisrun/repo/data/finance-transactions-08-Jan-2022_08-25.csv'
INTO dc_data_finance.transact(TranDate,CheckNumber,Merchant,Category,SubCategory,Memo,Credit,Debit,BillPay,DebitCard,Account,Status)
VALUES("Date","Check",Merchant,Category,SubCategory,Memo,Credit,Debit,"Bill Pay","Debit Card",Account,Status)
USING {"from":{"file":{"header":"1"}}}

Oliver Wilms · Jan 9, 2022 go to post

Thank you for the suggestion, Robert. I tried to include TO_DATE inside VALUES, but it did not work with LOAD DATA

Oliver Wilms · Jan 9, 2022 go to post

I wonder if a method like TranDateODBCToLogical is executed when LOAD DATA tries to INSERT a row of data or is there any trigger that I could add to the class definition to convert the value "4/10/2021" to a %Date logical value?

Oliver Wilms · Jan 9, 2022 go to post

I created a util class with a classmethod to read the CSV and update the date format to yyyy-mm-dd. Thanks for the suggestion, Muhammad

Oliver Wilms · Jan 10, 2022 go to post

Eduard,

Ideally I would insert directly into date property from text value format 'MM/DD/YYYY'. I do not think we can use TO_DATE() or other SQL function with LOAD DATA. I decided to use a util class to reformat the date column and write a reformatted text file to use as input for LOAD DATA.

Oliver Wilms · Apr 2, 2022 go to post

In Cache or IRIS globals subscripts, numbers do not get quoted. There is no difference between ^GLOBAL(1) and ^GLOBAL("1")

Oliver Wilms · May 13, 2022 go to post

Hello Mark, I think I like to take on the challenge. How do you plan to access the monitoring page?

Oliver Wilms · May 13, 2022 go to post

Hi Mark,

I have adapted the code for Production Monitor into a custom class User.ProductionMonitor. It can get host info (status OK or Error) and also Queues sizes. I also created ProductionManager.csp to display the info. I hope it helps you. Hopefully you will share what you do and maybe we both get a better solution!

Please see code here: oliverwilms/production-monitor (github.com)

Oliver Wilms · May 27, 2022 go to post

Hi Mark,

I work on integrating your changes into my repo. I accidentally saved a change in your repo. I am also not expert in git hub. I think no harm done. Sorry about confusion. Look forward to submit this effort to contest...

Oliver Wilms · Jun 1, 2022 go to post

I discussed this with InterSystems WRC. They told me they will clearly document that Pool Size should not be implemented using System Default Settings. I guess we cannot have different pool sizes in different environments...

Oliver Wilms · Jun 28, 2022 go to post

Hello, Sathish, I recently published test-data app that utilizes a shell script to create a test file:

InterSystems Open Exchange
 

facture.cls defines the parameters for the RunScript classmethod.

ClassMethod DefineProductScript(
  pName As %String = "Demo2",
  pDebug As %Integer = 0) As %Status
  {
  Set pQuery = "SELECT ID from dc_iris.product WHERE Name = '?'"
  Set pQuery = $Replace(pQuery,"?",pName)
  Write:pDebug pQuery,!
  Set tSC = ##class(dc.iris.util).ExecuteQueryOneValue(pQuery,.oProduct)
  Write:pDebug tSC,!
  Set oProduct = ##class(dc.iris.product).%OpenId(oProduct)
  If ($IsObject(oProduct) = 0) Set oProduct = ##class(dc.iris.product).%New()
  Do:pDebug $System.OBJ.Dump(oProduct)
  Set oProduct.ClassName = "dc.iris.product"
  Set oProduct.MethodName = "RunScript"
  Set oProduct.RunCmd = "/opt/irisbuild/demo.sh"
  Set pRandom = "random"
  Set pOutput = "/opt/transform/practice/"
  Set pTemplate = "/usr/irissys/mgr/data/"
  Set oProduct.RunParam1 = "$Qty"
  Set oProduct.RunParam2 = pRandom
  Set oProduct.RunParam3 = pOutput
  Set oProduct.RunParam4 = pTemplate
  Set oProduct.Name = pName
  //Set oProduct.TargetPath = "/opt/transform/practice/"
  Set tSC = oProduct.%Save()
  Quit tSC
  }
ClassMethod RunScript(
  pProduct,
  pQuantity) As %Status
  {
  Set tSC = $$$OK
  Set oProduct = $Get(pProduct)
  If ($IsObject(oProduct) = 0) {
  Set oProduct = ##class(dc.iris.product).%OpenId(oProduct)
  }
  If ($IsObject(oProduct) = 0) {
  Set tSC = $$$ERROR($$$GeneralError,"No product defined")
  Quit tSC
  }
  Set pCmd = oProduct.RunCmd
  Set pNumberOfFiles = $Get(pQuantity,1)
  Set args=4
  Set args(1) = oProduct.RunParam1
  Set args(2) = oProduct.RunParam2
  Set args(3) = oProduct.RunParam3
  Set args(4) = oProduct.RunParam4
  For ii = 1:1:args {
  If (args(ii) = "$Qty") Set args(ii) = pNumberOfFiles
  }
  Set tReturn = $ZF(-100,"/SHELL",pCmd,.args)
  Quit tSC
 

}

Oliver Wilms · Jun 30, 2022 go to post

Hello, can you verify that the script is executed? Are permissions properly set? Can you try with a different more simple script such as echo "some message" > someFile? I also use IRIS (containers) on Linux.

Oliver Wilms · Jul 1, 2022 go to post

Interesting question. I looked in Documentation and found a CreateDocumentation classMethod. I tried to test it with this code. I got an error in my Production. Let me know if this helps you. I will look at getProductionItems() next...

ClassMethod CreateDocumentation(
pProduction As %String = "",
pIntro As %Boolean = 1,
pFormat As %String,
Output LogFileName As %String,
Output URL As %String,
Output BookName As %String,
PDFFileName As %String,
PDFRenderer As %String,
ByRef Params As %String,
pAllSettings As %Boolean = 0) As %Status
{
Set tSC = $$$OK
If (pProduction = "") {
Set pProduction = ##class(Ens.Director).GetActiveProductionName()
}
Try {
Set tSC = ##class(%SYS.Ensemble).CreateDocumentation(pProduction,pIntro,$G(pFormat),.LogFileName,.URL,.BookName,$G(PDFFileName),$G(PDFRenderer),.Params,pAllSettings)
Catch {
Set tSC = ##class(%SYS.Ensemble).CreateDocumentation(pProduction,pIntro,$G(pFormat),.LogFileName,.URL,.BookName,$G(PDFFileName),$G(PDFRenderer),.Params)
}
Do $System.Status.DisplayError(tSC)
ZW
Quit tSC
}
 

Oliver Wilms · Jul 1, 2022 go to post

I have tried using getProductionItems() using this code:

ClassMethod GetProductionItems(
pProd As %String,
pDefinition As %String,
pAutoAdd As %String) As %Status
{
Set tSC = $$$OK
If ($Get(pProd) = "") {
Set pProd = ##class(Ens.Director).GetActiveProductionName()
}
Set tProduction = ##class(Ens.Config.Production).%OpenId(pProd)
Set tSC = ##class(Ens.Director).getProductionItems(tProduction,.pDefinition,.pAutoAdd)
ZW
Quit tSC
}
 

Oliver Wilms · Jul 10, 2022 go to post

Hi, Eduard, I had Unauthenticated AND Password Auth enabled. I tried removing unauthenticated access and now I see login failures in audit database.

Oliver Wilms · Jul 10, 2022 go to post

I just realized the error only occurs on my work computer. I see login failures in audit log database. It works correctly on other computers.

Oliver Wilms · Jul 10, 2022 go to post

I just realized this only happens on my work laptop. Maybe some browser restriction

Oliver Wilms · Jul 27, 2022 go to post

Hi, David, I found your app looking for an example of an API definition that can be used to define a REST app. I cloned your app and tried to build it, but the web image did not complete build. I tried to build IRIS image here:

oliverwilms/iris-explorer: Angular Application that use the standard API discovery in InterSystems IRIS in order to inspect existing APIs and create new APIs using Swagger 2.0 OpenAPI specification (github.com)

I added iris.script where I use ^%REST. It works doing something, but something is missing?