Back to Influxdb

debug.null() function

content/flux/v0/stdlib/internal/debug/null.md

latest1.5 KB
Original Source
<!------------------------------------------------------------------------------ IMPORTANT: This page was generated from comments in the Flux source code. Any edits made directly to this page will be overwritten the next time the documentation is generated. To make updates to this documentation, update the function comments above the function definition in the Flux source code: https://github.com/influxdata/flux/blob/master/stdlib/internal/debug/debug.flux#L86-L86 Contributing to Flux: https://github.com/influxdata/flux#contributing Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md ------------------------------------------------------------------------------->

debug.null() returns the null value with a given type.

Function type signature
js
(?type: string) => A where A: Basic

{{% caption %}} For more information, see Function type signatures. {{% /caption %}}

Parameters

type

Null type.

Supported types:

  • string
  • bytes
  • int
  • uint
  • float
  • bool
  • time
  • duration
  • regexp

Examples

Include null values in an ad hoc stream of tables

js
import "array"
import "internal/debug"

array.from(rows: [{a: 1, b: 2, c: 3}, {a: debug.null(type: "int"), b: 5, c: 6}])

{{< expand-wrapper >}} {{% expand "View example output" %}}

Output data

abc
123
56

{{% /expand %}} {{< /expand-wrapper >}}