yield() function

The yield() function indicates the input tables received should be delivered as a result of the query. Yield outputs the input stream unmodified. A query may have multiple results, each identified by the name provided to the yield() function.

*Function type: Output
**
Output data type:* Record

  1. yield(name: "custom-name")

yield() is implicit for queries that do only one thing and are only needed when using multiple sources in a query. With multiple sources, yield() is required to specify what is returned, and what name to give it.

Parameters

name

A unique name for the yielded results. Defaults to "_results".

*Data type: String*

Examples

  1. from(bucket: "example-bucket")
  2. |> range(start: -5m)
  3. |> yield(name: "1")

Related articles