I would like to compute a single value in one phase of a graph and then use that value to perform a partition in another phase. While I can think of a couple ways to do this they all seem cumbersome. Here are the ways I can think of, let me know if there is a better way.
An environment variable/graph parameter would be ideal but I don’t think these can be set at runtime. Can getGraph().setGraphProperties(properties) be used after the graph has been initialized? Alternatively: Run two graphs, first one outputs prm file with variable defined, second graph uses that prm file. This creates two graphs to do one thing; yuck.
Write a transform that computes value on init and stuff it into a field in every record. A similar approach could be done with a join. Lots of data duplication; yuck.
Thanks.