Flux 0.192 (#4695)

* flux 0.192.0 release notes

* flux 0.192.0 stdlib updates
pull/4663/head^2
Scott Anderson 2023-01-09 16:15:08 -07:00 committed by GitHub
parent dcf1a14083
commit f311c76a84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 1064 additions and 177 deletions

View File

@ -10,6 +10,27 @@ aliases:
- /influxdb/cloud/reference/release-notes/flux/
---
## v0.192.0 [2023-01-09]
### Breaking changes
- Update iox.sql to detect midstream errors.
### Features
- Add [`geo.totalDistance()`](/flux/v0.x/stdlib/experimental/geo/totaldistance/)
to aggregate total distance of consecutive points.
- Add [`iox.sqlInterval()`](/flux/v0.x/stdlib/experimental/iox/sqlinterval/) to
convert Flux durations to SQL interval strings.
- Add the [`contrib/qxip/hash`](/flux/v0.x/stdlib/contrib/qxip/hash/) package
which includes hashing functions.
- Add the [`contrib/qxip/logql`](/flux/v0.x/stdlib/contrib/qxip/logql/) package
which provides functions for working with
[Grafana Loki](https://grafana.com/oss/loki/) and [LogQL](https://grafana.com/docs/loki/latest/logql/).
- Add [`contrib/qxip/clickhouse`](/flux/v0.x/stdlib/contrib/qxip/clickhouse/)
package which provides functions for querying data from
[Clickhouse](https://clickhouse.com/).
---
## v0.191.0 [2022-11-14]
### Features

View File

@ -0,0 +1,36 @@
---
title: qxip package
description: >
The `qxip` package contains packages and functions contributed by [@qxip](https://github.com/qxip).
menu:
flux_0_x_ref:
name: qxip
parent: contrib
identifier: contrib/qxip
weight: 21
---
<!------------------------------------------------------------------------------
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 comments above the package
declaration in the Flux source code:
https://github.com/influxdata/flux/blob/master/stdlib/contrib/qxip/qxip.flux
Contributing to Flux: https://github.com/influxdata/flux#contributing
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
------------------------------------------------------------------------------->
The `qxip` package contains packages and functions contributed by [@qxip](https://github.com/qxip).
## Packages
{{< children show="sections" >}}

View File

@ -0,0 +1,56 @@
---
title: clickhouse package
description: >
The `clickhouse` package provides functions to query [ClickHouse](https://clickhouse.com/) using the ClickHouse HTTP API.
menu:
flux_0_x_ref:
name: clickhouse
parent: contrib/qxip
identifier: contrib/qxip/clickhouse
weight: 31
cascade:
introduced: 0.192.0
---
<!------------------------------------------------------------------------------
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 comments above the package
declaration in the Flux source code:
https://github.com/influxdata/flux/blob/master/stdlib/contrib/qxip/clickhouse/clickhouse.flux
Contributing to Flux: https://github.com/influxdata/flux#contributing
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
------------------------------------------------------------------------------->
The `clickhouse` package provides functions to query [ClickHouse](https://clickhouse.com/) using the ClickHouse HTTP API.
Import the `contrib/qxip/clickhouse` package:
```js
import "contrib/qxip/clickhouse"
```
## Options
```js
option clickhouse.defaultURL = "http://127.0.0.1:8123"
```
### defaultURL
`defaultURL` is the default ClickHouse HTTP API URL.
## Functions
{{< children type="functions" show="pages" >}}

View File

@ -0,0 +1,100 @@
---
title: clickhouse.query() function
description: >
`clickhouse.query()` queries data from ClickHouse using specified parameters.
menu:
flux_0_x_ref:
name: clickhouse.query
parent: contrib/qxip/clickhouse
identifier: contrib/qxip/clickhouse/query
weight: 301
flux/v0.x/tags: [inputs]
---
<!------------------------------------------------------------------------------
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/contrib/qxip/clickhouse/clickhouse.flux#L42-L66
Contributing to Flux: https://github.com/influxdata/flux#contributing
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
------------------------------------------------------------------------------->
`clickhouse.query()` queries data from ClickHouse using specified parameters.
##### Function type signature
```js
(
query: string,
?cors: string,
?format: string,
?limit: A,
?max_bytes: B,
?url: string,
) => stream[C] where A: Stringable, B: Stringable, C: Record
```
{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}}
## Parameters
### url
ClickHouse HTTP API URL. Default is `http://127.0.0.1:8123`.
### query
({{< req >}})
ClickHouse query to execute.
### limit
Query rows limit. Defaults is `100`.
### cors
Request remote CORS headers. Defaults is `1`.
### max_bytes
Query bytes limit. Default is `10000000`.
### format
Query format. Default is `CSVWithNames`.
_For information about available formats, see [ClickHouse formats](https://clickhouse.com/docs/en/interfaces/formats/)._
## Examples
### Query ClickHouse
```js
import "contrib/qxip/clickhouse"
option clickhouse.defaultURL = "https://play@play.clickhouse.com"
clickhouse.query(query: "SELECT version()")
```

View File

@ -0,0 +1,44 @@
---
title: hash package
description: >
The `hash` package provides functions that convert string values to hashes.
menu:
flux_0_x_ref:
name: hash
parent: contrib/qxip
identifier: contrib/qxip/hash
weight: 31
cascade:
introduced: 0.192.0
---
<!------------------------------------------------------------------------------
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 comments above the package
declaration in the Flux source code:
https://github.com/influxdata/flux/blob/master/stdlib/contrib/qxip/hash/hash.flux
Contributing to Flux: https://github.com/influxdata/flux#contributing
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
------------------------------------------------------------------------------->
The `hash` package provides functions that convert string values to hashes.
Import the `contrib/qxip/hash` package:
```js
import "contrib/qxip/hash"
```
## Functions
{{< children type="functions" show="pages" >}}

View File

@ -0,0 +1,62 @@
---
title: hash.cityhash64() function
description: >
`hash.cityhash64()` converts a string value to a 64-bit hexadecimal hash using the CityHash64 algorithm.
menu:
flux_0_x_ref:
name: hash.cityhash64
parent: contrib/qxip/hash
identifier: contrib/qxip/hash/cityhash64
weight: 301
---
<!------------------------------------------------------------------------------
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/contrib/qxip/hash/hash.flux#L68-L68
Contributing to Flux: https://github.com/influxdata/flux#contributing
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
------------------------------------------------------------------------------->
`hash.cityhash64()` converts a string value to a 64-bit hexadecimal hash using the CityHash64 algorithm.
##### Function type signature
```js
(v: A) => string
```
{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}}
## Parameters
### v
({{< req >}})
String to hash.
## Examples
### Convert a string to a 64-bit hash using CityHash64
```js
import "contrib/qxip/hash"
hash.cityhash64(v: "Hello, world!")// Returns 2359500134450972198
```

View File

@ -0,0 +1,64 @@
---
title: hash.sha256() function
description: >
`hash.sha256()` converts a string value to a hexadecimal hash using the SHA 256 hash algorithm.
menu:
flux_0_x_ref:
name: hash.sha256
parent: contrib/qxip/hash
identifier: contrib/qxip/hash/sha256
weight: 301
---
<!------------------------------------------------------------------------------
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/contrib/qxip/hash/hash.flux#L28-L28
Contributing to Flux: https://github.com/influxdata/flux#contributing
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
------------------------------------------------------------------------------->
`hash.sha256()` converts a string value to a hexadecimal hash using the SHA 256 hash algorithm.
##### Function type signature
```js
(v: A) => string
```
{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}}
## Parameters
### v
({{< req >}})
String to hash.
## Examples
### Convert a string to a SHA 256 hash
```js
import "contrib/qxip/hash"
hash.sha256(
v: "Hello, world!",
)// Returns 315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3
```

View File

@ -0,0 +1,62 @@
---
title: hash.xxhash64() function
description: >
`hash.xxhash64()` converts a string value to a 64-bit hexadecimal hash using the xxHash algorithm.
menu:
flux_0_x_ref:
name: hash.xxhash64
parent: contrib/qxip/hash
identifier: contrib/qxip/hash/xxhash64
weight: 301
---
<!------------------------------------------------------------------------------
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/contrib/qxip/hash/hash.flux#L48-L48
Contributing to Flux: https://github.com/influxdata/flux#contributing
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
------------------------------------------------------------------------------->
`hash.xxhash64()` converts a string value to a 64-bit hexadecimal hash using the xxHash algorithm.
##### Function type signature
```js
(v: A) => string
```
{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}}
## Parameters
### v
({{< req >}})
String to hash.
## Examples
### Convert a string to 64-bit hash using xxHash
```js
import "contrib/qxip/hash"
hash.xxhash64(v: "Hello, world!")// Returns 17691043854468224118
```

View File

@ -0,0 +1,64 @@
---
title: logql package
description: >
The `logql` package provides functions for using [LogQL](https://grafana.com/docs/loki/latest/logql/) to query a [Loki](https://grafana.com/oss/loki/) data source.
menu:
flux_0_x_ref:
name: logql
parent: contrib/qxip
identifier: contrib/qxip/logql
weight: 31
cascade:
introduced: 0.192.0
---
<!------------------------------------------------------------------------------
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 comments above the package
declaration in the Flux source code:
https://github.com/influxdata/flux/blob/master/stdlib/contrib/qxip/logql/logql.flux
Contributing to Flux: https://github.com/influxdata/flux#contributing
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
------------------------------------------------------------------------------->
The `logql` package provides functions for using [LogQL](https://grafana.com/docs/loki/latest/logql/) to query a [Loki](https://grafana.com/oss/loki/) data source.
Import the `contrib/qxip/logql` package:
```js
import "contrib/qxip/logql"
```
The primary function in this package is `logql.query_range()`
## Options
```js
option logql.defaultAPI = "/loki/api/v1/query_range"
option logql.defaultURL = "http://127.0.0.1:3100"
```
### defaultAPI
`defaultAPI` is the default LogQL Query Range API Path.
### defaultURL
`defaultURL` is the default LogQL HTTP API URL.
## Functions
{{< children type="functions" show="pages" >}}

View File

@ -0,0 +1,122 @@
---
title: logql.query_range() function
description: >
`logql.query_range()` queries data from a specified LogQL query within given time bounds,
filters data by query, timerange, and optional limit expressions.
All values are returned as string values (using `raw` mode in `csv.from`)
menu:
flux_0_x_ref:
name: logql.query_range
parent: contrib/qxip/logql
identifier: contrib/qxip/logql/query_range
weight: 301
flux/v0.x/tags: [inputs]
---
<!------------------------------------------------------------------------------
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/contrib/qxip/logql/logql.flux#L66-L96
Contributing to Flux: https://github.com/influxdata/flux#contributing
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
------------------------------------------------------------------------------->
`logql.query_range()` queries data from a specified LogQL query within given time bounds,
filters data by query, timerange, and optional limit expressions.
All values are returned as string values (using `raw` mode in `csv.from`)
##### Function type signature
```js
(
query: string,
?end: A,
?limit: B,
?orgid: string,
?path: string,
?start: C,
?step: D,
?url: string,
) => stream[E] where A: Timeable, B: Stringable, C: Timeable, D: Stringable, E: Record
```
{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}}
## Parameters
### url
LogQL/qryn URL and port. Default is `http://qryn:3100`.
### path
LogQL query_range API path.
### limit
Query limit. Default is 100.
### query
({{< req >}})
LogQL query to execute.
### start
Earliest time to include in results. Default is `-1h`.
Results include points that match the specified start time.
Use a relative duration or absolute time.
For example, `-1h` or `2022-01-01T22:00:00.801064Z`.
### end
Latest time to include in results. Default is `now()`.
Results exclude points that match the specified stop time.
Use a relative duration or absolute time.
For example, `-1h` or `2022-01-01T22:00:00.801064Z`.
### step
Query resolution step width in seconds. Default is 10.
Only applies to query types which produce a matrix response.
### orgid
Optional Loki organization ID for partitioning. Default is `""`.
## Examples
### Query specific fields in a measurement from LogQL/qryn
```js
import "contrib/qxip/logql"
option logql.defaultURL = "http://qryn:3100"
logql.query_range(query: "{job=\"dummy-server\"}", start: -1h, end: now(), limit: 100)
```

View File

@ -0,0 +1,154 @@
---
title: geo.totalDistance() function
description: >
`geo.totalDistance()` calculates the total distance covered by subsequent points
in each input table.
menu:
flux_0_x_ref:
name: geo.totalDistance
parent: experimental/geo
identifier: experimental/geo/totalDistance
weight: 201
flux/v0.x/tags: [transformations, geotemporal, aggregates]
introduced: 0.192.0
---
<!------------------------------------------------------------------------------
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/experimental/geo/geo.flux#L1081-L1106
Contributing to Flux: https://github.com/influxdata/flux#contributing
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
------------------------------------------------------------------------------->
`geo.totalDistance()` calculates the total distance covered by subsequent points
in each input table.
Each row must contain `lat` (latitude) and `lon` (longitude) columns that
represent the geographic coordinates of the point.
Row sort order determines the order in which distance between points is calculated.
Use the `geo.units` option to specify the unit of distance to return (default is km).
##### Function type signature
```js
(<-tables: stream[{B with lon: float, lat: float}], ?outputColumn: A) => stream[C] where C: Record
```
{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}}
## Parameters
### outputColumn
Total distance output column. Default is `_value`.
### tables
Input data. Default is piped-forward data (`<-`).
## Examples
- [Return the total distance travelled per input table](#return-the-total-distance-travelled-per-input-table)
- [Return the total distance travelled in miles](#return-the-total-distance-travelled-in-miles)
### Return the total distance travelled per input table
```js
import "experimental/geo"
data
|> geo.totalDistance()
```
{{< expand-wrapper >}}
{{% expand "View example input and output" %}}
#### Input data
| *id | _time | lat | lon |
| ---- | -------------------- | ---- | ---- |
| ABC1 | 2022-01-01T00:00:00Z | 85.1 | 42.2 |
| ABC1 | 2022-01-01T01:00:00Z | 71.3 | 50.8 |
| ABC1 | 2022-01-01T02:00:00Z | 63.1 | 62.3 |
| ABC1 | 2022-01-01T03:00:00Z | 50.6 | 74.9 |
| *id | _time | lat | lon |
| ---- | -------------------- | ----- | ----- |
| DEF2 | 2022-01-01T00:00:00Z | -10.8 | -12.2 |
| DEF2 | 2022-01-01T01:00:00Z | -16.3 | -0.8 |
| DEF2 | 2022-01-01T02:00:00Z | -23.2 | 12.3 |
| DEF2 | 2022-01-01T03:00:00Z | -30.4 | 24.9 |
#### Output data
| *id | _value |
| ---- | ----------------- |
| ABC1 | 4157.144498077607 |
| *id | _value |
| ---- | ----------------- |
| DEF2 | 4428.129653320098 |
{{% /expand %}}
{{< /expand-wrapper >}}
### Return the total distance travelled in miles
```js
import "experimental/geo"
option geo.units = {distance: "mile"}
data
|> geo.totalDistance()
```
{{< expand-wrapper >}}
{{% expand "View example input and output" %}}
#### Input data
| *id | _time | lat | lon |
| ---- | -------------------- | ---- | ---- |
| ABC1 | 2022-01-01T00:00:00Z | 85.1 | 42.2 |
| ABC1 | 2022-01-01T01:00:00Z | 71.3 | 50.8 |
| ABC1 | 2022-01-01T02:00:00Z | 63.1 | 62.3 |
| ABC1 | 2022-01-01T03:00:00Z | 50.6 | 74.9 |
| *id | _time | lat | lon |
| ---- | -------------------- | ----- | ----- |
| DEF2 | 2022-01-01T00:00:00Z | -10.8 | -12.2 |
| DEF2 | 2022-01-01T01:00:00Z | -16.3 | -0.8 |
| DEF2 | 2022-01-01T02:00:00Z | -23.2 | 12.3 |
| DEF2 | 2022-01-01T03:00:00Z | -30.4 | 24.9 |
#### Output data
| *id | _value |
| ---- | ----------------- |
| ABC1 | 2583.129833073356 |
| *id | _value |
| ---- | ------------------ |
| DEF2 | 2751.5122020650015 |
{{% /expand %}}
{{< /expand-wrapper >}}

View File

@ -133,7 +133,7 @@ array.from(rows: [{name: data.name, age: data.age}])
| name | age |
| --------- | ---- |
| nathaniel | 60 |
| nathaniel | 61 |
{{% /expand %}}
{{< /expand-wrapper >}}

View File

@ -80,7 +80,7 @@ requests.peek(response: requests.get(url: "https://api.agify.io", params: ["name
| body | duration | headers | statusCode |
| ----------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- |
| {"age":48,"count":25082,"name":"natalie"} | 100000000 | [
| {"age":49,"count":25082,"name":"natalie"} | 100000000 | [
Access-Control-Allow-Credentials: true,
Access-Control-Allow-Origin: *,
Access-Control-Expose-Headers: x-rate-limit-limit,x-rate-limit-remaining,x-rate-limit-reset,
@ -88,12 +88,12 @@ requests.peek(response: requests.get(url: "https://api.agify.io", params: ["name
Connection: keep-alive,
Content-Length: 41,
Content-Type: application/json; charset=utf-8,
Date: Mon, 14 Nov 2022 23:13:24 GMT,
Date: Mon, 09 Jan 2023 22:05:46 GMT,
Server: nginx/1.16.1,
X-Rate-Limit-Limit: 1000,
X-Rate-Limit-Remaining: 998,
X-Rate-Limit-Reset: 2796,
X-Request-Id: FyeWcih8QXW2sw8chtFh
X-Rate-Limit-Reset: 6854,
X-Request-Id: FzjDQTpxXJI494wvXynS
] | 200 |
{{% /expand %}}

View File

@ -20,7 +20,7 @@ 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/experimental/iox/iox.flux#L20-L20
https://github.com/influxdata/flux/blob/master/stdlib/experimental/iox/iox.flux#L34-L34
Contributing to Flux: https://github.com/influxdata/flux#contributing
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
@ -55,3 +55,17 @@ Measurement to read data from.
## Examples
### Use Flux to query data from IOx
```js
import "experimental/iox"
iox.from(bucket: "example-bucket", measurement: "example-measurement")
|> range(start: -1d)
|> filter(fn: (r) => r._field == "example-field")
```

View File

@ -21,7 +21,7 @@ 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/experimental/iox/iox.flux#L33-L33
https://github.com/influxdata/flux/blob/master/stdlib/experimental/iox/iox.flux#L56-L56
Contributing to Flux: https://github.com/influxdata/flux#contributing
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
@ -50,7 +50,19 @@ IOx bucket to read data from.
### query
({{< req >}})
Query to execute.
SQL query to execute.
## Examples
### Use SQL to query data from IOx
```js
import "experimental/iox"
iox.sql(bucket: "example-bucket", query: "SELECT * FROM measurement")
```

View File

@ -0,0 +1,93 @@
---
title: iox.sqlInterval() function
description: >
`iox.sqlInterval()` converts a duration value to a SQL interval string.
menu:
flux_0_x_ref:
name: iox.sqlInterval
parent: experimental/iox
identifier: experimental/iox/sqlInterval
weight: 201
flux/v0.x/tags: [sql, type-conversions]
introduced: 0.192.0
---
<!------------------------------------------------------------------------------
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/experimental/iox/iox.flux#L100-L117
Contributing to Flux: https://github.com/influxdata/flux#contributing
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
------------------------------------------------------------------------------->
`iox.sqlInterval()` converts a duration value to a SQL interval string.
SQL interval strings support down to millisecond precision.
Any microsecond or nanosecond duration units are dropped from the duration value.
If the duration only consists of microseconds or nanosecond units,
`iox.sqlInterval()` returns `1 millisecond`.
Duration values must be positive to work as a SQL interval string.
##### Function type signature
```js
(d: A) => string
```
{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}}
## Parameters
### d
({{< req >}})
Duration value to convert to SQL interval string.
## Examples
- [Convert a duration to a SQL interval](#convert-a-duration-to-a-sql-interval)
- [Use a Flux duration to define a SQL interval](#use-a-flux-duration-to-define-a-sql-interval)
### Convert a duration to a SQL interval
```js
import "experimental/iox"
iox.sqlInterval(
d: 1y2mo3w4d5h6m7s8ms,
)// Returns 1 years 2 months 3 weeks 4 days 5 hours 6 minutes 7 seconds 8 milliseconds
```
### Use a Flux duration to define a SQL interval
```js
import "experimental/iox"
windowInterval = 1d12h
sqlQuery = "
SELECT
DATE_BIN(INTERVAL '${iox.sqlInterval(d: windowInterval)}', time, TIMESTAMP '2023-01-01T00:00:00Z')
COUNT(field1)
FROM
measurement
GROUP BY
time
"
iox.sql(bucket: "example-bucket", query: sqlQuery)
```

View File

@ -196,10 +196,10 @@ array.from(
#### Output data
| id | color | pendingDuration |
| -------- | ------ | ---------------- |
| 15612462 | red | 3 |
| 15612462 | blue | 16 |
| color | pendingDuration | id |
| ------ | ---------------- | -------- |
| red | 3 | 15612462 |
| blue | 16 | 15612462 |
{{% /expand %}}
{{< /expand-wrapper >}}

View File

@ -107,44 +107,44 @@ data
| _time | _value |
| -------------------- | ------------------- |
| 2022-11-14T23:10:40Z | 10.56555566168836 |
| 2022-11-14T23:10:50Z | -29.76098586714259 |
| 2022-11-14T23:11:00Z | -67.50435038579738 |
| 2022-11-14T23:11:10Z | -16.758669047964453 |
| 2022-11-14T23:11:20Z | -47.25865245658065 |
| 2022-11-14T23:11:30Z | 66.16082461651365 |
| 2022-11-14T23:11:40Z | -0.9179216017921821 |
| 2022-11-14T23:11:50Z | -56.89169240573004 |
| 2022-11-14T23:12:00Z | 11.358605472976624 |
| 2022-11-14T23:12:10Z | 28.71147881415803 |
| 2022-11-14T23:12:20Z | -30.928830759588756 |
| 2022-11-14T23:12:30Z | -22.411848631056067 |
| 2022-11-14T23:12:40Z | 17.05503606764129 |
| 2022-11-14T23:12:50Z | 9.834382683760559 |
| 2022-11-14T23:13:00Z | -12.62058579127679 |
| 2022-11-14T23:13:10Z | -44.44668391211515 |
| 2023-01-09T22:03:00Z | 10.56555566168836 |
| 2023-01-09T22:03:10Z | -29.76098586714259 |
| 2023-01-09T22:03:20Z | -67.50435038579738 |
| 2023-01-09T22:03:30Z | -16.758669047964453 |
| 2023-01-09T22:03:40Z | -47.25865245658065 |
| 2023-01-09T22:03:50Z | 66.16082461651365 |
| 2023-01-09T22:04:00Z | -0.9179216017921821 |
| 2023-01-09T22:04:10Z | -56.89169240573004 |
| 2023-01-09T22:04:20Z | 11.358605472976624 |
| 2023-01-09T22:04:30Z | 28.71147881415803 |
| 2023-01-09T22:04:40Z | -30.928830759588756 |
| 2023-01-09T22:04:50Z | -22.411848631056067 |
| 2023-01-09T22:05:00Z | 17.05503606764129 |
| 2023-01-09T22:05:10Z | 9.834382683760559 |
| 2023-01-09T22:05:20Z | -12.62058579127679 |
| 2023-01-09T22:05:30Z | -44.44668391211515 |
#### Output data
| _time | _value |
| -------------------- | ------------------- |
| 2022-11-14T23:10:40Z | 10.56555566168836 |
| 2022-11-14T23:10:50Z | -29.76098586714259 |
| 2022-11-14T23:11:00Z | -67.50435038579738 |
| 2022-11-14T23:11:10Z | -16.758669047964453 |
| 2022-11-14T23:11:20Z | -47.25865245658065 |
| 2022-11-14T23:11:30Z | 66.16082461651365 |
| 2022-11-14T23:11:40Z | -0.9179216017921821 |
| 2022-11-14T23:11:50Z | -56.89169240573004 |
| 2022-11-14T23:12:00Z | 11.358605472976624 |
| 2022-11-14T23:12:10Z | 28.71147881415803 |
| 2022-11-14T23:12:20Z | -30.928830759588756 |
| 2022-11-14T23:12:30Z | -22.411848631056067 |
| 2022-11-14T23:12:40Z | 17.05503606764129 |
| 2022-11-14T23:12:50Z | 9.834382683760559 |
| 2022-11-14T23:13:00Z | -12.62058579127679 |
| 2022-11-14T23:13:10Z | -44.44668391211515 |
| 2023-01-09T22:03:00Z | 10.56555566168836 |
| 2023-01-09T22:03:10Z | -29.76098586714259 |
| 2023-01-09T22:03:20Z | -67.50435038579738 |
| 2023-01-09T22:03:30Z | -16.758669047964453 |
| 2023-01-09T22:03:40Z | -47.25865245658065 |
| 2023-01-09T22:03:50Z | 66.16082461651365 |
| 2023-01-09T22:04:00Z | -0.9179216017921821 |
| 2023-01-09T22:04:10Z | -56.89169240573004 |
| 2023-01-09T22:04:20Z | 11.358605472976624 |
| 2023-01-09T22:04:30Z | 28.71147881415803 |
| 2023-01-09T22:04:40Z | -30.928830759588756 |
| 2023-01-09T22:04:50Z | -22.411848631056067 |
| 2023-01-09T22:05:00Z | 17.05503606764129 |
| 2023-01-09T22:05:10Z | 9.834382683760559 |
| 2023-01-09T22:05:20Z | -12.62058579127679 |
| 2023-01-09T22:05:30Z | -44.44668391211515 |
{{% /expand %}}
{{< /expand-wrapper >}}
@ -166,43 +166,43 @@ data
| _time | _value |
| -------------------- | ------------------- |
| 2022-11-14T23:10:40Z | 10.56555566168836 |
| 2022-11-14T23:10:50Z | -29.76098586714259 |
| 2022-11-14T23:11:00Z | -67.50435038579738 |
| 2022-11-14T23:11:10Z | -16.758669047964453 |
| 2022-11-14T23:11:20Z | -47.25865245658065 |
| 2022-11-14T23:11:30Z | 66.16082461651365 |
| 2022-11-14T23:11:40Z | -0.9179216017921821 |
| 2022-11-14T23:11:50Z | -56.89169240573004 |
| 2022-11-14T23:12:00Z | 11.358605472976624 |
| 2022-11-14T23:12:10Z | 28.71147881415803 |
| 2022-11-14T23:12:20Z | -30.928830759588756 |
| 2022-11-14T23:12:30Z | -22.411848631056067 |
| 2022-11-14T23:12:40Z | 17.05503606764129 |
| 2022-11-14T23:12:50Z | 9.834382683760559 |
| 2022-11-14T23:13:00Z | -12.62058579127679 |
| 2022-11-14T23:13:10Z | -44.44668391211515 |
| 2023-01-09T22:03:00Z | 10.56555566168836 |
| 2023-01-09T22:03:10Z | -29.76098586714259 |
| 2023-01-09T22:03:20Z | -67.50435038579738 |
| 2023-01-09T22:03:30Z | -16.758669047964453 |
| 2023-01-09T22:03:40Z | -47.25865245658065 |
| 2023-01-09T22:03:50Z | 66.16082461651365 |
| 2023-01-09T22:04:00Z | -0.9179216017921821 |
| 2023-01-09T22:04:10Z | -56.89169240573004 |
| 2023-01-09T22:04:20Z | 11.358605472976624 |
| 2023-01-09T22:04:30Z | 28.71147881415803 |
| 2023-01-09T22:04:40Z | -30.928830759588756 |
| 2023-01-09T22:04:50Z | -22.411848631056067 |
| 2023-01-09T22:05:00Z | 17.05503606764129 |
| 2023-01-09T22:05:10Z | 9.834382683760559 |
| 2023-01-09T22:05:20Z | -12.62058579127679 |
| 2023-01-09T22:05:30Z | -44.44668391211515 |
#### Output data
| _time | _value |
| -------------------- | ------------------- |
| 2022-11-14T23:10:40Z | 10.56555566168836 |
| 2022-11-14T23:11:00Z | -67.50435038579738 |
| 2022-11-14T23:11:10Z | -16.758669047964453 |
| 2022-11-14T23:11:20Z | -47.25865245658065 |
| 2022-11-14T23:11:30Z | 66.16082461651365 |
| 2022-11-14T23:11:40Z | -0.9179216017921821 |
| 2022-11-14T23:11:50Z | -56.89169240573004 |
| 2022-11-14T23:12:00Z | 11.358605472976624 |
| 2022-11-14T23:12:10Z | 28.71147881415803 |
| 2022-11-14T23:12:20Z | -30.928830759588756 |
| 2022-11-14T23:12:30Z | -22.411848631056067 |
| 2022-11-14T23:12:40Z | 17.05503606764129 |
| 2022-11-14T23:12:50Z | 9.834382683760559 |
| 2022-11-14T23:13:00Z | -12.62058579127679 |
| 2022-11-14T23:13:10Z | -44.44668391211515 |
| 2023-01-09T22:03:00Z | 10.56555566168836 |
| 2023-01-09T22:03:20Z | -67.50435038579738 |
| 2023-01-09T22:03:30Z | -16.758669047964453 |
| 2023-01-09T22:03:40Z | -47.25865245658065 |
| 2023-01-09T22:03:50Z | 66.16082461651365 |
| 2023-01-09T22:04:00Z | -0.9179216017921821 |
| 2023-01-09T22:04:10Z | -56.89169240573004 |
| 2023-01-09T22:04:20Z | 11.358605472976624 |
| 2023-01-09T22:04:30Z | 28.71147881415803 |
| 2023-01-09T22:04:40Z | -30.928830759588756 |
| 2023-01-09T22:04:50Z | -22.411848631056067 |
| 2023-01-09T22:05:00Z | 17.05503606764129 |
| 2023-01-09T22:05:10Z | 9.834382683760559 |
| 2023-01-09T22:05:20Z | -12.62058579127679 |
| 2023-01-09T22:05:30Z | -44.44668391211515 |
{{% /expand %}}
{{< /expand-wrapper >}}
@ -224,42 +224,42 @@ data
| _time | _value |
| -------------------- | ------------------- |
| 2022-11-14T23:10:40Z | 10.56555566168836 |
| 2022-11-14T23:10:50Z | -29.76098586714259 |
| 2022-11-14T23:11:00Z | -67.50435038579738 |
| 2022-11-14T23:11:10Z | -16.758669047964453 |
| 2022-11-14T23:11:20Z | -47.25865245658065 |
| 2022-11-14T23:11:30Z | 66.16082461651365 |
| 2022-11-14T23:11:40Z | -0.9179216017921821 |
| 2022-11-14T23:11:50Z | -56.89169240573004 |
| 2022-11-14T23:12:00Z | 11.358605472976624 |
| 2022-11-14T23:12:10Z | 28.71147881415803 |
| 2022-11-14T23:12:20Z | -30.928830759588756 |
| 2022-11-14T23:12:30Z | -22.411848631056067 |
| 2022-11-14T23:12:40Z | 17.05503606764129 |
| 2022-11-14T23:12:50Z | 9.834382683760559 |
| 2022-11-14T23:13:00Z | -12.62058579127679 |
| 2022-11-14T23:13:10Z | -44.44668391211515 |
| 2023-01-09T22:03:00Z | 10.56555566168836 |
| 2023-01-09T22:03:10Z | -29.76098586714259 |
| 2023-01-09T22:03:20Z | -67.50435038579738 |
| 2023-01-09T22:03:30Z | -16.758669047964453 |
| 2023-01-09T22:03:40Z | -47.25865245658065 |
| 2023-01-09T22:03:50Z | 66.16082461651365 |
| 2023-01-09T22:04:00Z | -0.9179216017921821 |
| 2023-01-09T22:04:10Z | -56.89169240573004 |
| 2023-01-09T22:04:20Z | 11.358605472976624 |
| 2023-01-09T22:04:30Z | 28.71147881415803 |
| 2023-01-09T22:04:40Z | -30.928830759588756 |
| 2023-01-09T22:04:50Z | -22.411848631056067 |
| 2023-01-09T22:05:00Z | 17.05503606764129 |
| 2023-01-09T22:05:10Z | 9.834382683760559 |
| 2023-01-09T22:05:20Z | -12.62058579127679 |
| 2023-01-09T22:05:30Z | -44.44668391211515 |
#### Output data
| _time | _value |
| -------------------- | ------------------- |
| 2022-11-14T23:10:40Z | 10.56555566168836 |
| 2022-11-14T23:11:00Z | -67.50435038579738 |
| 2022-11-14T23:11:10Z | -16.758669047964453 |
| 2022-11-14T23:11:20Z | -47.25865245658065 |
| 2022-11-14T23:11:30Z | 66.16082461651365 |
| 2022-11-14T23:11:40Z | -0.9179216017921821 |
| 2022-11-14T23:11:50Z | -56.89169240573004 |
| 2022-11-14T23:12:00Z | 11.358605472976624 |
| 2022-11-14T23:12:10Z | 28.71147881415803 |
| 2022-11-14T23:12:20Z | -30.928830759588756 |
| 2022-11-14T23:12:30Z | -22.411848631056067 |
| 2022-11-14T23:12:40Z | 17.05503606764129 |
| 2022-11-14T23:12:50Z | 9.834382683760559 |
| 2022-11-14T23:13:10Z | -44.44668391211515 |
| 2023-01-09T22:03:00Z | 10.56555566168836 |
| 2023-01-09T22:03:20Z | -67.50435038579738 |
| 2023-01-09T22:03:30Z | -16.758669047964453 |
| 2023-01-09T22:03:40Z | -47.25865245658065 |
| 2023-01-09T22:03:50Z | 66.16082461651365 |
| 2023-01-09T22:04:00Z | -0.9179216017921821 |
| 2023-01-09T22:04:10Z | -56.89169240573004 |
| 2023-01-09T22:04:20Z | 11.358605472976624 |
| 2023-01-09T22:04:30Z | 28.71147881415803 |
| 2023-01-09T22:04:40Z | -30.928830759588756 |
| 2023-01-09T22:04:50Z | -22.411848631056067 |
| 2023-01-09T22:05:00Z | 17.05503606764129 |
| 2023-01-09T22:05:10Z | 9.834382683760559 |
| 2023-01-09T22:05:30Z | -44.44668391211515 |
{{% /expand %}}
{{< /expand-wrapper >}}

View File

@ -130,7 +130,7 @@ array.from(rows: [{name: data.name, age: data.age}])
| name | age |
| --------- | ---- |
| nathaniel | 60 |
| nathaniel | 61 |
{{% /expand %}}
{{< /expand-wrapper >}}

View File

@ -75,7 +75,7 @@ requests.peek(response: requests.get(url: "https://api.agify.io", params: ["name
| body | duration | headers | statusCode |
| ----------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- |
| {"age":48,"count":25082,"name":"natalie"} | 100000000 | [
| {"age":49,"count":25082,"name":"natalie"} | 100000000 | [
Access-Control-Allow-Credentials: true,
Access-Control-Allow-Origin: *,
Access-Control-Expose-Headers: x-rate-limit-limit,x-rate-limit-remaining,x-rate-limit-reset,
@ -83,12 +83,12 @@ requests.peek(response: requests.get(url: "https://api.agify.io", params: ["name
Connection: keep-alive,
Content-Length: 41,
Content-Type: application/json; charset=utf-8,
Date: Mon, 14 Nov 2022 23:13:25 GMT,
Date: Mon, 09 Jan 2023 22:05:48 GMT,
Server: nginx/1.16.1,
X-Rate-Limit-Limit: 1000,
X-Rate-Limit-Remaining: 996,
X-Rate-Limit-Reset: 2795,
X-Request-Id: FyeWcoOFrZ49wQUaWluC
X-Rate-Limit-Reset: 6852,
X-Request-Id: FzjDQZ1EFfn5HmUxxygx
] | 200 |
{{% /expand %}}

View File

@ -189,12 +189,12 @@ requests.peek(response: response)
Cache-Control: max-age=604800,
Content-Length: 1256,
Content-Type: text/html; charset=UTF-8,
Date: Mon, 14 Nov 2022 23:13:26 GMT,
Date: Mon, 09 Jan 2023 22:05:48 GMT,
Etag: "3147526947",
Expires: Mon, 21 Nov 2022 23:13:26 GMT,
Expires: Mon, 16 Jan 2023 22:05:48 GMT,
Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT,
Server: EOS (vny/0453)
] | 147996762 |
] | 92658873 |
{{% /expand %}}
{{< /expand-wrapper >}}

View File

@ -72,13 +72,10 @@ data
#### Input data
| _time | _value | *tag | *_field | _measurement |
| -------------------- | ------- | ---- | ------- | ------------- |
| 2021-01-01T00:00:00Z | -2 | t1 | f1 | m |
| 2021-01-01T00:00:50Z | 4 | t1 | f1 | m |
| _time | _value | *tag | _measurement | *_field |
| ------ | ------- | ---- | ------------- | ------- |
| _time | _value | *tag | _measurement | *_field |
| -------------------- | ------- | ---- | ------------- | ------- |
| 2021-01-01T00:00:00Z | -2 | t1 | m | f1 |
| 2021-01-01T00:00:50Z | 4 | t1 | m | f1 |
| _time | _value | *tag | _measurement | *_field |
| -------------------- | ------- | ---- | ------------- | ------- |
@ -86,21 +83,15 @@ data
| 2021-01-01T00:00:20Z | -3 | t2 | m | f1 |
| 2021-01-01T00:00:50Z | 1 | t2 | m | f1 |
| _time | _value | *tag | *_field | _measurement |
| ------ | ------- | ---- | ------- | ------------- |
| _time | _value | *tag | _measurement | *_field |
| -------------------- | ------- | ---- | ------------- | ------- |
| 2021-01-01T00:00:10Z | 10 | t1 | m | f2 |
| 2021-01-01T00:00:20Z | 7 | t1 | m | f2 |
| _time | _value | *tag | *_field | _measurement |
| -------------------- | ------- | ---- | ------- | ------------- |
| 2021-01-01T00:00:10Z | 10 | t1 | f2 | m |
| 2021-01-01T00:00:20Z | 7 | t1 | f2 | m |
| _time | _value | *tag | *_field | _measurement |
| -------------------- | ------- | ---- | ------- | ------------- |
| 2021-01-01T00:00:30Z | 17 | t1 | f3 | m |
| 2021-01-01T00:00:40Z | 15 | t1 | f3 | m |
| _time | _value | *tag | _measurement | *_field |
| ------ | ------- | ---- | ------------- | ------- |
| _time | _value | *tag | _measurement | *_field |
| -------------------- | ------- | ---- | ------------- | ------- |
| 2021-01-01T00:00:30Z | 17 | t1 | m | f3 |
| 2021-01-01T00:00:40Z | 15 | t1 | m | f3 |
| _time | _value | *tag | _measurement | *_field |
| -------------------- | ------- | ---- | ------------- | ------- |
@ -111,13 +102,10 @@ data
#### Output data
| _time | _value | *tag | *_field | _measurement |
| -------------------- | ------- | ---- | ------- | ------------- |
| 2021-01-01T00:00:00Z | -2 | t1 | f1 | m |
| 2021-01-01T00:00:50Z | 4 | t1 | f1 | m |
| _time | _value | *tag | _measurement | *_field |
| ------ | ------- | ---- | ------------- | ------- |
| _time | _value | *tag | _measurement | *_field |
| -------------------- | ------- | ---- | ------------- | ------- |
| 2021-01-01T00:00:00Z | -2 | t1 | m | f1 |
| 2021-01-01T00:00:50Z | 4 | t1 | m | f1 |
| _time | _value | *tag | _measurement | *_field |
| -------------------- | ------- | ---- | ------------- | ------- |
@ -125,13 +113,10 @@ data
| 2021-01-01T00:00:20Z | -3 | t2 | m | f1 |
| 2021-01-01T00:00:50Z | 1 | t2 | m | f1 |
| _time | _value | *tag | *_field | _measurement |
| ------ | ------- | ---- | ------- | ------------- |
| _time | _value | *tag | *_field | _measurement |
| -------------------- | ------- | ---- | ------- | ------------- |
| 2021-01-01T00:00:10Z | 10 | t1 | f2 | m |
| 2021-01-01T00:00:20Z | 7 | t1 | f2 | m |
| _time | _value | *tag | _measurement | *_field |
| -------------------- | ------- | ---- | ------------- | ------- |
| 2021-01-01T00:00:10Z | 10 | t1 | m | f2 |
| 2021-01-01T00:00:20Z | 7 | t1 | m | f2 |
{{% /expand %}}
{{< /expand-wrapper >}}

View File

@ -82,13 +82,13 @@ data
#### Input data
| _time | x | y |
| -------------------- | -- | ---- |
| 2021-01-01T00:00:00Z | 0 | 0 |
| 2021-01-01T00:00:12Z | 1 | 0.5 |
| 2021-01-01T00:00:24Z | 4 | 8 |
| 2021-01-01T00:00:36Z | 9 | 40.5 |
| 2021-01-01T00:00:48Z | 16 | 128 |
| y | _time | x |
| ---- | -------------------- | -- |
| 0 | 2021-01-01T00:00:00Z | 0 |
| 0.5 | 2021-01-01T00:00:12Z | 1 |
| 8 | 2021-01-01T00:00:24Z | 4 |
| 40.5 | 2021-01-01T00:00:36Z | 9 |
| 128 | 2021-01-01T00:00:48Z | 16 |
#### Output data

View File

@ -193,20 +193,20 @@ sampledata.int()
#### Output data
| alert | time | source |
| ------ | -------------------- | ------- |
| false | 2021-01-01T00:00:00Z | t1 |
| false | 2021-01-01T00:00:10Z | t1 |
| false | 2021-01-01T00:00:20Z | t1 |
| true | 2021-01-01T00:00:30Z | t1 |
| true | 2021-01-01T00:00:40Z | t1 |
| false | 2021-01-01T00:00:50Z | t1 |
| true | 2021-01-01T00:00:00Z | t2 |
| false | 2021-01-01T00:00:10Z | t2 |
| false | 2021-01-01T00:00:20Z | t2 |
| true | 2021-01-01T00:00:30Z | t2 |
| true | 2021-01-01T00:00:40Z | t2 |
| false | 2021-01-01T00:00:50Z | t2 |
| time | source | alert |
| -------------------- | ------- | ------ |
| 2021-01-01T00:00:00Z | t1 | false |
| 2021-01-01T00:00:10Z | t1 | false |
| 2021-01-01T00:00:20Z | t1 | false |
| 2021-01-01T00:00:30Z | t1 | true |
| 2021-01-01T00:00:40Z | t1 | true |
| 2021-01-01T00:00:50Z | t1 | false |
| 2021-01-01T00:00:00Z | t2 | true |
| 2021-01-01T00:00:10Z | t2 | false |
| 2021-01-01T00:00:20Z | t2 | false |
| 2021-01-01T00:00:30Z | t2 | true |
| 2021-01-01T00:00:40Z | t2 | true |
| 2021-01-01T00:00:50Z | t2 | false |
{{% /expand %}}
{{< /expand-wrapper >}}

View File

@ -149,14 +149,14 @@ union(tables: [t1, t2])
| _time | _value | tag |
| -------------------- | ------- | ---- |
| 2021-01-01T00:00:00Z | 1 | foo |
| 2021-01-02T00:00:00Z | 2 | foo |
| 2021-01-03T00:00:00Z | 3 | foo |
| 2021-01-04T00:00:00Z | 4 | foo |
| 2021-01-01T00:00:00Z | 0 | bar |
| 2021-01-02T00:00:00Z | -1 | bar |
| 2021-01-03T00:00:00Z | -2 | bar |
| 2021-01-04T00:00:00Z | -3 | bar |
| 2021-01-01T00:00:00Z | 1 | foo |
| 2021-01-02T00:00:00Z | 2 | foo |
| 2021-01-03T00:00:00Z | 3 | foo |
| 2021-01-04T00:00:00Z | 4 | foo |
{{% /expand %}}
{{< /expand-wrapper >}}

View File

@ -8,8 +8,7 @@
<div class="note block">
<p>
<code>{{ $name | safeHTML }}</code> is a user-contributed function maintained by
the <a href="#package-author-and-maintainer">package author</a> and can
be updated or removed at any time.
the <a href="#package-author-and-maintainer">package author</a>.
</p>
</div>
{{ else if eq .Kind "section" }}
@ -18,8 +17,7 @@
{{ $packageName := replaceRE `^(.*)( package)` "<code>$1</code>$2" $packageTitle }}
<p>
The {{ $packageName | safeHTML }} is a user-contributed package
maintained by the <a href="#package-author-and-maintainer">package author</a>
and can be updated or removed at any time.
maintained by the <a href="#package-author-and-maintainer">package author</a>.
</p>
</div>
{{ end }}