Great idea, Jeffrey!
- Log in to post comments
Great idea, Jeffrey!
I didn't know about this query. Awesome!
You're missing a JAR with net.sf.cglib.proxy.MethodInterceptor class.
if I type full command then it is working fine.
What full command?
I'm authorized in containers.intersystems.com in docker. Is that not enough? Interesting.
What happened to intersystems/arbiter? I can't find it in containers.intersystems.com registry:
>docker-ls.exe repositories --registry https://containers.intersystems.com
requesting list . done
repositories:
- intersystems/iris-community
- intersystems/iris-community-arm64
- intersystems/iris-ml-community
- intersystems/irishealth-aa-community
- intersystems/irishealth-community
- intersystems/irishealth-community-arm64
- intersystems/irishealth-ml-community
- intersystems/samHowever, a direct pull succeeds:
docker pull containers.intersystems.com/intersystems/arbiter:2021.1.0.215.0
2021.1.0.215.0: Pulling from intersystems/arbiter
f22ccc0b8772: Already exists
3cf8fb62ba5f: Already exists
e80c964ece6a: Already exists
cc40d98799c0: Pull complete
4179ff34652c: Pull complete
70ed38c703cc: Pull complete
ab1c2108b984: Pull complete
758289e88757: Pull complete
Digest: sha256:51c31749251bea1ab8019a669873fd33efa6020898dd4b1749a247c264448592
Status: Downloaded newer image for containers.intersystems.com/intersystems/arbiter:2021.1.0.215.0
containers.intersystems.com/intersystems/arbiter:2021.1.0.215.0
What's msg?
Does Archive folder exist?
Enable CORS in your REST API.
The value has reached 7gb and now it has become a problem.
So, how's the memory consumption now?
Is there a way to do the same but for the query text and documents, and not document and documents?
regarding your comment around moving JSON parsing to BS, is there a reason for doing so?
In general it might be preferable to move from less structured data (JSON) to more structured data (Objects) as fast and as early in your processing pipeline as possible.
The reasons for it are varied but include:
So in your case I would have structured it like this:
It's also advantageous to move all parsing logic is in one place (Business Service) as it minimizes the amount of code written and frees Business Processes from the more low-level technical tasks which usually obfuscate the more high-level intent of a Business Process.
First, transfer your schema via $SYSTEM.SQL.Schema.ExportDDL.
After that transfer data via CSV.
A sudden and short delivery date task has come into being
Don't they always.
Is mapi.exchange.msg.Communication persistent?
That said, I'd move JSON parsing to a BS, so mapi.exchange.msg.Communication becomes a request.
Here are some ideas for contestants:
This way then:
<call name='To application Rest' target='To application REST' async='0'>
<request type='EnsLib.REST.GenericMessage' >
<assign property="callrequest.Stream" value='##class(%Stream.GlobalCharacter).%New()'/>
<assign property="status" value='callrequest.Stream.CopyFrom(request.StreamFC)' action="set" />
<assign property="status" value='callrequest.HTTPHeaders.SetAt("application/xml", "Content-Type")' action="set" />
<assign property="status" value='callrequest.HTTPHeaders.SetAt(callrequest.Stream.Size, "Content-Length")' action="set" />
<assign property="status" value='callrequest.HTTPHeaders.SetAt("POST", "HttpRequest")' action="set" />
</request>
</call>Try to send it like this:
<call name='To application Rest' target='To application REST' async='0'>
<request type='EnsLib.REST.GenericMessage' >
<assign property="status" value='callrequest.Stream.CopyFrom(request.StreamFC)' action="set" />
<assign property="status" value='callrequest.HTTPHeaders.SetAt("application/xml", "Content-Type")' action="set" />
<assign property="status" value='callrequest.HTTPHeaders.SetAt(callrequest.Stream.Size, "Content-Length")' action="set" />
<assign property="status" value='callrequest.HTTPHeaders.SetAt("POST", "HttpRequest")' action="set" />
</request>
</call>Also I think you can skip Content-Length - it's appended to the request automatically.
Please post your <call> block which utilizes context.RESTMessage
I had a similar requirement (only for automatic docs generation).
As each BH setting is also a class property, you can query %Dictionary for them. And build your CSVs from these queries.
Queries
/// Settings common for all Interoperability BH
Query defaultSettings() As %Query
{
SELECT
prop.name "Setting",
TRIM('"' FROM MAX(prop.InitialExpression)) "Default value",
LIST(prop.parent) "Class",
MAX(prop.Description) "Description"
FROM "%Dictionary".PropertyDefinition prop
JOIN "%Dictionary".CompiledParameter par ON par.parent = prop.parent AND par.Name = 'SETTINGS'
JOIN "%Dictionary".CompiledClass cls ON prop.parent = cls.Name
WHERE (cls.Super LIKE '%Ens.Host%' OR cls.Name = 'Ens.Host' OR cls.Name = 'Ens.BusinessProcessBPL') AND
par."_Default" LIKE '%' || prop.Name || '%'
GROUP BY prop.Name
ORDER BY 1
}
/// User BH classes
Query productionClasses() As %Query
{
SELECT
Name "Class",
Description "Description"
FROM "%Dictionary".CompiledClass cls
WHERE Name LIKE '%'
AND Super In ('Ens.BusinessProcessBPL', 'Ens.BusinessService', 'Ens.BusinessOperation', 'Ens.BusinessProcess')
ORDER BY 1
}
/// Settings for User BH
Query productionClassesSettings() As %Query
{
SELECT
prop.parent "Class",
prop.name "Setting",
TRIM('"' FROM prop.InitialExpression) "Default value",
prop.Description "Description"
FROM "%Dictionary".PropertyDefinition prop
JOIN "%Dictionary".CompiledParameter par ON par.parent = prop.parent AND par.Name = 'SETTINGS'
JOIN "%Dictionary".CompiledClass cls ON prop.parent = cls.Name
WHERE cls.Name LIKE '%' AND par."_Default" LIKE '%' || prop.Name || '%'
ORDER BY 1,2
}
/// Production elements
Query productionItems(production) As %Query
{
SELECT
Name,
ClassName
/*,Comment*/
FROM Ens_Config.Item
WHERE Production = :production
}
/// Get settings of production item
Query productionItemsSettingsCall(production) As %Query
{
SELECT *
FROM User_util.productionItemsSettings(:production)
}
/// Custom query - get settings for production items
Query productionItemsSettings(production As %String) As %Query(CONTAINID = 0, ROWSPEC = "Element:%String,Setting:%String,Host:%String,Value:%String") [ SqlName = productionItemsSettings, SqlProc ]
{
}
ClassMethod productionItemsSettingsExecute(ByRef qHandle As %Binary, production As %String) As %Status
{
set obj = ##class(Ens.Config.Production).%OpenId(production,,.sc)
quit:$$$ISERR(sc) sc
do ..clearProductionItems(.obj)
set qHandle("production") = obj
set qHandle("item") = 1
set qHandle("itemCount") = qHandle("production").Items.Count()
set qHandle("setting") = 1
set qHandle("settingCount") = qHandle("production").Items.GetAt(qHandle("item")).Settings.Count()
quit sc
}
ClassMethod productionItemsSettingsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ PlaceAfter = productionItemsSettingsExecute ]
{
#dim sc As %Status = $$$OK
#dim item As Ens.Config.Item = qHandle("production").Items.GetAt(qHandle("item"))
#dim setting As Ens.Config.Setting = item.Settings.GetAt(qHandle("setting"))
set AtEnd = 0
set Row = $lb(item.Name, setting.Name, setting.Target, setting.Value)
if qHandle("setting")<qHandle("settingCount") {
set qHandle("setting") = qHandle("setting") + 1
} else {
if qHandle("item")<qHandle("itemCount") {
set qHandle("item") = qHandle("item") + 1
set qHandle("setting") = 1
set qHandle("settingCount") = qHandle("production").Items.GetAt(qHandle("item")).Settings.Count()
} else {
set AtEnd = 1
}
}
quit sc
}
/// Remove production items without settings.
ClassMethod clearProductionItems(ByRef production As Ens.Config.Production)
{
#dim item As Ens.Config.Item
for i = production.Items.Count():-1:1 {
set item = production.Items.GetAt(i)
do:item.Settings.Count()=0 production.Items.RemoveAt(i)
}
}It's %request.Content.
Thanks for noticing that, fixed!
Looks like I mixed %CSP.Request:Content with %Net.HttpResponse:Data.
In that case:
Insert Into TableX
values ('Name', 'Address', 'Phone')
UNION
Insert Into TableX
values ('Name2', 'Address2', 'Phone2')and so on.
How bulky are we talking about?
I'm running:
store/intersystems/iris-ml-community:2021.1.0.215.0And $zv is:
IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2021.1 (Build 215U) Wed Jun 9 2021 12:37:06 EDTAre $zv for ml and non ml builds the same? How can I distinguish if my app is running on ml or non ml build?
Feel free to create a draft here and send the link to @Evgeny Shvarov.
Thank you for the info Guillaume!
I would like to clarify that I'm not an author of Community R Gateway (although I do publish it).
Shiao-Bin Soong is the author of both Community R Gateway and R Gateway.