columns() function
columns()
returns the column labels in each input table.
For each input table, columns
outputs a table with the same group key
columns and a new column containing the column labels in the input table.
Each row in an output table contains the group key value and the label of one
column of the input table.
Each output table has the same number of rows as the number of columns of the
input table.
Function type signature
(<-tables: stream[A], ?column: string) => stream[B] where A: Record, B: Record
Parameters
column
Name of the output column to store column labels in. Default is “_value”.
tables
Input data. Default is piped-forward data (<-
).
Examples
List all columns per input table
import "sampledata"
sampledata.string()
|> columns(column: "labels")
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Flux and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.