Merge branch 'master' into beta-12
commit
75499d038a
|
@ -1,16 +0,0 @@
|
|||
---
|
||||
title: Manage multiple members
|
||||
description: >
|
||||
View and manage multiple members in an InfluxDB Cloud account.
|
||||
weight: 4
|
||||
menu:
|
||||
v2_0:
|
||||
parent: Account management
|
||||
name: Manage multiple members
|
||||
---
|
||||
|
||||
{{< cloud-name >}} accounts support multiple members in an organization.
|
||||
Collaborate with others using these features.
|
||||
By default, each member has full permissions on resources in your organization.
|
||||
|
||||
{{< children >}}
|
|
@ -1,28 +0,0 @@
|
|||
---
|
||||
title: Invite a member
|
||||
list_title: Invite a member
|
||||
description: >
|
||||
Invite a member to collaborate in InfluxDB Cloud.
|
||||
weight: 103
|
||||
menu:
|
||||
v2_0:
|
||||
parent: Manage multiple members
|
||||
name: Invite a member
|
||||
---
|
||||
|
||||
1. Navigate to the **Members** page under **Organizations** in the left navigation bar.
|
||||
{{< nav-icon "org" >}}
|
||||
2. Under **Add a new member to your organization**, enter the email address of the member to invite.
|
||||
(Members must be invited one at a time.)
|
||||
3. Click **Add & Invite**.
|
||||
|
||||
An invitation with an activation link is sent to the specified email address.
|
||||
The activation link expires after 72 hours.
|
||||
|
||||
Once activated, the new member is added as an **Owner** with permissions to read and write all resources.
|
||||
|
||||
{{% warn %}}
|
||||
Currently, Cloud 2.0 has only one permission level: Owner.
|
||||
With Owner permissions, a member can delete resources and other members from your organization.
|
||||
Take care when inviting a member.
|
||||
{{% /warn %}}
|
|
@ -1,16 +0,0 @@
|
|||
---
|
||||
title: Remove a member
|
||||
seotitle: Remove a member from your InfluxDB Cloud organization
|
||||
description: >
|
||||
Remove a member from an InfluxDB Cloud organization.
|
||||
weight: 103
|
||||
menu:
|
||||
v2_0:
|
||||
parent: Manage multiple members
|
||||
identifier: remove_member_cloud
|
||||
---
|
||||
|
||||
1. Navigate to the **Members** page under **Organizations** in the left navigation bar.
|
||||
{{< nav-icon "org" >}}
|
||||
2. Click the {{< icon "delete" >}} next to the member you want to remove.
|
||||
3. Confirm the removal.
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: Manage multiple users
|
||||
description: >
|
||||
View and manage multiple users in an InfluxDB Cloud account.
|
||||
weight: 4
|
||||
menu:
|
||||
v2_0:
|
||||
parent: Account management
|
||||
name: Manage multiple users
|
||||
---
|
||||
|
||||
{{< cloud-name >}} accounts support multiple users in an organization.
|
||||
Collaborate with others using these features.
|
||||
By default, each user has full permissions on resources in your organization.
|
||||
|
||||
{{< children >}}
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
title: Invite a user
|
||||
list_title: Invite a user
|
||||
description: >
|
||||
Invite a user to collaborate in InfluxDB Cloud.
|
||||
weight: 103
|
||||
menu:
|
||||
v2_0:
|
||||
parent: Manage multiple users
|
||||
identifier: invite_user_cloud
|
||||
---
|
||||
|
||||
1. Navigate to the **Users** page in the left navigation bar.
|
||||
2. Under **Add a new user to your organization**, enter the email address of the user to invite.
|
||||
(Users must be invited one at a time.)
|
||||
3. Click **Add & Invite**.
|
||||
|
||||
An invitation with an activation link is sent to the specified email address.
|
||||
The activation link expires after 72 hours.
|
||||
|
||||
Once activated, the new user is added as an **Owner** with permissions to read and write all resources.
|
||||
|
||||
{{% warn %}}
|
||||
Currently, Cloud 2.0 has only one permission level: Owner.
|
||||
With Owner permissions, a user can delete resources and other users from your organization.
|
||||
Take care when inviting a user.
|
||||
{{% /warn %}}
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: Remove a user
|
||||
seotitle: Remove a user from your InfluxDB Cloud organization
|
||||
description: >
|
||||
Remove a user from an InfluxDB Cloud organization.
|
||||
weight: 103
|
||||
menu:
|
||||
v2_0:
|
||||
parent: Manage multiple users
|
||||
identifier: remove_user_cloud
|
||||
---
|
||||
|
||||
1. Navigate to the **Users** page in the left navigation bar.
|
||||
2. Click the {{< icon "delete" >}} next to the user you want to remove.
|
||||
3. Confirm the removal.
|
|
@ -382,17 +382,17 @@ You are ready to [write or collect data](/v2.0/write-data).
|
|||
|
||||
{{% note %}}
|
||||
#### Using the influx CLI after setting up InfluxDB through the UI
|
||||
To use the [`influx` CLI](/v2.0/reference/cli/influx) after setting up InfluxDB through the UI,
|
||||
use one of the following methods to provide your [authentication token](/v2.0/users/tokens/) to the CLI:
|
||||
To use the [`influx` CLI](/v2.0/reference/cli/influx) after setting up InfluxDB through the UI, provide your [authentication token](/v2.0/users/tokens/), which is automatically generated during the setup process. For instructions on viewing your token via CLI or UI, see [View tokens](/v2.0/security/tokens/view-tokens/).
|
||||
|
||||
1. Pass your token to the `influx` CLI using the `-t` or `--token` flag.
|
||||
2. Set the `INFLUX_TOKEN` environment variable using your token.
|
||||
Use one of the following methods to provide your authentication token to the CLI:
|
||||
|
||||
- Create a new InfluxDB connection configuration using the [`influx config create` command](/v2.0/reference/cli/influx/config/create/).
|
||||
- Pass your token to the `influx` CLI using the `-t` or `--token` flag.
|
||||
- Set the `INFLUX_TOKEN` environment variable using your token.
|
||||
|
||||
```bash
|
||||
export INFLUX_TOKEN=oOooYourAuthTokenOoooOoOO==
|
||||
```
|
||||
3. Store your token in `~/.influxdbv2/credentials`.
|
||||
_The content of the `credentials` file should be only your token._
|
||||
|
||||
_See [View tokens](/v2.0/security/tokens/view-tokens/) for information about
|
||||
retrieving authentication tokens._
|
||||
|
@ -419,7 +419,10 @@ influx setup
|
|||
Enter nothing for an infinite retention period.
|
||||
7. Confirm the details for your primary user, organization, and bucket.
|
||||
|
||||
InfluxDB is now initialized with a primary user, organization, and bucket.
|
||||
InfluxDB is now initialized with a primary user, organization, bucket, and authentication token. It has also create a config profile for you so that you don't have to add organization and token to every command. To view that config profile, use the [`influx config list`](/v2.0/reference/cli/influx/config) command.
|
||||
|
||||
To continue to use InfluxDB via the CLI, you need the authentication token created during setup. To view the token, log into the UI with the credentials created above. (For instructions, see [View tokens in the InfluxDB UI](/v2.0/security/tokens/view-tokens/#view-tokens-in-the-influxdb-ui).)
|
||||
|
||||
You are ready to [write or collect data](/v2.0/write-data).
|
||||
|
||||
{{% note %}}
|
||||
|
@ -489,10 +492,7 @@ The primary differences between InfluxDB OSS 2.0 and InfluxDB Cloud 2.0 are:
|
|||
|
||||
- [InfluxDB scrapers](/v2.0/write-data/scrape-data/) that collect data from specified
|
||||
targets are not available in {{< cloud-name "short" >}}.
|
||||
- {{< cloud-name "short" >}} instances are currently limited to a single organization with a single user.
|
||||
- **InfluxDB Cloud** does not support retrieving data from a file based CSV source
|
||||
using the `file` parameter of the [`csv.from()`](/v2.0/reference/flux/functions/csv/from);
|
||||
however you can use raw CSV data with the `csv` parameter.
|
||||
- {{< cloud-name "short" >}} instances are currently limited to a single organization.
|
||||
|
||||
#### New features in InfluxDB Cloud 2.0
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ menu:
|
|||
v2_0:
|
||||
name: Calculate percentages
|
||||
parent: Query with Flux
|
||||
weight: 206
|
||||
weight: 209
|
||||
aliases:
|
||||
- /v2.0/query-data/guides/manipulate-timestamps/
|
||||
related:
|
||||
|
@ -201,7 +201,7 @@ pgHost = secrets.get(key: "POSTGRES_HOST")
|
|||
t1 = sql.from(
|
||||
driverName: "postgres",
|
||||
dataSourceName: "postgresql://${pgUser}:${pgPass}@${pgHost}",
|
||||
query:"SELECT id, name, available FROM exampleTable"
|
||||
query:"SELECT id, name, available FROM example_table"
|
||||
)
|
||||
|
||||
t2 = from(bucket: "example-bucket")
|
||||
|
|
|
@ -0,0 +1,140 @@
|
|||
---
|
||||
title: Explore your data schema with Flux
|
||||
list_title: Explore your schema
|
||||
description: >
|
||||
Flux provides functions that let you explore the structure and schema of your
|
||||
data stored in InfluxDB.
|
||||
v2.0/tags: [schema]
|
||||
menu:
|
||||
v2_0:
|
||||
name: Explore your schema
|
||||
parent: Query with Flux
|
||||
weight: 206
|
||||
related:
|
||||
- /v2.0/reference/flux/stdlib/built-in/inputs/buckets/
|
||||
- /v2.0/reference/flux/stdlib/influxdb-v1/measurements
|
||||
- /v2.0/reference/flux/stdlib/influxdb-v1/fieldkeys
|
||||
- /v2.0/reference/flux/stdlib/influxdb-v1/measurementfieldkeys
|
||||
- /v2.0/reference/flux/stdlib/influxdb-v1/tagkeys
|
||||
- /v2.0/reference/flux/stdlib/influxdb-v1/measurementtagkeys
|
||||
- /v2.0/reference/flux/stdlib/influxdb-v1/tagvalues
|
||||
- /v2.0/reference/flux/stdlib/influxdb-v1/measurementtagvalues
|
||||
list_code_example: |
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
|
||||
// List buckets
|
||||
buckets()
|
||||
|
||||
// List measurements
|
||||
v1.measurements(bucket: "example-bucket")
|
||||
|
||||
// List field keys
|
||||
v1.fieldKeys(bucket: "example-bucket")
|
||||
|
||||
// List tag keys
|
||||
v1.tagKeys(bucket: "example-bucket")
|
||||
|
||||
// List tag values
|
||||
v1.tagValues(bucket: "example-bucket", tag: "example-tag")
|
||||
```
|
||||
---
|
||||
|
||||
Flux provides functions that let you explore the structure and schema of your
|
||||
data stored in InfluxDB.
|
||||
|
||||
- [List buckets](#list-buckets)
|
||||
- [List measurements](#list-measurements)
|
||||
- [List field keys](#list-field-keys)
|
||||
- [List tag keys](#list-tag-keys)
|
||||
- [List tag values](#list-tag-values)
|
||||
|
||||
## List buckets
|
||||
Use the [`buckets()` function](/v2.0/reference/flux/stdlib/built-in/inputs/buckets/)
|
||||
to list **buckets in your organization**.
|
||||
|
||||
```js
|
||||
buckets()
|
||||
```
|
||||
|
||||
## List measurements
|
||||
Use the [`v1.measurements()` function](/v2.0/reference/flux/stdlib/influxdb-v1/measurements)
|
||||
to list **measurements in a bucket**.
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
|
||||
v1.measurements(bucket: "example-bucket")
|
||||
```
|
||||
|
||||
## List field keys
|
||||
Use the [`v1.fieldKeys` function](/v2.0/reference/flux/stdlib/influxdb-v1/fieldkeys)
|
||||
to list **field keys in a bucket**.
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
|
||||
v1.fieldKeys(bucket: "example-bucket")
|
||||
```
|
||||
|
||||
### List fields in a measurement
|
||||
Use the [`v1.measurementFieldKeys` function](/v2.0/reference/flux/stdlib/influxdb-v1/measurementfieldkeys)
|
||||
to list **field keys in a measurement**.
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
|
||||
v1.measurementFieldKeys(
|
||||
bucket: "example-bucket",
|
||||
measurement: "example-measurement"
|
||||
)
|
||||
```
|
||||
|
||||
## List tag keys
|
||||
Use the [`v1.tagKeys()` function](/v2.0/reference/flux/stdlib/influxdb-v1/tagkeys)
|
||||
to list **tag keys in a bucket**.
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
|
||||
v1.tagKeys(bucket: "example-bucket")
|
||||
```
|
||||
|
||||
### List tag keys in a measurement
|
||||
Use the [`v1.measurementTagKeys` function](/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagkeys)
|
||||
to list **tag keys in a measurement**.
|
||||
_This function returns results from the last 30 days._
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
|
||||
v1.measurementTagKeys(
|
||||
bucket: "example-bucket",
|
||||
measurement: "example-measurement"
|
||||
)
|
||||
```
|
||||
|
||||
## List tag values
|
||||
Use the [`v1.tagValues()` function](/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues)
|
||||
to list **tag values for a given tag in a bucket**.
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
|
||||
v1.tagValues(bucket: "example-bucket", tag: "example-tag")
|
||||
```
|
||||
|
||||
### List tag values in a measurement
|
||||
Use the [`v1.measurementTagValues` function](/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagvalues)
|
||||
to list **tag values for a given tag in a measurement**.
|
||||
_This function returns results from the last 30 days._
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
|
||||
v1.measurementTagValues(
|
||||
bucket: "example-bucket",
|
||||
tag: "example-tag",
|
||||
measurement: "example-measurement"
|
||||
)
|
||||
```
|
|
@ -10,7 +10,7 @@ menu:
|
|||
v2_0:
|
||||
name: Transform data with math
|
||||
parent: Query with Flux
|
||||
weight: 205
|
||||
weight: 208
|
||||
aliases:
|
||||
- /v2.0/query-data/guides/mathematic-operations/
|
||||
related:
|
||||
|
@ -221,7 +221,7 @@ pgHost = secrets.get(key: "POSTGRES_HOST")
|
|||
t1 = sql.from(
|
||||
driverName: "postgres",
|
||||
dataSourceName: "postgresql://${pgUser}:${pgPass}@${pgHost}",
|
||||
query:"SELECT id, name, available FROM exampleTable"
|
||||
query:"SELECT id, name, available FROM example_table"
|
||||
)
|
||||
|
||||
t2 = from(bucket: "example-bucket")
|
||||
|
|
|
@ -32,9 +32,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)._
|
||||
|
||||
|
@ -48,61 +48,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]
|
||||
```
|
||||
|
@ -113,13 +85,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]
|
||||
|
@ -131,19 +104,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,
|
||||
|
@ -161,11 +133,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 {
|
||||
|
@ -190,8 +161,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]
|
||||
}
|
||||
|
||||
|
@ -210,8 +183,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
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ seotitle: Query SQL data sources with InfluxDB
|
|||
list_title: Query SQL data
|
||||
description: >
|
||||
The Flux `sql` package provides functions for working with SQL data sources.
|
||||
Use `sql.from()` to query SQL databases like PostgreSQL and MySQL
|
||||
Use `sql.from()` to query SQL databases like PostgreSQL, MySQL, Snowflake, and SQLite.
|
||||
v2.0/tags: [query, flux, sql]
|
||||
menu:
|
||||
v2_0:
|
||||
|
@ -30,8 +30,8 @@ list_code_example: |
|
|||
The [Flux](/v2.0/reference/flux) `sql` package provides functions for working with SQL data sources.
|
||||
[`sql.from()`](/v2.0/reference/flux/stdlib/sql/from/) lets you query SQL data sources
|
||||
like [PostgreSQL](https://www.postgresql.org/), [MySQL](https://www.mysql.com/),
|
||||
and [SQLite](https://www.sqlite.org/index.html), and use the results with InfluxDB
|
||||
dashboards, tasks, and other operations.
|
||||
[Snowflake](https://www.snowflake.com/), and [SQLite](https://www.sqlite.org/index.html),
|
||||
and use the results with InfluxDB dashboards, tasks, and other operations.
|
||||
|
||||
- [Query a SQL data source](#query-a-sql-data-source)
|
||||
- [Join SQL data with data in InfluxDB](#join-sql-data-with-data-in-influxdb)
|
||||
|
@ -55,6 +55,7 @@ To query a SQL data source:
|
|||
{{% code-tabs %}}
|
||||
[PostgreSQL](#)
|
||||
[MySQL](#)
|
||||
[Snowflake](#)
|
||||
[SQLite](#)
|
||||
{{% /code-tabs %}}
|
||||
|
||||
|
@ -82,6 +83,18 @@ sql.from(
|
|||
```
|
||||
{{% /code-tab-content %}}
|
||||
|
||||
{{% code-tab-content %}}
|
||||
```js
|
||||
import "sql"
|
||||
|
||||
sql.from(
|
||||
driverName: "snowflake",
|
||||
dataSourceName: "user:password@account/db/exampleschema?warehouse=wh",
|
||||
query: "SELECT * FROM example_table"
|
||||
)
|
||||
```
|
||||
{{% /code-tab-content %}}
|
||||
|
||||
{{% code-tab-content %}}
|
||||
```js
|
||||
// NOTE: InfluxDB OSS and InfluxDB Cloud do not have access to
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
title: InfluxDB Kotlin client library
|
||||
list_title: Kotlin
|
||||
description: Use the Kotlin client library to interact with InfluxDB.
|
||||
external_url: https://github.com/influxdata/influxdb-client-java/tree/master/client-kotlin
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: Kotlin
|
||||
parent: Client libraries
|
||||
url: https://github.com/influxdata/influxdb-client-java/tree/master/client-kotlin
|
||||
weight: 201
|
||||
---
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
title: InfluxDB Scala client library
|
||||
list_title: Scala
|
||||
description: Use the Scala client library to interact with InfluxDB.
|
||||
external_url: https://github.com/influxdata/influxdb-client-java/tree/master/client-scala
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: Scala
|
||||
parent: Client libraries
|
||||
url: https://github.com/influxdata/influxdb-client-java/tree/master/client-scala
|
||||
weight: 201
|
||||
---
|
|
@ -11,7 +11,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: columns
|
||||
parent: built-in-transformations
|
||||
weight: 401
|
||||
weight: 402
|
||||
related:
|
||||
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration/#show-measurements, InfluxQL – SHOW MEASUREMENTS
|
||||
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration/#show-field-keys, InfluxQL – SHOW FIELD KEYS
|
||||
|
|
|
@ -8,7 +8,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: cumulativeSum
|
||||
parent: built-in-transformations
|
||||
weight: 401
|
||||
weight: 402
|
||||
related:
|
||||
- /v2.0/query-data/flux/cumulativesum/
|
||||
- https://docs.influxdata.com/influxdb/latest/query_language/functions/#cumulative-sum, InfluxQL – CUMULATIVE_SUM()
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -8,7 +8,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: fill
|
||||
parent: built-in-transformations
|
||||
weight: 401
|
||||
weight: 402
|
||||
related:
|
||||
- /v2.0/query-data/flux/fill/
|
||||
- https://docs.influxdata.com/influxdb/latest/query_language/data_exploration/#group-by-time-intervals-and-fill, InfluxQL – FILL
|
||||
|
|
|
@ -8,7 +8,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: filter
|
||||
parent: built-in-transformations
|
||||
weight: 401
|
||||
weight: 402
|
||||
v2.0/tags: [exists]
|
||||
related:
|
||||
- /v2.0/query-data/flux/query-fields/
|
||||
|
|
|
@ -8,7 +8,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: group
|
||||
parent: built-in-transformations
|
||||
weight: 401
|
||||
weight: 402
|
||||
related:
|
||||
- /v2.0/query-data/flux/group-data/
|
||||
- https://docs.influxdata.com/influxdb/latest/query_language/data_exploration/#the-group-by-clause, InfluxQL – GROUP BY
|
||||
|
|
|
@ -8,7 +8,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: histogram
|
||||
parent: built-in-transformations
|
||||
weight: 401
|
||||
weight: 402
|
||||
related:
|
||||
- /v2.0/query-data/flux/histograms/
|
||||
---
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -8,7 +8,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: join
|
||||
parent: built-in-transformations
|
||||
weight: 401
|
||||
weight: 402
|
||||
related:
|
||||
- /v2.0/query-data/flux/join/
|
||||
- /v2.0/reference/flux/stdlib/built-in/transformations/union/
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -11,7 +11,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: keys
|
||||
parent: built-in-transformations
|
||||
weight: 401
|
||||
weight: 402
|
||||
related:
|
||||
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration/#show-measurements, InfluxQL – SHOW MEASUREMENTS
|
||||
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration/#show-field-keys, InfluxQL – SHOW FIELD KEYS
|
||||
|
|
|
@ -8,7 +8,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: keyValues
|
||||
parent: built-in-transformations
|
||||
weight: 401
|
||||
weight: 402
|
||||
related:
|
||||
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration/#show-measurements, InfluxQL – SHOW MEASUREMENTS
|
||||
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration/#show-field-keys, InfluxQL – SHOW FIELD KEYS
|
||||
|
|
|
@ -8,7 +8,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: limit
|
||||
parent: built-in-transformations
|
||||
weight: 401
|
||||
weight: 402
|
||||
related:
|
||||
- /v2.0/query-data/flux/sort-limit/
|
||||
- /v2.0/reference/flux/stdlib/built-in/transformations/tail/
|
||||
|
|
|
@ -8,7 +8,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: map
|
||||
parent: built-in-transformations
|
||||
weight: 401
|
||||
weight: 402
|
||||
v2.0/tags: [exists]
|
||||
related:
|
||||
- /v2.0/query-data/flux/conditional-logic/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -8,7 +8,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: range
|
||||
parent: built-in-transformations
|
||||
weight: 401
|
||||
weight: 402
|
||||
related:
|
||||
- https://docs.influxdata.com/influxdb/latest/query_language/data_exploration/#the-where-clause, InfluxQL – WHERE
|
||||
---
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -8,7 +8,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: sort
|
||||
parent: built-in-transformations
|
||||
weight: 401
|
||||
weight: 402
|
||||
related:
|
||||
- /v2.0/query-data/flux/sort-limit/
|
||||
---
|
||||
|
|
|
@ -8,7 +8,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: stateCount
|
||||
parent: built-in-transformations
|
||||
weight: 401
|
||||
weight: 402
|
||||
related:
|
||||
- /v2.0/query-data/flux/monitor-states/
|
||||
---
|
||||
|
|
|
@ -8,7 +8,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: stateDuration
|
||||
parent: built-in-transformations
|
||||
weight: 401
|
||||
weight: 402
|
||||
related:
|
||||
- /v2.0/query-data/flux/monitor-states/
|
||||
---
|
||||
|
|
|
@ -20,11 +20,31 @@ related:
|
|||
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")
|
||||
|
@ -35,5 +55,3 @@ values = t |> getColumn(column: "_value")
|
|||
// Extract the first record from the table
|
||||
r0 = t |> getRecord(idx: 0)
|
||||
```
|
||||
|
||||
{{< children type="functions" >}}
|
||||
|
|
|
@ -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]
|
||||
```
|
|
@ -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
|
||||
```
|
|
@ -33,7 +33,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_
|
||||
|
||||
|
|
|
@ -33,7 +33,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_
|
||||
|
||||
|
|
|
@ -34,7 +34,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_
|
||||
|
||||
|
|
|
@ -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/
|
||||
---
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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/
|
||||
---
|
||||
|
|
|
@ -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/
|
||||
---
|
||||
|
|
|
@ -8,7 +8,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: window
|
||||
parent: built-in-transformations
|
||||
weight: 401
|
||||
weight: 402
|
||||
related:
|
||||
- /v2.0/query-data/flux/window-aggregate/
|
||||
- /v2.0/reference/flux/stdlib/built-in/transformations/aggregates/aggregatewindow/
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
---
|
||||
title: experimental.chain() function
|
||||
description: >
|
||||
The `experimental.chain()` function runs two queries in a single Flux script
|
||||
sequentially and outputs the results of the second query.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: experimental.chain
|
||||
parent: Experimental
|
||||
weight: 302
|
||||
---
|
||||
|
||||
The `experimental.chain()` function runs two queries in a single Flux script
|
||||
sequentially and outputs the results of the second query.
|
||||
Flux typically executes multiple queries in a single script in parallel.
|
||||
Running the queries sequentially ensures any dependencies the second query has on
|
||||
the results of the first query are met.
|
||||
|
||||
##### Applicable use cases
|
||||
- Writing to a bucket and querying the written data in a single Flux script or
|
||||
[InfluxDB task](/v2.0/process-data/get-started/).
|
||||
- Execute queries sequentially in testing scenarios.
|
||||
|
||||
_**Function type:** Miscellaneous_
|
||||
|
||||
```js
|
||||
import "experimental"
|
||||
|
||||
experimental.chain(
|
||||
first: query1,
|
||||
second: query2
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
### first
|
||||
The first query to execute.
|
||||
|
||||
_**Data type:** Stream of tables_
|
||||
|
||||
### second
|
||||
The second query to execute.
|
||||
|
||||
_**Data type:** Stream of tables_
|
||||
|
||||
## Examples
|
||||
|
||||
### Write to a bucket and query the written data
|
||||
```js
|
||||
import "experimental"
|
||||
|
||||
downsampled_max = from(bucket: "example-bucket-1")
|
||||
|> range(start: -1d)
|
||||
|> filter(fn: (r) => r._measurement == "example-measurement")
|
||||
|> aggregateWindow(every: 1h, fn: max)
|
||||
|> to(bucket: "downsample-1h-max", org: "example-org")
|
||||
|
||||
average_max = from(bucket: "downsample-1h-max")
|
||||
|> range(start: -1d)
|
||||
|> filter(fn: (r) => r.measurement == "example-measurement")
|
||||
|> mean()
|
||||
|
||||
experimental.chain(
|
||||
first: downsampled_max,
|
||||
second: average_max
|
||||
)
|
||||
```
|
|
@ -0,0 +1,67 @@
|
|||
---
|
||||
title: v1.fieldKeys() function
|
||||
description: The `v1.fieldKeys()` function returns field keys in a bucket.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: v1.fieldKeys
|
||||
parent: InfluxDB v1
|
||||
weight: 301
|
||||
v2.0/tags: [fields]
|
||||
related:
|
||||
- /v2.0/query-data/flux/explore-schema/
|
||||
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-field-keys, SHOW FIELD KEYS in InfluxQL
|
||||
---
|
||||
|
||||
The `v1.fieldKeys()` function returns field keys in a bucket.
|
||||
The return value is always a single table with a single column, `_value`.
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
|
||||
v1.fieldKeys(
|
||||
bucket: "example-bucket",
|
||||
predicate: (r) => true,
|
||||
start: -30d
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
### bucket
|
||||
The bucket to list field keys from.
|
||||
|
||||
_**Data type:** String_
|
||||
|
||||
### predicate
|
||||
The predicate function that filters field keys.
|
||||
_Defaults to `(r) => true`._
|
||||
|
||||
_**Data type:** Function_
|
||||
|
||||
### start
|
||||
The oldest time to include in results.
|
||||
_Defaults to `-30d`._
|
||||
|
||||
Relative start times are defined using negative durations.
|
||||
Negative durations are relative to now.
|
||||
Absolute start times are defined using timestamps.
|
||||
|
||||
_**Data type:** Duration_
|
||||
|
||||
## Examples
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
|
||||
v1.fieldKeys(bucket: "my-bucket")
|
||||
```
|
||||
|
||||
## Function definition
|
||||
```js
|
||||
package v1
|
||||
|
||||
fieldKeys = (bucket, predicate=(r) => true, start=-30d) =>
|
||||
tagValues(bucket: bucket, tag: "_field", predicate: predicate, start: start)
|
||||
```
|
||||
|
||||
_**Used functions:**
|
||||
[v1.tagValues](/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues/)_
|
|
@ -36,6 +36,8 @@ from(bucket:"example-bucket")
|
|||
|
||||
## Function definition
|
||||
```js
|
||||
package v1
|
||||
|
||||
fieldsAsCols = (tables=<-) =>
|
||||
tables
|
||||
|> pivot(
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
---
|
||||
title: v1.measurementFieldKeys() function
|
||||
description: The `v1.measurementFieldKeys()` function returns a list of fields in a measurement.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: v1.measurementFieldKeys
|
||||
parent: InfluxDB v1
|
||||
weight: 301
|
||||
v2.0/tags: [fields]
|
||||
related:
|
||||
- /v2.0/query-data/flux/explore-schema/
|
||||
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-field-keys, SHOW FIELD KEYS in InfluxQL
|
||||
---
|
||||
|
||||
The `v1.measurementFieldKeys()` function returns a list of fields in a measurement.
|
||||
The return value is always a single table with a single column, `_value`.
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
|
||||
v1.measurementFieldKeys(
|
||||
bucket: "example-bucket",
|
||||
measurement: "example-measurement",
|
||||
start: -30d
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
### bucket
|
||||
The bucket to list field keys from.
|
||||
|
||||
_**Data type:** String_
|
||||
|
||||
### measurement
|
||||
The measurement to list field keys from.
|
||||
|
||||
_**Data type:** String_
|
||||
|
||||
### start
|
||||
The oldest time to include in results.
|
||||
_Defaults to `-30d`._
|
||||
|
||||
Relative start times are defined using negative durations.
|
||||
Negative durations are relative to now.
|
||||
Absolute start times are defined using timestamps.
|
||||
|
||||
_**Data type:** Duration_
|
||||
|
||||
## Examples
|
||||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
|
||||
v1.measurementFieldKeys(
|
||||
bucket: "telegraf",
|
||||
measurement: "cpu",
|
||||
)
|
||||
```
|
||||
|
||||
## Function definition
|
||||
```js
|
||||
package v1
|
||||
|
||||
measurementFieldKeys = (bucket, measurement, start=-30d) =>
|
||||
fieldKeys(bucket: bucket, predicate: (r) => r._measurement == measurement, start: start)
|
||||
```
|
||||
|
||||
_**Used functions:**
|
||||
[v1.fieldKeys](/v2.0/reference/flux/stdlib/influxdb-v1/fieldkeys/)_
|
|
@ -10,6 +10,7 @@ menu:
|
|||
weight: 301
|
||||
v2.0/tags: [measurements]
|
||||
related:
|
||||
- /v2.0/query-data/flux/explore-schema/
|
||||
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-measurements, SHOW MEASUREMENTS in InfluxQL
|
||||
---
|
||||
|
||||
|
@ -31,9 +32,11 @@ _**Data type:** String_
|
|||
|
||||
## Function definition
|
||||
```js
|
||||
package v1
|
||||
|
||||
measurements = (bucket) =>
|
||||
tagValues(bucket: bucket, tag: "_measurement")
|
||||
```
|
||||
|
||||
_**Used functions:**
|
||||
[tagValues()](/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues)_
|
||||
[v1.tagValues()](/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues)_
|
||||
|
|
|
@ -10,6 +10,7 @@ menu:
|
|||
weight: 301
|
||||
v2.0/tags: [tags]
|
||||
related:
|
||||
- /v2.0/query-data/flux/explore-schema/
|
||||
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-tag-keys, SHOW TAG KEYS in InfluxQL
|
||||
---
|
||||
|
||||
|
@ -39,11 +40,14 @@ _**Data type:** String_
|
|||
|
||||
## Function definition
|
||||
```js
|
||||
package v1
|
||||
|
||||
measurementTagKeys = (bucket, measurement) =>
|
||||
tagKeys(
|
||||
bucket: bucket,
|
||||
predicate: (r) => r._measurement == measurement)
|
||||
predicate: (r) => r._measurement == measurement
|
||||
)
|
||||
```
|
||||
|
||||
_**Used functions:**
|
||||
[tagKeys()](/v2.0/reference/flux/stdlib/influxdb-v1/tagkeys)_
|
||||
[v1.tagKeys()](/v2.0/reference/flux/stdlib/influxdb-v1/tagkeys)_
|
||||
|
|
|
@ -10,6 +10,7 @@ menu:
|
|||
weight: 301
|
||||
v2.0/tags: [tags]
|
||||
related:
|
||||
- /v2.0/query-data/flux/explore-schema/
|
||||
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-tag-values, SHOW TAG VALUES in InfluxQL
|
||||
---
|
||||
|
||||
|
@ -48,6 +49,8 @@ _**Data type:** String_
|
|||
|
||||
## Function definition
|
||||
```js
|
||||
package v1
|
||||
|
||||
measurementTagValues = (bucket, measurement, tag) =>
|
||||
tagValues(
|
||||
bucket: bucket,
|
||||
|
@ -57,4 +60,4 @@ measurementTagValues = (bucket, measurement, tag) =>
|
|||
```
|
||||
|
||||
_**Used functions:**
|
||||
[tagValues()](/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues)_
|
||||
[v1.tagValues()](/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues)_
|
||||
|
|
|
@ -10,6 +10,7 @@ menu:
|
|||
weight: 301
|
||||
v2.0/tags: [tags]
|
||||
related:
|
||||
- /v2.0/query-data/flux/explore-schema/
|
||||
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-tag-keys, SHOW TAG KEYS in InfluxQL
|
||||
---
|
||||
|
||||
|
@ -40,7 +41,7 @@ _Defaults to `(r) => true`._
|
|||
_**Data type:** Function_
|
||||
|
||||
### start
|
||||
Specifies the oldest time to be included in the results.
|
||||
The oldest time to include in results.
|
||||
_Defaults to `-30d`._
|
||||
|
||||
Relative start times are defined using negative durations.
|
||||
|
@ -59,6 +60,8 @@ v1.tagKeys(bucket: "my-bucket")
|
|||
|
||||
## Function definition
|
||||
```js
|
||||
package v1
|
||||
|
||||
tagKeys = (bucket, predicate=(r) => true, start=-30d) =>
|
||||
from(bucket: bucket)
|
||||
|> range(start: start)
|
||||
|
|
|
@ -10,6 +10,7 @@ menu:
|
|||
weight: 301
|
||||
v2.0/tags: [tags]
|
||||
related:
|
||||
- /v2.0/query-data/flux/explore-schema/
|
||||
- https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-tag-values, SHOW TAG VALUES in InfluxQL
|
||||
---
|
||||
|
||||
|
@ -46,7 +47,7 @@ _Defaults to `(r) => true`._
|
|||
_**Data type:** Function_
|
||||
|
||||
### start
|
||||
Specifies the oldest time to be included in the results.
|
||||
The oldest time to include in results.
|
||||
_Defaults to `-30d`._
|
||||
|
||||
Relative start times are defined using negative durations.
|
||||
|
@ -59,7 +60,7 @@ _**Data type:** Duration_
|
|||
```js
|
||||
import "influxdata/influxdb/v1"
|
||||
|
||||
v1.tagKeys(
|
||||
v1.tagValues(
|
||||
bucket: "my-bucket",
|
||||
tag: "host",
|
||||
)
|
||||
|
@ -67,6 +68,8 @@ v1.tagKeys(
|
|||
|
||||
## Function definition
|
||||
```js
|
||||
package v1
|
||||
|
||||
tagValues = (bucket, tag, predicate=(r) => true, start=-30d) =>
|
||||
from(bucket: bucket)
|
||||
|> range(start: start)
|
||||
|
|
|
@ -18,7 +18,7 @@ related:
|
|||
---
|
||||
|
||||
SQL Flux functions provide tools for working with data in SQL databases such as
|
||||
MySQL, PostgreSQL, and SQLite.
|
||||
MySQL, PostgreSQL, Snowflake, and SQLite.
|
||||
Import the `sql` package:
|
||||
|
||||
```js
|
||||
|
|
|
@ -37,6 +37,7 @@ The following drivers are available:
|
|||
|
||||
- mysql
|
||||
- postgres
|
||||
- snowflake
|
||||
- sqlite3 – _Does not work with InfluxDB OSS or InfluxDB Cloud. More information [below](#query-an-sqlite-database)._
|
||||
|
||||
### dataSourceName
|
||||
|
@ -53,6 +54,11 @@ postgres://pqgotest:password@localhost/pqgotest?sslmode=verify-full
|
|||
# MySQL Driver DSN
|
||||
username:password@tcp(localhost:3306)/dbname?param=value
|
||||
|
||||
# Snowflake Driver DSNs
|
||||
username[:password]@accountname/dbname/schemaname?param1=value1¶mN=valueN
|
||||
username[:password]@accountname/dbname?param1=value1¶mN=valueN
|
||||
username[:password]@hostname:port/dbname/schemaname?account=<your_account>¶m1=value1¶mN=valueN
|
||||
|
||||
# SQLite Driver DSN
|
||||
file:/path/to/test.db?cache=shared&mode=ro
|
||||
```
|
||||
|
@ -80,7 +86,7 @@ password = secrets.get(key: "MYSQL_PASS")
|
|||
sql.from(
|
||||
driverName: "mysql",
|
||||
dataSourceName: "${username}:${password}@tcp(localhost:3306)/db",
|
||||
query:"SELECT * FROM ExampleTable"
|
||||
query:"SELECT * FROM example_table"
|
||||
)
|
||||
```
|
||||
|
||||
|
@ -95,7 +101,23 @@ password = secrets.get(key: "POSTGRES_PASS")
|
|||
sql.from(
|
||||
driverName: "postgres",
|
||||
dataSourceName: "postgresql://${username}:${password}@localhost",
|
||||
query:"SELECT * FROM ExampleTable"
|
||||
query:"SELECT * FROM example_table"
|
||||
)
|
||||
```
|
||||
|
||||
### Query a Snowflake database
|
||||
```js
|
||||
import "sql"
|
||||
import "influxdata/influxdb/secrets"
|
||||
|
||||
username = secrets.get(key: "SNOWFLAKE_USER")
|
||||
password = secrets.get(key: "SNOWFLAKE_PASS")
|
||||
account = secrets.get(key: "SNOWFLAKE_ACCT")
|
||||
|
||||
sql.from(
|
||||
driverName: "snowflake",
|
||||
dataSourceName: "${username}:${password}@${account}/db/exampleschema?warehouse=wh",
|
||||
query: "SELECT * FROM example_table"
|
||||
)
|
||||
```
|
||||
|
||||
|
@ -114,6 +136,6 @@ import "sql"
|
|||
sql.from(
|
||||
driverName: "sqlite3",
|
||||
dataSourceName: "file:/path/to/test.db?cache=shared&mode=ro",
|
||||
query:"SELECT * FROM ExampleTable"
|
||||
query: "SELECT * FROM example_table"
|
||||
)
|
||||
```
|
||||
|
|
|
@ -20,7 +20,7 @@ import "sql"
|
|||
sql.to(
|
||||
driverName: "mysql",
|
||||
dataSourceName: "username:password@tcp(localhost:3306)/dbname?param=value",
|
||||
table: "ExampleTable",
|
||||
table: "example_table",
|
||||
batchSize: 10000
|
||||
)
|
||||
```
|
||||
|
@ -36,6 +36,7 @@ The following drivers are available:
|
|||
|
||||
- mysql
|
||||
- postgres
|
||||
- snowflake
|
||||
- sqlite3 – _Does not work with InfluxDB OSS or InfluxDB Cloud. More information [below](#write-data-to-an-sqlite-database)._
|
||||
|
||||
### dataSourceName
|
||||
|
@ -52,6 +53,11 @@ postgres://pqgotest:password@localhost/pqgotest?sslmode=verify-full
|
|||
# MySQL Driver DSN
|
||||
username:password@tcp(localhost:3306)/dbname?param=value
|
||||
|
||||
# Snowflake Driver DSNs
|
||||
username[:password]@accountname/dbname/schemaname?param1=value1¶mN=valueN
|
||||
username[:password]@accountname/dbname?param1=value1¶mN=valueN
|
||||
username[:password]@hostname:port/dbname/schemaname?account=<your_account>¶m1=value1¶mN=valueN
|
||||
|
||||
# SQLite Driver DSN
|
||||
file:/path/to/test.db?cache=shared&mode=rw
|
||||
```
|
||||
|
@ -89,7 +95,7 @@ password = secrets.get(key: "MYSQL_PASS")
|
|||
sql.to(
|
||||
driverName: "mysql",
|
||||
dataSourceName: "${username}:${password}@tcp(localhost:3306)/db",
|
||||
table: "ExampleTable"
|
||||
table: "example_table"
|
||||
)
|
||||
```
|
||||
|
||||
|
@ -104,7 +110,23 @@ password = secrets.get(key: "POSTGRES_PASS")
|
|||
sql.to(
|
||||
driverName: "postgres",
|
||||
dataSourceName: "postgresql://${username}:${password}@localhost",
|
||||
table: "ExampleTable"
|
||||
table: "example_table"
|
||||
)
|
||||
```
|
||||
|
||||
### Write data to a Snowflake database
|
||||
```js
|
||||
import "sql"
|
||||
import "influxdata/influxdb/secrets"
|
||||
|
||||
username = secrets.get(key: "SNOWFLAKE_USER")
|
||||
password = secrets.get(key: "SNOWFLAKE_PASS")
|
||||
account = secrets.get(key: "SNOWFLAKE_ACCT")
|
||||
|
||||
sql.to(
|
||||
driverName: "snowflake",
|
||||
dataSourceName: "${username}:${password}@${account}/db/exampleschema?warehouse=wh",
|
||||
table: "example_table"
|
||||
)
|
||||
```
|
||||
|
||||
|
@ -123,6 +145,6 @@ import "sql"
|
|||
sql.to(
|
||||
driverName: "sqlite3",
|
||||
dataSourceName: "file:/path/to/test.db?cache=shared&mode=rw",
|
||||
table: "ExampleTable"
|
||||
table: "example_table"
|
||||
)
|
||||
```
|
||||
|
|
|
@ -16,6 +16,137 @@ Though newer versions of Flux may be available, they will not be included with
|
|||
InfluxDB until the next InfluxDB v2.0 release._
|
||||
{{% /note %}}
|
||||
|
||||
## v0.68.0 [2020-05-28]
|
||||
This version of Flux introduces an updated type inference system that improves
|
||||
performance, error messaging, and usability of the
|
||||
[Flux Language Server Protocol (LSP)](https://github.com/influxdata/flux-lsp).
|
||||
|
||||
## Breaking Changes
|
||||
- Change signature of `group()` function.
|
||||
|
||||
## Features
|
||||
- Add [`fieldKeys()`](/v2.0/reference/flux/stdlib/influxdb-v1/fieldkeys/) and
|
||||
[`measurementFieldKeys()`](/v2.0/reference/flux/stdlib/influxdb-v1/measurementfieldkeys/)
|
||||
to v1 package.
|
||||
- Add a context to `plantest.RuleTestCase`.
|
||||
- Add Snowflake support to SQL package.
|
||||
- Add [`experimental.chain()`](/v2.0/reference/flux/stdlib/experimental/chain/) function.
|
||||
- Add semantic nodes for bad statement and bad expression.
|
||||
- Add [`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/) functions.
|
||||
- Return `false` if `contains()` is called with an empty set.
|
||||
- Various performance optimizations.
|
||||
- Add a dynamically linked Valgrind test.
|
||||
- Add location information to type error messages.
|
||||
- Add all Linux cross-compilation tools to release Docker image.
|
||||
- Support remote `buckets()` and `v1.databases()` calls.
|
||||
- Add support for static linking.
|
||||
- Add `influxdb` source.
|
||||
- Add support for `pkg-config`.
|
||||
- Transform semantic nodes back to AST nodes.
|
||||
- Handle multi-file packages.
|
||||
- Make `Eval()` and `EvalAST()` use libflux for parsing and analysis.
|
||||
- Add `lookuptype` function for stdlib builtins.
|
||||
|
||||
## Bug Fixes
|
||||
- Re-enable Clippy linter rule match single binding.
|
||||
- Fix bug in object equal method.
|
||||
- Add builtin formatting.
|
||||
- Implement `TimeBounds` for `influxdb.fromRemote`.
|
||||
- Inject the URL validator into `NewDefaultClient`.
|
||||
- Fix race condition in the `filter()` function.
|
||||
- Validate HTTP redirects against private IPs.
|
||||
- Hide DNS information in HTTP.
|
||||
- Fix concurrent map write in `filter()` transformation.
|
||||
- Copy all fields of `WindowProcedureSpec` in `Copy()`.
|
||||
- Run `go generate` on libflux when `go generate` is run on stdlib.
|
||||
- Fix panic when `map()` overwrites group column.
|
||||
- Support execution contexts in the REPL.
|
||||
- Apply substitution fully when compiling lambda.
|
||||
- Planner rewrite rules take a context.
|
||||
- Fix panics when functions operate on null values.
|
||||
- Fix logic for merging packages with no package clause.
|
||||
- Compute function's return type after substitution.
|
||||
- Resolve member expressions.
|
||||
- Improve error message descriptions.
|
||||
- Check types of parts when evaluating `StringExpression`.
|
||||
- Bind appropriate interpreter when evaluating functions.
|
||||
- Tweak Rust JSON serialization and add tests.
|
||||
- Pivot sends update watermark and processing time exactly once.
|
||||
- Calculate diff's watermark using both predecessors.
|
||||
- Add length check to avoid allocs checking for JSON `null`.
|
||||
- Make compilers robust to `null` keyword in `extern` field.
|
||||
- Address issues in `RemoveTrivialFilterRule`.
|
||||
- Bind appropriate interpreter when evaluating functions.
|
||||
- Convert `HashMap` in semantic package to `BTreeMap`.
|
||||
- Use static linking when creating the Valgrind test.
|
||||
- Update `flatbuffers` dependency.
|
||||
- Fix JSON serialization of Rust AST.
|
||||
- Remove unused environment variables.
|
||||
- Make `merge_packages` allow no package clauses.
|
||||
- Do not call `CheckKind` when evaluating logical expressions.
|
||||
- Force the Go libflux wrapper to rebuild using `go generate`.
|
||||
- Adjust `test-bench` config for Circle CI.
|
||||
- Fix Valgrind test code.
|
||||
- Let Rust parser parse with file name.
|
||||
- Remove Algorithm-W to-do list.
|
||||
- `JoinStr` returns a string, not an empty record.
|
||||
- Only add visible properties to output of `map()`.
|
||||
- Serialize the correct sign duration literal.
|
||||
- Remove code in semantic package that depends on Rust/Cgo code.
|
||||
- Remove `component` field from API.
|
||||
- Remove unused notification rule fields from Slack and PagerDuty APIs.
|
||||
- Array builders accept array types as input.
|
||||
- Enable `map()` tests with null values.
|
||||
- Remove tests for marshalling semantic graph.
|
||||
- Run `make generate` to generate stdlib.
|
||||
- Fix type error in benchmark test.
|
||||
- Update `TableObject` test.
|
||||
- Do not call `LocalRange` on nil scope.
|
||||
- Type assertion error in `length()` tests.
|
||||
- Update type inference test case with test for `union()`.
|
||||
- Make non-test CI steps pass.
|
||||
- Fix semantic check for option reassignment.
|
||||
- Type inference tests for binary comparison operators.
|
||||
- Fix typo in builtins.
|
||||
- Update `holtWinters()` to make `seasonality` optional.
|
||||
- Fix type errors in tests.
|
||||
- Remove default value from notify data.
|
||||
- Allow options to be set in scope.
|
||||
- Replace `ScopeComparer` with `ScopeTransformer`.
|
||||
- Use `LocalRange` in compile tests.
|
||||
- Add missing parameter to type of `to()`.
|
||||
- Get `TableObject` test case to compile.
|
||||
- Fix typo in test case.
|
||||
- Update `TableObjects` to type `Array`.
|
||||
- Use array type method correctly.
|
||||
- Update schema mutators.
|
||||
- Return proper types for type conversion functions.
|
||||
- Enable complete package to compile and pass tests.
|
||||
- Make stdlib compile.
|
||||
- Expect monotypes for function values.
|
||||
- Require successful lookup of stdlib builtins or panic.
|
||||
- Optimize lookup function using hashmap.
|
||||
- Include function type when deserializing function expressions.
|
||||
|
||||
---
|
||||
|
||||
## v0.67.0 [2020-04-28]
|
||||
|
||||
### Features
|
||||
- Planner Pattern interface supplies a set of ProcedureKind as root.
|
||||
- Initial prototype of a table-based Flux.
|
||||
- Evaluate and store "now" in execution dependencies for `tableFind()` to use.
|
||||
- Static analysis tool for listing entry points to Flux.
|
||||
- Pass context to rewrite rules in the planner.
|
||||
|
||||
### Bug fixes
|
||||
- Pivot sends update watermark and processing time exactly once.
|
||||
- `system.time()` checks context for override.
|
||||
- Add bounds to alignTime tests.
|
||||
|
||||
---
|
||||
|
||||
## v0.66.1 [2020-04-14]
|
||||
|
||||
### Bug fixes
|
||||
|
@ -177,7 +308,7 @@ InfluxDB until the next InfluxDB v2.0 release._
|
|||
## v0.59.0 [2020-01-14]
|
||||
|
||||
### Features
|
||||
- Add Go/Rust API for getting semantic graph..
|
||||
- Add Go/Rust API for getting semantic graph.
|
||||
- Optimize `limit()` transformation.
|
||||
- Optimize `group()` transformation.
|
||||
|
||||
|
@ -235,7 +366,7 @@ InfluxDB until the next InfluxDB v2.0 release._
|
|||
- Update `experimental.set` builtin type.
|
||||
- Update the type of `influxdb.to` to be a passthrough.
|
||||
- Update `fill` builtin type.
|
||||
- Remove redundant clones found by a new version of clippy.
|
||||
- Remove redundant clones found by a new version of Clippy.
|
||||
- Fix durations in Rust semantic graph.
|
||||
- Removes unnecessary rc clone in semantic serializer.
|
||||
- Do not stall forever in flux-config when an error happens with verbose.
|
||||
|
@ -250,7 +381,7 @@ InfluxDB until the next InfluxDB v2.0 release._
|
|||
## v0.57.0 [2019-12-10]
|
||||
|
||||
### Features
|
||||
- Categorize more flux errors with codes.
|
||||
- Categorize more Flux errors with codes.
|
||||
- Teach flux-config how to download the sources when using vendor.
|
||||
- Opentracing in query execution runtime.
|
||||
- Reduce memory allocations for operations in values.
|
||||
|
@ -276,7 +407,7 @@ InfluxDB until the next InfluxDB v2.0 release._
|
|||
|
||||
### Bug fixes
|
||||
- Properly use a fake version with `flux-config` when no version is present.
|
||||
- Address clippy lints.
|
||||
- Address Clippy lints.
|
||||
- Add bytes monotype to Rust semantic module.
|
||||
- Allow underscores (`_`) in type expressions.
|
||||
|
||||
|
@ -392,7 +523,7 @@ InfluxDB until the next InfluxDB v2.0 release._
|
|||
- Update libflux parser to match the Go parser.
|
||||
- Allow data collected by `prometheus.scrape()` to be used by `histogramQuantile()`.
|
||||
- Remove mock allocator.
|
||||
- Validate url for `sql.from()`, `sql.to()`, and `socket.from()`.
|
||||
- Validate URL for `sql.from()`, `sql.to()`, and `socket.from()`.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -13,17 +13,21 @@ cloud:
|
|||
short_name: AWS
|
||||
regions:
|
||||
- name: US West (Oregon)
|
||||
location: Oregon, USA
|
||||
url: https://us-west-2-1.aws.cloud2.influxdata.com
|
||||
- name: EU Frankfurt
|
||||
location: Frankfurt, Germany
|
||||
url: https://eu-central-1-1.aws.cloud2.influxdata.com
|
||||
- name: Google Cloud Platform
|
||||
short_name: GCP
|
||||
regions:
|
||||
- name: US Central (Iowa)
|
||||
location: Iowa, USA
|
||||
url: https://us-central1-1.gcp.cloud2.influxdata.com
|
||||
- name: Microsoft Azure
|
||||
short_name: Azure
|
||||
regions:
|
||||
- name: West Europe
|
||||
location: Amsterdam, Netherlands
|
||||
url: https://westeurope-1.azure.cloud2.influxdata.com
|
||||
status: beta
|
||||
|
|
|
@ -13,11 +13,13 @@
|
|||
<table>
|
||||
<thead>
|
||||
<th align="left">Region</th>
|
||||
<th align="left">Location</th>
|
||||
<th align="left">URL</th>
|
||||
</thead>
|
||||
{{ range .regions }}
|
||||
<tr>
|
||||
<td {{ if .status }}class="{{ .status }}"{{ end }}>{{ .name }}</td>
|
||||
<td>{{ .location }}</td>
|
||||
<td><a href="{{ .url }}">{{ .url }}</a></td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in New Issue