From 1766d66be4bfe7e6e3f628bb4b19cf31e8bce9bc Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 21 Aug 2020 17:09:08 -0600 Subject: [PATCH] updated use of object to record, updated flux lang links --- .../v1.7/flux/get-started/query-influxdb.md | 10 +++++----- .../v1.7/flux/get-started/syntax-basics.md | 20 +++++++++---------- .../v1.7/flux/get-started/transform-data.md | 2 +- content/influxdb/v1.7/flux/guides/exists.md | 4 ++-- content/influxdb/v1.7/flux/guides/fill.md | 2 +- .../v1.7/flux/guides/manipulate-timestamps.md | 2 +- .../v1.7/flux/guides/mathematic-operations.md | 2 +- .../influxdb/v1.7/flux/guides/query-fields.md | 6 +++--- content/influxdb/v1.7/flux/guides/rate.md | 2 +- .../v1.7/flux/guides/scalar-values.md | 12 +++++------ .../v1.7/flux/guides/window-aggregate.md | 2 +- .../v1.8/flux/get-started/query-influxdb.md | 10 +++++----- .../v1.8/flux/get-started/syntax-basics.md | 8 ++++---- .../v1.8/flux/get-started/transform-data.md | 2 +- content/influxdb/v1.8/flux/guides/exists.md | 4 ++-- content/influxdb/v1.8/flux/guides/fill.md | 2 +- .../v1.8/flux/guides/geo/filter-by-region.md | 10 +++++----- .../v1.8/flux/guides/manipulate-timestamps.md | 2 +- .../v1.8/flux/guides/mathematic-operations.md | 2 +- .../influxdb/v1.8/flux/guides/query-fields.md | 6 +++--- content/influxdb/v1.8/flux/guides/rate.md | 4 ++-- .../v1.8/flux/guides/scalar-values.md | 14 ++++++------- .../v1.8/flux/guides/window-aggregate.md | 2 +- 23 files changed, 65 insertions(+), 65 deletions(-) diff --git a/content/influxdb/v1.7/flux/get-started/query-influxdb.md b/content/influxdb/v1.7/flux/get-started/query-influxdb.md index a295da2dd..3ebd5a1dd 100644 --- a/content/influxdb/v1.7/flux/get-started/query-influxdb.md +++ b/content/influxdb/v1.7/flux/get-started/query-influxdb.md @@ -36,8 +36,8 @@ Flux will not query the database without a specified range. Use the pipe-forward operator (`|>`) to pipe data from your data source into the [`range()`](/{{< latest "influxdb" "v2" >}}/reference/flux/stdlib/built-in/transformations/range) function, which specifies a time range for your query. It accepts two properties: `start` and `stop`. -Ranges can be **relative** using negative [durations](/flux/v0.65/language/lexical-elements#duration-literals) -or **absolute** using [timestamps](/flux/v0.65/language/lexical-elements#date-and-time-literals). +Ranges can be **relative** using negative [durations](/{{< latest "influxdb" "v2" >}}/reference/flux/language/lexical-elements#duration-literals) +or **absolute** using [timestamps](/{{< latest "influxdb" "v2" >}}/reference/flux/language/lexical-elements#date-and-time-literals). ###### Example relative time ranges ```js @@ -72,13 +72,13 @@ The `filter()` function has one parameter, `fn`, which expects an anonymous func with logic that filters data based on columns or attributes. Flux's anonymous function syntax is very similar to Javascript's. -Records or rows are passed into the `filter()` function as an object (`r`). -The anonymous function takes the object and evaluates it to see if it matches the defined filters. +Records or rows are passed into the `filter()` function as an record (`r`). +The anonymous function takes the record and evaluates it to see if it matches the defined filters. Use the `AND` relational operator to chain multiple filters. ```js // Pattern -(r) => (r.objectProperty comparisonOperator comparisonExpression) +(r) => (r.recordProperty comparisonOperator comparisonExpression) // Example with single filter (r) => (r._measurement == "cpu") diff --git a/content/influxdb/v1.7/flux/get-started/syntax-basics.md b/content/influxdb/v1.7/flux/get-started/syntax-basics.md index 752444b12..6b9497e1f 100644 --- a/content/influxdb/v1.7/flux/get-started/syntax-basics.md +++ b/content/influxdb/v1.7/flux/get-started/syntax-basics.md @@ -64,35 +64,35 @@ this is a string 2 ``` -### Objects -Flux also supports objects. Each value in an object can be a different data type. +### Records +Flux also supports records. Each value in an record can be a different data type. ```js -> o = {name:"Jim", age: 42, "favorite color": "red"} +> rec = {name:"Jim", age: 42, "favorite color": "red"} ``` -Use **dot notation** to access a properties of an object: +Use **dot notation** to access a properties of an record: ```js -> o.name +> rec.name Jim -> o.age +> rec.age 42 ``` Or **bracket notation**: ```js -> o["name"] +> rec["name"] Jim -> o["age"] +> rec["age"] 42 -> o["favorite color"] +> rec["favorite color"] red ``` {{% note %}} -Use bracket notation to reference object properties with special or +Use bracket notation to reference record properties with special or white space characters in the property key. {{% /note %}} diff --git a/content/influxdb/v1.7/flux/get-started/transform-data.md b/content/influxdb/v1.7/flux/get-started/transform-data.md index 4d5e79137..5dfcbc684 100644 --- a/content/influxdb/v1.7/flux/get-started/transform-data.md +++ b/content/influxdb/v1.7/flux/get-started/transform-data.md @@ -54,7 +54,7 @@ Use the `every` parameter to define a duration of time for each window. {{% note %}} #### Calendar months and years -`every` supports all [valid duration units](/flux/v0.65/language/types/#duration-types), +`every` supports all [valid duration units](/{{< latest "influxdb" "v2" >}}/reference/flux/language/types/#duration-types), including **calendar months (`1mo`)** and **years (`1y`)**. {{% /note %}} diff --git a/content/influxdb/v1.7/flux/guides/exists.md b/content/influxdb/v1.7/flux/guides/exists.md index 255f75370..7e297be0f 100644 --- a/content/influxdb/v1.7/flux/guides/exists.md +++ b/content/influxdb/v1.7/flux/guides/exists.md @@ -3,7 +3,7 @@ title: Check if a value exists seotitle: Use Flux to check if a value exists list_title: Exists description: > - Use the Flux `exists` operator to check if an object contains a key or if that + Use the Flux `exists` operator to check if a record contains a key or if that key's value is `null`. menu: influxdb_1_7: @@ -18,7 +18,7 @@ list_code_example: | ``` --- -Use the Flux `exists` operator to check if an object contains a key or if that +Use the Flux `exists` operator to check if a record contains a key or if that key's value is `null`. ```js diff --git a/content/influxdb/v1.7/flux/guides/fill.md b/content/influxdb/v1.7/flux/guides/fill.md index 4168bb47c..b39b32c64 100644 --- a/content/influxdb/v1.7/flux/guides/fill.md +++ b/content/influxdb/v1.7/flux/guides/fill.md @@ -76,7 +76,7 @@ data ## Fill with a specified value To fill _null_ values with a specified value, use the `value` parameter to specify the fill value. -_The fill value must match the [data type](/flux/v0.65/language/types/#basic-types) +_The fill value must match the [data type](/{{< latest "influxdb" "v2" >}}/reference/flux/language/types/#basic-types) of the [column](/{{< latest "influxdb" "v2" >}}/reference/flux/stdlib/built-in/transformations/fill/#column)._ ```js diff --git a/content/influxdb/v1.7/flux/guides/manipulate-timestamps.md b/content/influxdb/v1.7/flux/guides/manipulate-timestamps.md index df5ed7a2f..ffe71f39a 100644 --- a/content/influxdb/v1.7/flux/guides/manipulate-timestamps.md +++ b/content/influxdb/v1.7/flux/guides/manipulate-timestamps.md @@ -52,7 +52,7 @@ uint(v: 2019-09-18T12:00:00.000000000Z) ``` ## Calculate the duration between two timestamps -Flux doesn't support mathematical operations using [time type](/flux/v0.65/language/types/#time-types) values. +Flux doesn't support mathematical operations using [time type](/{{< latest "influxdb" "v2" >}}/reference/flux/language/types/#time-types) values. To calculate the duration between two timestamps: 1. Use the `uint()` function to convert each timestamp to a Unix nanosecond timestamp. diff --git a/content/influxdb/v1.7/flux/guides/mathematic-operations.md b/content/influxdb/v1.7/flux/guides/mathematic-operations.md index f9d3b34f4..4845bdfb5 100644 --- a/content/influxdb/v1.7/flux/guides/mathematic-operations.md +++ b/content/influxdb/v1.7/flux/guides/mathematic-operations.md @@ -13,7 +13,7 @@ list_query_example: map_math --- Flux supports mathematic expressions in data transformations. -This article describes how to use [Flux arithmetic operators](/flux/v0.65/language/operators/#arithmetic-operators) +This article describes how to use [Flux arithmetic operators](/{{< latest "influxdb" "v2" >}}/reference/flux/language/operators/#arithmetic-operators) to "map" over data and transform values using mathematic operations. If you're just getting started with Flux queries, check out the following: diff --git a/content/influxdb/v1.7/flux/guides/query-fields.md b/content/influxdb/v1.7/flux/guides/query-fields.md index 11a87a57b..a77403a1b 100644 --- a/content/influxdb/v1.7/flux/guides/query-fields.md +++ b/content/influxdb/v1.7/flux/guides/query-fields.md @@ -40,13 +40,13 @@ Rows that evaluate to `false` are **excluded** from the output data. The `fn` predicate function requires an `r` argument, which represents each row as `filter()` iterates over input data. -Key-value pairs in the row object represent columns and their values. +Key-value pairs in the row record represent columns and their values. Use **dot notation** or **bracket notation** to reference specific column values in the predicate function. -Use [logical operators](/flux/v0.65/language/operators/#logical-operators) +Use [logical operators](/{{< latest "influxdb" "v2" >}}/reference/flux/language/operators/#logical-operators) to chain multiple predicate expressions together. ```js -// Row object +// Row record r = {foo: "bar", baz: "quz"} // Example predicate function diff --git a/content/influxdb/v1.7/flux/guides/rate.md b/content/influxdb/v1.7/flux/guides/rate.md index 9cdff629e..27dabfe2e 100644 --- a/content/influxdb/v1.7/flux/guides/rate.md +++ b/content/influxdb/v1.7/flux/guides/rate.md @@ -33,7 +33,7 @@ data ``` By default, `derivative()` returns only positive derivative values and replaces negative values with _null_. -Cacluated values are returned as [floats](/flux/v0.65/language/types/#numeric-types). +Cacluated values are returned as [floats](/{{< latest "influxdb" "v2" >}}/reference/flux/language/types/#numeric-types). {{< flex >}} diff --git a/content/influxdb/v1.7/flux/guides/scalar-values.md b/content/influxdb/v1.7/flux/guides/scalar-values.md index 461190d08..010ce2f51 100644 --- a/content/influxdb/v1.7/flux/guides/scalar-values.md +++ b/content/influxdb/v1.7/flux/guides/scalar-values.md @@ -57,7 +57,7 @@ You still must extract that table from the stream. Use [`tableFind()`](/{{< latest "influxdb" "v2" >}}/reference/flux/stdlib/built-in/transformations/stream-table/tablefind/) to extract the **first** table whose [group key](/influxdb/v1.7/flux/get-started/#group-keys) values match the `fn` **predicate function**. -The predicate function requires a `key` object, which represents the group key of +The predicate function requires a `key` record, which represents the group key of each table. ```js @@ -130,7 +130,7 @@ SFOTemps[2] Use the [`getRecord()` function](/{{< latest "influxdb" "v2" >}}/reference/flux/stdlib/built-in/transformations/stream-table/getrecord/) 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. +The function outputs a record with key-value pairs for each column. ```js sampleData @@ -148,10 +148,10 @@ sampleData // } ``` -### Use an extracted row object -Use a variable to store the extracted row object. +### Use an extracted row record +Use a variable to store the extracted row record. In the example below, `tempInfo` represents the extracted row. -Use [dot notation](/influxdb/v1.7/flux/get-started/syntax-basics/#objects) to reference +Use [dot notation](/influxdb/v1.7/flux/get-started/syntax-basics/#records) to reference keys in the object. ```js @@ -202,7 +202,7 @@ lastJFKTemp ##### Extract scalar row data ```js -// Define a helper function to extract a row as an object +// Define a helper function to extract a row as a record getRow = (tables=<-, field, idx=0) => { extract = tables |> tableFind(fn: (key) => true) diff --git a/content/influxdb/v1.7/flux/guides/window-aggregate.md b/content/influxdb/v1.7/flux/guides/window-aggregate.md index 3f2ea373a..75f77d063 100644 --- a/content/influxdb/v1.7/flux/guides/window-aggregate.md +++ b/content/influxdb/v1.7/flux/guides/window-aggregate.md @@ -105,7 +105,7 @@ dataSet ``` {{% note %}} -The `every` parameter supports all [valid duration units](/flux/v0.65/language/types/#duration-types), +The `every` parameter supports all [valid duration units](/{{< latest "influxdb" "v2" >}}/reference/flux/language/types/#duration-types), including **calendar months (`1mo`)** and **years (`1y`)**. {{% /note %}} diff --git a/content/influxdb/v1.8/flux/get-started/query-influxdb.md b/content/influxdb/v1.8/flux/get-started/query-influxdb.md index 0215b7548..4fa251b16 100644 --- a/content/influxdb/v1.8/flux/get-started/query-influxdb.md +++ b/content/influxdb/v1.8/flux/get-started/query-influxdb.md @@ -36,8 +36,8 @@ Flux will not query the database without a specified range. Use the pipe-forward operator (`|>`) to pipe data from your data source into the [`range()`](/{{< latest "influxdb" "v2" >}}/reference/flux/stdlib/built-in/transformations/range) function, which specifies a time range for your query. It accepts two properties: `start` and `stop`. -Ranges can be **relative** using negative [durations](/flux/v0.65/language/lexical-elements#duration-literals) -or **absolute** using [timestamps](/flux/v0.65/language/lexical-elements#date-and-time-literals). +Ranges can be **relative** using negative [durations](/{{< latest "influxdb" "v2" >}}/reference/flux/language/lexical-elements#duration-literals) +or **absolute** using [timestamps](/{{< latest "influxdb" "v2" >}}/reference/flux/language/lexical-elements#date-and-time-literals). ###### Example relative time ranges ```js @@ -72,13 +72,13 @@ The `filter()` function has one parameter, `fn`, which expects an anonymous func with logic that filters data based on columns or attributes. Flux's anonymous function syntax is very similar to Javascript's. -Records or rows are passed into the `filter()` function as an object (`r`). -The anonymous function takes the object and evaluates it to see if it matches the defined filters. +Records or rows are passed into the `filter()` function as a record (`r`). +The anonymous function takes the record and evaluates it to see if it matches the defined filters. Use the `AND` relational operator to chain multiple filters. ```js // Pattern -(r) => (r.objectProperty comparisonOperator comparisonExpression) +(r) => (r.recordProperty comparisonOperator comparisonExpression) // Example with single filter (r) => (r._measurement == "cpu") diff --git a/content/influxdb/v1.8/flux/get-started/syntax-basics.md b/content/influxdb/v1.8/flux/get-started/syntax-basics.md index 3fc1b972e..becc203dd 100644 --- a/content/influxdb/v1.8/flux/get-started/syntax-basics.md +++ b/content/influxdb/v1.8/flux/get-started/syntax-basics.md @@ -64,14 +64,14 @@ this is a string 2 ``` -### Objects -Flux also supports objects. Each value in an object can be a different data type. +### Records +Flux also supports records. Each value in a record can be a different data type. ```js > o = {name:"Jim", age: 42, "favorite color": "red"} ``` -Use **dot notation** to access a properties of an object: +Use **dot notation** to access a properties of a record: ```js > o.name @@ -92,7 +92,7 @@ red ``` {{% note %}} -Use bracket notation to reference object properties with special or +Use bracket notation to reference record properties with special or white space characters in the property key. {{% /note %}} diff --git a/content/influxdb/v1.8/flux/get-started/transform-data.md b/content/influxdb/v1.8/flux/get-started/transform-data.md index 2d048b063..0248c8b0b 100644 --- a/content/influxdb/v1.8/flux/get-started/transform-data.md +++ b/content/influxdb/v1.8/flux/get-started/transform-data.md @@ -54,7 +54,7 @@ Use the `every` parameter to define a duration of time for each window. {{% note %}} #### Calendar months and years -`every` supports all [valid duration units](/flux/v0.65/language/types/#duration-types), +`every` supports all [valid duration units](/{{< latest "influxdb" "v2" >}}/reference/flux/language/types/#duration-types), including **calendar months (`1mo`)** and **years (`1y`)**. {{% /note %}} diff --git a/content/influxdb/v1.8/flux/guides/exists.md b/content/influxdb/v1.8/flux/guides/exists.md index ac455afdb..1e3f7b98c 100644 --- a/content/influxdb/v1.8/flux/guides/exists.md +++ b/content/influxdb/v1.8/flux/guides/exists.md @@ -3,7 +3,7 @@ title: Check if a value exists seotitle: Use Flux to check if a value exists list_title: Exists description: > - Use the Flux `exists` operator to check if an object contains a key or if that + Use the Flux `exists` operator to check if a record contains a key or if that key's value is `null`. menu: influxdb_1_8: @@ -18,7 +18,7 @@ list_code_example: | ``` --- -Use the Flux `exists` operator to check if an object contains a key or if that +Use the Flux `exists` operator to check if a record contains a key or if that key's value is `null`. ```js diff --git a/content/influxdb/v1.8/flux/guides/fill.md b/content/influxdb/v1.8/flux/guides/fill.md index 1c62c5704..761b73bb9 100644 --- a/content/influxdb/v1.8/flux/guides/fill.md +++ b/content/influxdb/v1.8/flux/guides/fill.md @@ -76,7 +76,7 @@ data ## Fill with a specified value To fill _null_ values with a specified value, use the `value` parameter to specify the fill value. -_The fill value must match the [data type](/flux/v0.65/language/types/#basic-types) +_The fill value must match the [data type](/{{< latest "influxdb" "v2" >}}/reference/flux/language/types/#basic-types) of the [column](/{{< latest "influxdb" "v2" >}}/reference/flux/stdlib/built-in/transformations/fill/#column)._ ```js diff --git a/content/influxdb/v1.8/flux/guides/geo/filter-by-region.md b/content/influxdb/v1.8/flux/guides/geo/filter-by-region.md index 690e84e3b..97371bbff 100644 --- a/content/influxdb/v1.8/flux/guides/geo/filter-by-region.md +++ b/content/influxdb/v1.8/flux/guides/geo/filter-by-region.md @@ -50,7 +50,7 @@ Define a geographic region using one of the the following shapes: - [polygon](#polygon) ### box -Define a box-shaped region by specifying an object containing the following properties: +Define a box-shaped region by specifying a record containing the following properties: - **minLat:** minimum latitude in decimal degrees (WGS 84) _(Float)_ - **maxLat:** maximum latitude in decimal degrees (WGS 84) _(Float)_ @@ -68,7 +68,7 @@ Define a box-shaped region by specifying an object containing the following prop ``` ### circle -Define a circular region by specifying an object containing the following properties: +Define a circular region by specifying a record containing the following properties: - **lat**: latitude of the circle center in decimal degrees (WGS 84) _(Float)_ - **lon**: longitude of the circle center in decimal degrees (WGS 84) _(Float)_ @@ -84,12 +84,12 @@ Define a circular region by specifying an object containing the following proper ``` ### polygon -Define a polygonal region with an object containing the latitude and longitude for +Define a polygonal region with a record containing the latitude and longitude for each point in the polygon: -- **points**: points that define the custom polygon _(Array of objects)_ +- **points**: points that define the custom polygon _(Array of records)_ - Define each point with an object containing the following properties: + Define each point with a record containing the following properties: - **lat**: latitude in decimal degrees (WGS 84) _(Float)_ - **lon**: longitude in decimal degrees (WGS 84) _(Float)_ diff --git a/content/influxdb/v1.8/flux/guides/manipulate-timestamps.md b/content/influxdb/v1.8/flux/guides/manipulate-timestamps.md index ece57b131..84486f326 100644 --- a/content/influxdb/v1.8/flux/guides/manipulate-timestamps.md +++ b/content/influxdb/v1.8/flux/guides/manipulate-timestamps.md @@ -52,7 +52,7 @@ uint(v: 2019-09-18T12:00:00.000000000Z) ``` ## Calculate the duration between two timestamps -Flux doesn't support mathematical operations using [time type](/flux/v0.65/language/types/#time-types) values. +Flux doesn't support mathematical operations using [time type](/{{< latest "influxdb" "v2" >}}/reference/flux/language/types/#time-types) values. To calculate the duration between two timestamps: 1. Use the `uint()` function to convert each timestamp to a Unix nanosecond timestamp. diff --git a/content/influxdb/v1.8/flux/guides/mathematic-operations.md b/content/influxdb/v1.8/flux/guides/mathematic-operations.md index 54622932b..80554d0cf 100644 --- a/content/influxdb/v1.8/flux/guides/mathematic-operations.md +++ b/content/influxdb/v1.8/flux/guides/mathematic-operations.md @@ -13,7 +13,7 @@ list_query_example: map_math --- Flux supports mathematic expressions in data transformations. -This article describes how to use [Flux arithmetic operators](/flux/v0.65/language/operators/#arithmetic-operators) +This article describes how to use [Flux arithmetic operators](/{{< latest "influxdb" "v2" >}}/reference/flux/language/operators/#arithmetic-operators) to "map" over data and transform values using mathematic operations. If you're just getting started with Flux queries, check out the following: diff --git a/content/influxdb/v1.8/flux/guides/query-fields.md b/content/influxdb/v1.8/flux/guides/query-fields.md index 62704ba11..573c97577 100644 --- a/content/influxdb/v1.8/flux/guides/query-fields.md +++ b/content/influxdb/v1.8/flux/guides/query-fields.md @@ -40,13 +40,13 @@ Rows that evaluate to `false` are **excluded** from the output data. The `fn` predicate function requires an `r` argument, which represents each row as `filter()` iterates over input data. -Key-value pairs in the row object represent columns and their values. +Key-value pairs in the row record represent columns and their values. Use **dot notation** or **bracket notation** to reference specific column values in the predicate function. -Use [logical operators](/flux/v0.65/language/operators/#logical-operators) +Use [logical operators](/{{< latest "influxdb" "v2" >}}/reference/flux/language/operators/#logical-operators) to chain multiple predicate expressions together. ```js -// Row object +// Row record r = {foo: "bar", baz: "quz"} // Example predicate function diff --git a/content/influxdb/v1.8/flux/guides/rate.md b/content/influxdb/v1.8/flux/guides/rate.md index 0e8a9200b..5a95f4050 100644 --- a/content/influxdb/v1.8/flux/guides/rate.md +++ b/content/influxdb/v1.8/flux/guides/rate.md @@ -36,7 +36,7 @@ data ``` By default, `derivative()` returns only positive derivative values and replaces negative values with _null_. -Cacluated values are returned as [floats](/flux/v0.65/language/types/#numeric-types). +Cacluated values are returned as [floats](/{{< latest "influxdb" "v2" >}}/reference/flux/language/types/#numeric-types). {{< flex >}} @@ -127,7 +127,7 @@ data ) ``` -`aggregate.rate()` returns the average rate of change (as a [float](/flux/v0.65/language/types/#numeric-types)) +`aggregate.rate()` returns the average rate of change (as a [float](/{{< latest "influxdb" "v2" >}}/reference/flux/language/types/#numeric-types)) per `unit` for time intervals defined by `every`. Negative values are replaced with _null_. diff --git a/content/influxdb/v1.8/flux/guides/scalar-values.md b/content/influxdb/v1.8/flux/guides/scalar-values.md index 84660342d..d0092c813 100644 --- a/content/influxdb/v1.8/flux/guides/scalar-values.md +++ b/content/influxdb/v1.8/flux/guides/scalar-values.md @@ -57,7 +57,7 @@ You still must extract that table from the stream. Use [`tableFind()`](/{{< latest "influxdb" "v2" >}}/reference/flux/stdlib/built-in/transformations/stream-table/tablefind/) to extract the **first** table whose [group key](/influxdb/v1.8/flux/get-started/#group-keys) values match the `fn` **predicate function**. -The predicate function requires a `key` object, which represents the group key of +The predicate function requires a `key` record, which represents the group key of each table. ```js @@ -130,7 +130,7 @@ SFOTemps[2] Use the [`getRecord()` function](/{{< latest "influxdb" "v2" >}}/reference/flux/stdlib/built-in/transformations/stream-table/getrecord/) 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. +The function outputs a record with key-value pairs for each column. ```js sampleData @@ -148,11 +148,11 @@ sampleData // } ``` -### Use an extracted row object -Use a variable to store the extracted row object. +### Use an extracted row record +Use a variable to store the extracted row record. In the example below, `tempInfo` represents the extracted row. -Use [dot notation](/influxdb/v1.8/flux/get-started/syntax-basics/#objects) to reference -keys in the object. +Use [dot notation](/influxdb/v1.8/flux/get-started/syntax-basics/#records) to reference +keys in the record. ```js tempInfo = sampleData @@ -202,7 +202,7 @@ lastJFKTemp ##### Extract scalar row data ```js -// Define a helper function to extract a row as an object +// Define a helper function to extract a row as a record getRow = (tables=<-, field, idx=0) => { extract = tables |> tableFind(fn: (key) => true) diff --git a/content/influxdb/v1.8/flux/guides/window-aggregate.md b/content/influxdb/v1.8/flux/guides/window-aggregate.md index ffaa5c412..40af0e5b5 100644 --- a/content/influxdb/v1.8/flux/guides/window-aggregate.md +++ b/content/influxdb/v1.8/flux/guides/window-aggregate.md @@ -105,7 +105,7 @@ dataSet ``` {{% note %}} -The `every` parameter supports all [valid duration units](/flux/v0.65/language/types/#duration-types), +The `every` parameter supports all [valid duration units](/{{< latest "influxdb" "v2" >}}/reference/flux/language/types/#duration-types), including **calendar months (`1mo`)** and **years (`1y`)**. {{% /note %}}