Metadata Import in CTL2
Since CloverDX 5.6, it is also possible to import
metadata from an external .fmt
file,
similarly to importing external .ctl
files.
Then you can use these metadata definitions in CTL when creating record structures.
This enables you to use metadata that are unavailable in the current graph.
Note that imported metadata can overlay metadata with the same name
that already exist in the current graph.
import metadata "<path>";
or
import metadata "<path>" <new name>;
The scope of these new metadata definitions is limited just to the current CTL script, so other components don’t see them.
Example 67.4. CTL Metadata Import
//#CTL2 import metadata "${META_DIR}/OrderItem.fmt"; // import OrderItem // import metadata from Person.fmt and rename it to "Customer" import metadata "${META_DIR}/Person.fmt" Customer; OrderItem item; item.productId = 12345; item.quantity = 5; Customer c; c.firstName = "John";