diff --git a/content/v2.0/query-data/flux/scalar-values.md b/content/v2.0/query-data/flux/scalar-values.md index ff1458b2e..b2fbdd280 100644 --- a/content/v2.0/query-data/flux/scalar-values.md +++ b/content/v2.0/query-data/flux/scalar-values.md @@ -22,9 +22,9 @@ This lets you, for example, dynamically set variables using query results. **To extract scalar values from output:** -1. [Extract a table](#extract-a-table). -2. [Extract a column from the table](#extract-a-column-from-the-table) - _**or**_ [extract a row from the table](#extract-a-row-from-the-table). +1. [Extract a column from the input stream](#extract-a-column) + _**or**_ [extract a row from the input stream](#extract-a-row). +2. Use the returned array or object to reference scalar values. _The samples on this page use the [sample data provided below](#sample-data)._ @@ -38,61 +38,33 @@ _The samples on this page use the [sample data provided below](#sample-data)._ See [#15321](https://github.com/influxdata/influxdb/issues/15231). {{% /warn %}} -## Extract a table +## Table extraction Flux formats query results as a stream of tables. -To extract a scalar value from a stream of tables, you must first extract a single table. - -to extract a single table from the stream of tables. - -{{% note %}} -If query results include only one table, it is still formatted as a stream of tables. -You still must extract that table from the stream. -{{% /note %}} - -Use [`tableFind()`](/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/tablefind/) -to extract the **first** table whose [group key](/v2.0/reference/glossary/#group-key) -values match the `fn` [predicate function](/v2.0/reference/glossary/#predicate-expression). -The predicate function requires a `key` object, which represents the group key of -each table. - -```js -sampleData - |> tableFind(fn: (key) => - key._field == "temp" and - key.location == "sfo" - ) -``` - -The example above returns a single table: - -| _time | location | _field | _value | -|:----- |:--------:|:------:| ------:| -| 2019-11-01T12:00:00Z | sfo | temp | 65.1 | -| 2019-11-01T13:00:00Z | sfo | temp | 66.2 | -| 2019-11-01T14:00:00Z | sfo | temp | 66.3 | -| 2019-11-01T15:00:00Z | sfo | temp | 66.8 | +Both [`findColumn()`](/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findcolumn/) +and [`findRecord()`](/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findrecord/) +extract the first table in a stream of tables whose [group key](/v2.0/reference/glossary/#group-key) +values match the `fn` [predicate function](/v2.0/reference/glossary/#predicate-function). {{% note %}} #### Extract the correct table -Flux functions do not guarantee table order and `tableFind()` returns only the -**first** table that matches the `fn` predicate. -To extract the table that includes the data you actually want, be very specific in -your predicate function or filter and transform your data to minimize the number -of tables piped-forward into `tableFind()`. +Flux functions do not guarantee table order. +`findColumn()` and `findRecord` extract only the **first** table that matches the `fn` predicate. +To extract the correct table, be very specific in your predicate function or +filter and transform your data to minimize the number of tables piped-forward into the functions. {{% /note %}} -## Extract a column from the table -Use the [`getColumn()` function](/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getcolumn/) +## Extract a column +Use the [`findColumn()` function](/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findcolumn/) to output an array of values from a specific column in the extracted table. +_See [Sample data](#sample-data) below._ ```js sampleData - |> tableFind(fn: (key) => - key._field == "temp" and - key.location == "sfo" + |> findColumn( + fn: (key) => key._field == "temp" and key.location == "sfo", + column: "_value" ) - |> getColumn(column: "_value") // Returns [65.1, 66.2, 66.3, 66.8] ``` @@ -103,13 +75,14 @@ In the example below, `SFOTemps` represents the array of values. Reference a specific index (integer starting from `0`) in the array to return the value at that index. +_See [Sample data](#sample-data) below._ + ```js SFOTemps = sampleData - |> tableFind(fn: (key) => - key._field == "temp" and - key.location == "sfo" + |> findColumn( + fn: (key) => key._field == "temp" and key.location == "sfo", + column: "_value" ) - |> getColumn(column: "_value") SFOTemps // Returns [65.1, 66.2, 66.3, 66.8] @@ -121,19 +94,18 @@ SFOTemps[2] // Returns 66.3 ``` -## Extract a row from the table -Use the [`getRecord()` function](/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getrecord/) +## Extract a row +Use the [`findRecord()` function](/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findrecord/) to output data from a single row in the extracted table. Specify the index of the row to output using the `idx` parameter. The function outputs an object with key-value pairs for each column. ```js sampleData - |> tableFind(fn: (key) => - key._field == "temp" and - key.location == "sfo" + |> findRecord( + fn: (key) => key._field == "temp" and key.location == "sfo", + idx: 0 ) - |> getRecord(idx: 0) // Returns { // _time:2019-11-11T12:00:00Z, @@ -151,11 +123,10 @@ keys in the object. ```js tempInfo = sampleData - |> tableFind(fn: (key) => - key._field == "temp" and - key.location == "sfo" + |> findRecord( + fn: (key) => key._field == "temp" and key.location == "sfo", + idx: 0 ) - |> getRecord(idx: 0) tempInfo // Returns { @@ -180,8 +151,10 @@ Create custom helper functions to extract scalar values from query output. // Define a helper function to extract field values getFieldValue = (tables=<-, field) => { extract = tables - |> tableFind(fn: (key) => key._field == field) - |> getColumn(column: "_value") + |> findColumn( + fn: (key) => key._field == field, + column: "_value" + ) return extract[0] } @@ -200,8 +173,10 @@ lastJFKTemp // Define a helper function to extract a row as an object getRow = (tables=<-, field, idx=0) => { extract = tables - |> tableFind(fn: (key) => true) - |> getRecord(idx: idx) + |> findRecord( + fn: (key) => true, + idx: idx + ) return extract } diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/columns.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/columns.md index 2703ce387..f422cd379 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/columns.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/columns.md @@ -11,7 +11,7 @@ menu: v2_0_ref: name: columns parent: built-in-transformations -weight: 401 +weight: 402 --- The `columns()` function lists the column labels of input tables. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/cumulativesum.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/cumulativesum.md index 72d4087e6..d0d67d25d 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/cumulativesum.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/cumulativesum.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: cumulativeSum parent: built-in-transformations -weight: 401 +weight: 402 --- The `cumulativeSum()` function computes a running sum for non-null records in the table. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/drop.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/drop.md index 2c2f70133..dc78afa67 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/drop.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/drop.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: drop parent: built-in-transformations -weight: 401 +weight: 402 --- The `drop()` function removes specified columns from a table. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/duplicate.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/duplicate.md index cbc060dc0..db6a2ebc1 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/duplicate.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/duplicate.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: duplicate parent: built-in-transformations -weight: 401 +weight: 402 --- The `duplicate()` function duplicates a specified column in a table. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/elapsed.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/elapsed.md index b297476c2..e4adcbc2e 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/elapsed.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/elapsed.md @@ -7,7 +7,7 @@ menu: v2_0_ref: name: elapsed parent: built-in-transformations -weight: 401 +weight: 402 --- The `elapsed()` function returns the time between subsequent records. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/fill.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/fill.md index 9cd01d630..6995e5431 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/fill.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/fill.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: fill parent: built-in-transformations -weight: 401 +weight: 402 --- The `fill()` function replaces all null values in an input stream with a non-null value. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/filter.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/filter.md index 6f16a5c6e..b27ac3534 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/filter.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/filter.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: filter parent: built-in-transformations -weight: 401 +weight: 402 v2.0/tags: [exists] --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/group.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/group.md index f968ed990..b562ed502 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/group.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/group.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: group parent: built-in-transformations -weight: 401 +weight: 402 --- The `group()` function groups records based on their values for specific columns. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/histogram.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/histogram.md index a4e04bb96..b6008b9a8 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/histogram.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/histogram.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: histogram parent: built-in-transformations -weight: 401 +weight: 402 --- The `histogram()` function approximates the cumulative distribution of a dataset by counting data frequencies for a list of bins. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/hourselection.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/hourselection.md index b56ad99f5..ee53fa130 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/hourselection.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/hourselection.md @@ -10,7 +10,7 @@ menu: v2_0_ref: name: hourSelection parent: built-in-transformations -weight: 401 +weight: 402 --- The `hourSelection()` function retains all rows with time values in a specified hour range. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/join.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/join.md index b9ce02ff4..6bc214e5e 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/join.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/join.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: join parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/reference/flux/stdlib/built-in/transformations/union/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/keep.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/keep.md index 6c4f0dada..94c7e6d29 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/keep.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/keep.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: keep parent: built-in-transformations -weight: 401 +weight: 402 --- The `keep()` function returns a table containing only the specified columns, ignoring all others. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/keys.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/keys.md index 5f82e10b3..d7b7f3857 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/keys.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/keys.md @@ -11,7 +11,7 @@ menu: v2_0_ref: name: keys parent: built-in-transformations -weight: 401 +weight: 402 --- The `keys()` function outputs the group key of input tables. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/keyvalues.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/keyvalues.md index 3db7044bc..6a1a4ee11 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/keyvalues.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/keyvalues.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: keyValues parent: built-in-transformations -weight: 401 +weight: 402 --- The `keyValues()` function returns a table with the input table's group key plus two columns, diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/limit.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/limit.md index dd7915862..ec5131863 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/limit.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/limit.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: limit parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/reference/flux/stdlib/built-in/transformations/tail/ - https://docs.influxdata.com/influxdb/latest/query_language/data_exploration/#the-limit-and-slimit-clauses, InfluxQL LIMIT diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/map.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/map.md index b5327c361..102f49bb5 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/map.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/map.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: map parent: built-in-transformations -weight: 401 +weight: 402 v2.0/tags: [exists] --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/pivot.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/pivot.md index db5538ce3..9081d2d6b 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/pivot.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/pivot.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: pivot parent: built-in-transformations -weight: 401 +weight: 402 --- The `pivot()` function collects values stored vertically (column-wise) in a table diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/range.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/range.md index 56d467646..f78588d1b 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/range.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/range.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: range parent: built-in-transformations -weight: 401 +weight: 402 --- The `range()` function filters records based on time bounds. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/rename.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/rename.md index 57e3c504f..8f34a8f0c 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/rename.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/rename.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: rename parent: built-in-transformations -weight: 401 +weight: 402 --- The `rename()` function renames specified columns in a table. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/set.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/set.md index 812bc21b0..0354cbdf5 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/set.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/set.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: set parent: built-in-transformations -weight: 401 +weight: 402 --- The `set()` function assigns a static value to each record in the input table. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/sort.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/sort.md index a4a6f4e1d..9b583eb82 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/sort.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/sort.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: sort parent: built-in-transformations -weight: 401 +weight: 402 --- The `sort()` function orders the records within each table. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/statecount.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/statecount.md index 58966ae86..e38f233df 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/statecount.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/statecount.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: stateCount parent: built-in-transformations -weight: 401 +weight: 402 --- The `stateCount()` function computes the number of consecutive records in a given state. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stateduration.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stateduration.md index fb62eb1d8..30eebac87 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/stateduration.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stateduration.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: stateDuration parent: built-in-transformations -weight: 401 +weight: 402 --- The `stateDuration()` function computes the duration of a given state. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/_index.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/_index.md index c1c0f1382..f64bccad1 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/_index.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/_index.md @@ -13,16 +13,38 @@ menu: name: Stream & table parent: built-in-transformations v2.0/tags: [transformations, built-in, functions, stream, table] +related: + - /v2.0/query-data/flux/scalar-values/ --- Use stream and table functions to extract a table from a stream of tables and access its columns and records. -##### Example stream and table functions +{{< children type="functions" >}} + +### Example stream and table functions + +##### Recommended usage ```js data = from(bucket:"example-bucket") - |> range(start: -5m) - |> filter(fn:(r) => r._measurement == "cpu") + |> range(start: -5m) + |> filter(fn:(r) => r._measurement == "cpu") + +// Extract the "_value" column from the table +data + |> findColumn(fn: (key) => key._field == "usage_idle", column: "_value") + +// Extract the first record from the table +data + |> findRecord(fn: (key) => key._field == "usage_idle", idx: 0) + +``` + +##### Alternate usage +```js +data = from(bucket:"example-bucket") + |> range(start: -5m) + |> filter(fn:(r) => r._measurement == "cpu") // Extract the first available table for which "_field" is equal to "usage_idle" t = data |> tableFind(fn: (key) => key._field == "usage_idle") @@ -33,5 +55,3 @@ values = t |> getColumn(column: "_value") // Extract the first record from the table r0 = t |> getRecord(idx: 0) ``` - -{{< children type="functions" >}} diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findcolumn.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findcolumn.md new file mode 100644 index 000000000..53310e3b8 --- /dev/null +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findcolumn.md @@ -0,0 +1,54 @@ +--- +title: findColumn() function +description: > + The `findColumn()` function returns an array of values in a specified column from the + first table in a stream of tables where group key values match the specified predicate. +menu: + v2_0_ref: + name: findColumn + parent: Stream & table +weight: 501 +related: + - /v2.0/query-data/flux/scalar-values/ +--- + +The `findColumn()` function returns an array of values in a specified column from the +first table in a stream of tables where the group key values match the specified predicate. +The function returns an empty array if no table is found or if the column label +is not present in the set of columns. + +_**Function type:** Stream and table_ + +```js +findColumn( + fn: (key) => key._field == "fieldName") + column: "_value" +) +``` + +## Parameters + +### fn +A predicate function for matching keys in a table's group key. +Expects a `key` argument that represents a group key in the input stream. + +_**Data type:** Function_ + +### column +Name of the column to extract. + +_**Data type:** String_ + +## Example +```js +vs = from(bucket:"example-bucket") + |> range(start: -5m) + |> filter(fn:(r) => r._measurement == "cpu") + |> findColumn( + fn: (key) => key._field == "usage_idle", + column: "_value" + ) + +// Use column values +x = vs[0] + vs[1] +``` diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findrecord.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findrecord.md new file mode 100644 index 000000000..edf2f8a56 --- /dev/null +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findrecord.md @@ -0,0 +1,54 @@ +--- +title: findRecord() function +description: > + The `findRecord()` function returns a record at a specified index from the first + table in a stream of tables where the group key values match the specified predicate. +menu: + v2_0_ref: + name: findRecord + parent: Stream & table +weight: 501 +related: + - /v2.0/query-data/flux/scalar-values/ +--- + +The `findRecord()` function returns a record at a specified index from the first +table in a stream of tables where the group key values match the specified predicate. +The function returns an empty object if no table is found or if the index is out of bounds. + +_**Function type:** Stream and table_ + +```js +findRecord( + fn: (key) => key._field == "fieldName", + idx: 0 +) +``` + +## Parameters + +### fn +A predicate function for matching keys in a table's group key. +Expects a `key` argument that represents a group key in the input stream. + +_**Data type:** Function_ + +### idx +Index of the record to extract. + +_**Data type:** Integer_ + +## Example +```js +r0 = from(bucket:"example-bucket") + |> range(start: -5m) + |> filter(fn:(r) => r._measurement == "cpu") + |> tableFind() + |> findRecord( + fn: (key) => key._field == "usage_idle", + idx: 0 + ) + +// Use record values +x = r0._field + "--" + r0._measurement +``` diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getcolumn.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getcolumn.md index cbc976099..9057e2f8a 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getcolumn.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getcolumn.md @@ -31,7 +31,7 @@ to extract a single table from a stream of tables. ## Parameters ### column -The name of the column to extract. +Name of the column to extract. _**Data type:** String_ diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getrecord.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getrecord.md index f660be331..6823f4cfd 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getrecord.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getrecord.md @@ -31,7 +31,7 @@ to extract a single table from a stream of tables. ## Parameters ### idx -The index of the record to extract. +Index of the record to extract. _**Data type:** Integer_ diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/tablefind.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/tablefind.md index 409ea3dbc..526dfbd1d 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/tablefind.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/tablefind.md @@ -32,7 +32,7 @@ To learn why, see [Match parameter names](/v2.0/reference/flux/language/data-mod A predicate function for matching keys in a table's group key. `tableFind` returns the first table that resolves as `true`. -It expects a `key` argument which represents a group key in the input stream. +Expects a `key` argument that represents a group key in the input stream. _**Data type:** Function_ diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/tail.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/tail.md index b86287b1b..fe975298e 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/tail.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/tail.md @@ -7,7 +7,7 @@ menu: v2_0_ref: name: tail parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/reference/flux/functions/built-in/transformations/limit/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/timeshift.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/timeshift.md index be365a397..624fe3b8a 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/timeshift.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/timeshift.md @@ -9,7 +9,7 @@ menu: v2_0_ref: name: timeShift parent: built-in-transformations -weight: 401 +weight: 402 --- The `timeShift()` function adds a fixed duration to time columns. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/truncatetimecolumn.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/truncatetimecolumn.md index 6b0a0b053..63df2ba40 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/truncatetimecolumn.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/truncatetimecolumn.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: truncateTimeColumn parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/reference/flux/stdlib/date/truncate/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/union.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/union.md index f2ed1030a..529bc546e 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/union.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/union.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: union parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/reference/flux/stdlib/built-in/transformations/join/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/window.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/window.md index 6611b35a6..d1c611703 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/window.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/window.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: window parent: built-in-transformations -weight: 401 +weight: 402 --- The `window()` function groups records based on a time value.