Properties are recalculated so it's enough to execute this query once:

UPDATE <DOC TABLE CLASS> SET %Doc = NVL(%Doc||' ', %Doc)

I'm not sure how to trick SQL engine into updating the value without changing it completely but just NVL(%Doc, %Doc) does not work. Adding empty space after json does not affect it.

For DocDB indexed properties are defined as

Property firstName As %String [ SqlComputeCode = { set {*}=$$%EvaluatePathOne^%DocDB.Document({%Doc},"$.firstName")}, SqlComputed, SqlComputeOnChange = %Doc ];

So updating %Doc does the trick.

Also add:

WHERE <NEW PROPERTY> IS NULL

to recalculate only for documents where a property value is missing.

There are two options:

  1. Use SQL Gateway to create Linked Tabled from Oracle (if there are a lot of tables it might be better to create a linkage with a view). After that query Linked Table same as any normal InterSystems IRIS table using the code snippet above.
  2. Write a service with the EnsLib.SQL.InboundAdapter to query Oracle database. In that case you need to implement a CSV writer.