Ensemble uses $$$GetLocalizedName macro to get localized settings names.

You can add caption directly:

set ^CacheMsg("EnsColumns","en-us","HelloWorld")="Hello World"

Where HelloWorld is a property name, value is a caption and en-us is a session language.

It should work like this:

ClassMethod Add()
{
    quit $$$Text("@HelloWorld@Hello World", "EnsColumns", "en-us")
}

but for me it doesn't set the global. Not sure why.

As other commenters have stated you can use Python Gateway to drive Python process, in that case check this article, the Data Transfer section specifically. Also join our MLToolkit@intersystems.com usergroup - it's focused on AI/ML scenarios.

I'm a user of Python Native API so I can give the following advice. There are two cases here:

  • You need to iterate the result set - in that case you may want to call %Next() and retrieve values as you go.
  • You just need a complete dataset for downstream processing (your case). In that case yes, serialization is required.  I see two ways to do that: JSON and CSV. If the size of the dataset is small you can use JSON, no problem, but (I haven't run any tests but fairly sure) CSV serialization can be faster and less CPU/Memory intensive.

The reason I say this is that the method has extra parameters that don't correspond to the SQL %Fimd.Highlight SQL function.  

What do you mean? Highlight method signature:

ClassMethod Highlight(pText As %String, pSearchString As %String, pSearchOption As %String = {$$$IFSEARCHNORMAL}, pTags As %String = {$$$IFDEFAULTHLTAGS}, pLimit As %Integer = 0, pLanguage As %String = "en", Output pSC As %Status) As %String [ SqlName = Highlight, SqlProc ]

Shows that it is available in SQL context (bolded). All classmethod arguments (except sc) can be passed from SQL.

Read method does read 32000 characters by default, you can specify an amount of characters up to $$$MaxStringLength (3 641 144 characters).

If you want to set property to a stream you can do it like this:

do objInArrMain.%Set("Content", fileStreamBase64, "stream")

I'm not sure when it became available, here's a simple check code:

set stream = ##class(%Stream.TmpCharacter).%New()
do stream.Write(123)
d obj.%Set("prop", stream, "stream")

It should output:  {"prop":"123"}

One other note: you're using file streams for temporary outputs (when building fileStreamBase64), replace file stream with temp stream for better performance.

Recommended approach - always use macros for al your GLVN needs (see: DeepSee, %Dictionary). This way reporting is easy - just open inc file and you're done.

%Compiler package contains Traveler/Visitor implementation for ObjectScript but it's not officially supported - use at your own risk.

Although the task is unfortunately unsolvable at compile-time due to the abundant meta programming, such as indirection and xecute.

In your proposed solution you can enable checkbox "Use Wildcards" in Find & Replace and search for * which is essentially everything.

Have you tried sending the message to several recipients directly? Not CC but TO:

do m.To.Insert("mail1@domain.com")
do m.To.Insert("mail2@domain.com")

Or you can send the same email object to several recipients one by one:

for to = "mail1@domain.com", "mail2@domain.com" {
    do m.To.Clear()
    do m.To.Insert(to)
    set status = ..Adapter.SendMail(m)
    do:$$$ISERR(status) $system.OBJ.DisplayError(status)
}