-
Go to Index > Consolidation
-
Add a new transformation processor:
- Select Groovy as format
- For Name, enter
Trades
- Click Accept
-
For Source connector, select
trades
-
Replace the default code by the following one:
// Process all nodes
process("") {
// Link trade records to nodes having the “country” type with a link based on the trade type
// (i.e.; Import / Export / reExport) as arc label
it.addArcFrom(it.metas.getValue("type"), "country_id=" + it.metas.getValue("country_id") + "&");
}
With this processor, we have achieved to link trades to their related countries.