I see you disliked my previous reply and retitled your article.
so again:

Could be, I misunderstand the purpose of the example.
Before LOAD DATA was available with IRIS this was the still valid approach

  • I opened my CSV in EXCEL
  • Connected by the EXCEL DSN over SQL Gateway using ODBC
  • and did the import.
  • %XML.Adaptor does the rest. If required at all.

And was done before my breakfast coffee became even lukewarm.
And not a single line of code was required!

Sorry, where is the advantage?

And personally, I prefer to work with well trained qualified engineers
instead of a guess & try a program somewhere whether for Py or COS or anything else.
 

if you take a look to method ##class(EnsLib.HL7.Segment).getAtFromArray(...)
you see that the segment data is assembled in row 1008 of the class by  Set data=data_value 
without checking the size.
So it is designed to fail with large documents as your Base64 encoded PDF (~+33% of original)
So just using a reference to an external stored file as you suggested should work. 

 

BTW datatype %VarString is just a shortcut of %String(MAXLEN="") and a sometimes appropriate SQLTYPE.
 

You are correct it is working inside docker in the container.
But I asked for the external real IP of my (Windows) Host.
I know that is wrong for my purpose,  as I sit just in front of it
and use it some 100 times daily. So I really know it.

It's an odd situation: IRIS -> Ubuntu in container -> Docker -> WSL -> Windows.
I didn't add NAT and Port mapping used by Windows.