docs-v2/content/influxdb/v2.0/reference/flux/stdlib/built-in/outputs/yield.md

1.3 KiB
Raw Blame History

title description aliases menu weight related
yield() function The `yield()` function indicates the input tables received should be delivered as a result of the query.
/v2.0/reference/flux/functions/outputs/yield
/v2.0/reference/flux/functions/built-in/outputs/yield/
influxdb_2_0_ref
name parent
yield built-in-outputs
401
/{{< latest "influxdb" "v1" >}}/query_language/data_exploration/#the-basic-select-statement, InfluxQL  SELECT AS

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

yield(name: "custom-name")

{{% note %}} 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. {{% /note %}}

Parameters

name

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

Data type: String

Examples

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