Inserting tuples with inject points

You can insert new tuples and punctuation into a port with an inject point.

An inject point is created for a specific operator port. The inject point has an associated tuple whose field values can be modified with the (u)pdate command. You then use the (c)ontinue command to inject the tuple into the associated port.

You can inject a tuple on a port without setting a (b)reakpoint on that port. In fact, an injection point does not stop the debugger (as a breakpoint does). One can stop the debugger in a different (or same) location than the injection point. The injection point reserves only a tuple to be injected. The (c)ontinue command injects the tuple in the stream. When the (c)ontinue command runs, the tuple is injected after the current tuple on that port.

A new inject point can be created with the inject point command:

i <operator-name> (i|o) (<port-index> | *)
For example:
(sdb) i CountOneLine o 0
    Set + 2 Injectpoint CountOneLine o 0
(sdb)
This command creates an inject point for the output port (o) identified with port index zero (0) for operator CountOneLine. The tuple for the new inject point contains default values for all fields. To change the values, use the (u)pdate command.
Next, several values in the tuple for the inject point are changed with the (u)pdate command. The first parameter is the probe point ID of the previously defined inject point. The second and third parameters are the field name and the new value for the field.
(sdb) u 2 lines lines, 3, int32
    wcs, {words=354467584,chars=0}, tuple<int32 words,int32 chars>
(sdb) u 2 wcs {words=34,chars=4}
    lines, 3, int32
    wcs, {words=34,chars=4}, tuple<int32 words,int32 chars>
(sdb)
Finally, the tuple for the inject point is injected into the port with the (c)ontinue command. The parameter to the (c)ontinue command is the probe point ID of the previously defined inject point.
(sdb) c 2
    Tuple injected
(sdb)