Step: Set Global Graph

Use this step before a Split Package step to avoid duplicating one or more package graphs across each of the splits. All references to the chosen graph(s) by steps that follow this one will read and write to the same graph.


Allows Freemarker templates to select values

Enter the name of the graph or graphs you want to become a global graph. NOTE Be careful specifying the _default_ graph here if you intend to use the Reify JSON step after a split. The reify step writes to that graph by default and it is the one that is published to memory by the Publish step. If multiple steps all try to reify to the same global graph, the publish will fail because you will have more than one publish object (primary individual) in the graph.

The most common use case for this step is when you split the package, either by using the Split Step, or by having more than one output leave the same side of a step (e.g. three steps attached to one step's output creates three copies of the current package). When a playbook splits, it makes a copy of the package (all of the graphs and variables) for each split. If you have a large graph in the package, DarkLight will have to hold multiple copies of that graph in memory as each step following the split operates (until a Combine Packages step or the playbook ends). By setting the large graph(s) as Global Graphs in this step, each of the packages will refer back to one unique graph instead of a copy.

  • step/set-global-graph
  • Last modified: 2019/02/13 23:17