go to post Eduard Lebedyuk · Dec 3, 2019 RabbitMQ adapter can work with Cache (in non-interoperability environments).
go to post Eduard Lebedyuk · Dec 2, 2019 I'm using the same workaround. It works like this because $zf(-1) spawns a new process. If you want to change the environment variable for a current process, you can use this utility.
go to post Eduard Lebedyuk · Dec 2, 2019 You need to set $HOME and run the program in one call: set sc='$zf(-1,"export HOME=/tmp && soffice") Here's an example.
go to post Eduard Lebedyuk · Dec 2, 2019 You can change the $HOME for cacheusr to some other dir, /home/cacheusr probably.
go to post Eduard Lebedyuk · Dec 2, 2019 Well, as a cacheusr you don't have access to /root. Why not write into some temp directory?
go to post Eduard Lebedyuk · Dec 2, 2019 That's for Docker. GCP, while it uses containers, has a setup where all container's ports could possibly be available, but firewall prevents all access except specified firewall allow rules. Adding firewall access, as specified by @Dmitry Maslennikov should help.
go to post Eduard Lebedyuk · Dec 2, 2019 You can use any ODBC/JDBC database management software. I use DataGrip. It has code completion for table/field names and standard SQL syntax. Here's my URL template jdbc:Cache://{host}[:{port}]/{database}
go to post Eduard Lebedyuk · Dec 2, 2019 First of all I encourage you to update to 2016.2 or a later version, because JSON syntax differs considerably on 2016.1. Since 2016.2 we have a syntax-stable JSON API. Anyway, on 2016.1 you can do this: write obj.$toJSON()
go to post Eduard Lebedyuk · Nov 29, 2019 Note that instead of: do ##class(isc.py.util.Shell).Shell() Python Shell can be entered by simply typing zpy In there you can just directly type python code: exec(open('disk:/path/to/your/folder/testfile.py').read()) Or don't open the shell and call: set sc=##class(isc.py.Main).SimpleString("exec(open('disk:/path/to/your/folder/testfile.py').read())",,,.sc)
go to post Eduard Lebedyuk · Nov 29, 2019 set enMsg = "hello" set esMsg = "hola" set obj = {"language1":(enMsg),"language2":(esMsg)} write obj.%ToJSON() Outputs: {"language1":"hello","language2":"hola"}
go to post Eduard Lebedyuk · Nov 29, 2019 This should work for Python Gateway: set filename = "/path/to/code.py" set file = ##class(%Stream.FileCharacter).%New() set sc = file.LinkToFile(filename) set sc = ##class(isc.py.Main).ExecuteCode(file)
go to post Eduard Lebedyuk · Nov 28, 2019 1. Underscored properties are extracted. Get them by quoting property name (case is important too): set centro.codCias = objeto.GetAt(i)."cod_cias" 2. You don't need to init json provider as you're calling a classmethod, replace: set claseAux = ##class(%ZEN.Auxiliary.jsonProvider).%New() set tSC= claseAux.%ConvertJSONToObject(.linea,"EsquemasDatos.miSCS.GestionFavoritos.tns.infoCentro",.objeto,1) with: set tSC= ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(.linea,"EsquemasDatos.miSCS.GestionFavoritos.tns.infoCentro",.objeto,1) or even better: set class = ##class(EsquemasDatos.miSCS.GestionFavoritos.tns.infoCentro).%ClassName(1) set tSC= ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(.linea,class,.objeto,1) 3. Iterators for JSON. Recommended approach is upgrading to 2016.2+ as it contains way better json handling (dynamic objects) with iterators. For %ZEN.proxy object you can call %CopyToArray and iterate over it. set tSC = ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject("{""prop_a"":1,""prop_b"":2}",,.obj) do obj.%CopyToArray(.array) for { set key=$order(array(key),1,val) quit:key="" write key," = ",val,! } 4. Iterators for classes. Use a method generator to write the code iterating over properties. Relevant discussion.
go to post Eduard Lebedyuk · Nov 28, 2019 Call this sqlproc passing class and prop names: ClassMethod Params(class, prop) As %String [SQLProc] { set result = "" set param = "" for { set param = $$$defparamMemberNext(class,$$$cCLASSproperty,prop,$$$cPROPparameter,param) quit:(param ="") set value = $$$defMemberArrayGet(class,$$$cCLASSproperty,prop,$$$cPROPparameter,param) set result = result _ param _ "=" _ value _ "," } quit result }
go to post Eduard Lebedyuk · Nov 28, 2019 Property parameters stored as an array of strings. Since parameters are N:1 to property, your theoretical query isn't possible due to cardinality mismatch. What do you want to get?
go to post Eduard Lebedyuk · Nov 27, 2019 You need two task objects one of %SYS.Task class and another of your concrete implementation class. Call AssignSettings to merge settings. Example: Set tTaskDefClass = "User.Task.MessageArchive" Set tTaskObj = ##class(%SYS.Task).%New() Set tTaskObj.NameSpace = "<NameSpace>" Set tTaskObj.Name = "<tTaskName>" Set tTaskObj.TaskClass = tTaskDefClass Set tTaskObj.Description = "<tTaskDesc>" Set tTaskDefObj = $System.OBJ.New(tTaskDefClass) Set tTaskDefObj.BaseDir = "your value" Set tStatus = tTaskObj.AssignSettings(tTaskDefObj) Quit:$$$ISERR(tStatus) tStatus Kill tTaskDefObj Set tStatus = tTaskObj.%Save()
go to post Eduard Lebedyuk · Nov 23, 2019 I'm not really sure why do you want to have a cube with 0 facts? Can you elaborate why you need this? But yes, clearing the datasource and rebuilding would get you cube with 0 rows.