block
ifexist
An example of an ifexist transformation is:
ifexist("pdiff", update("pdiff", "$pdiff - $sys - $user"))
This transformation sets pdiff to the CPU time used by everything, except
the test, but does not fail if pdiff doesn't exist.
if
eval
noop
foreachcol
foreachrow
group
The group transformation starts by partitioning the current relation into a set of new relations, such that each unique value of key produces a new relation and all the elements in that relation have the same value of key.
For example, grouping rel9 on epoch creates rel10a, rel10b and rel10c.
The second argument to group is a transformation that is run on each of the new relations individually. A typical example of this transformation would be the aggregate transformation.
Assume we ran remove(thread)
on each relation, we would have three new relations. For example, Relation 7.8 would be come:
We could then use the following aggregate transformation:
aggregate({ "elapsed" = "$max", "cpu" = "$sum", "epoch" = "$mean", })
Note that because epoch is the key we grouped by we can use mean to get the single value of epoch.
Running this transformation on Relation 7.11 would yield rel11.
This transformation is repeated on Relation 7.9 and Relation 7.10, and finally the results are concatenated, yielding rel12:
Relation 7.13 is the final output of this example group command.