Different pipes. One standard.

Type to search this site.

Search runs in your browser against a static index built with this site (Pagefind). Nothing you type is sent to a server.

LoadExperimental

std:discard #

Sink: consumes and discards its input.

For example: end a branch whose output you do not need.

A pipe is a data processing step with declared inputs and outputs; standard pipes are built into the runner.

Ports #

std:discard takes in and produces no outputs.std:discardinrecords
std:discard takes in and produces no outputs.std:discardinrecords
Named ports from the latest published contract. Dashed lines are optional ports.

A sink: it has no outputs.

Ports of std:discard
PortDirectionKindRequiredDescription
ininputrecordsyes

Parameters #

This pipe has no parameters.

When to use it #

  • A pipe has a required output that this pipeline has no use for: consume it explicitly so that nothing is lost by accident.
  • Make the dead end visible as a node of its own in a pipeline diagram.

When to use something else

  • It is equivalent to marking that output with discard: true; use whichever reads more clearly.

A tested example #

Nothing here is invented: this is the test “consumes everything” from the pipe's own portable test file, which every conformant runner must pass.

Parameters

This test sets no parameters.

Input: in
1
{"a":2}
"three"
Expected output: —

Expected result: the run completes.

The same step as a node of a pipeline.yaml:

pipeline.yaml
nodes:
  discard:
    pipe: std:discard
    inputs:
      in: {from: inputs.in}

Notes from the manifest #

The pipe's manifest, OPENFLANGE.md, carries these notes.

Part of the OpenFlange standard library (std, version 0.1).

A sink that reads its input to the end and drops every item, like /dev/null. Items are not decoded. To drop a single required output of a node, the consumer-side control outputs: {<port>: {discard: true}} is simpler; std:discard is for an explicit sink node in the graph.

Reference #

Maturity
Experimental
Manifest version
0.1.0