diff --git a/content/v2.0/account-management/multi-member/_index.md b/content/v2.0/account-management/multi-member/_index.md deleted file mode 100644 index 83f3d33da..000000000 --- a/content/v2.0/account-management/multi-member/_index.md +++ /dev/null @@ -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 >}} diff --git a/content/v2.0/account-management/multi-member/invite-member.md b/content/v2.0/account-management/multi-member/invite-member.md deleted file mode 100644 index 7f1bf84d4..000000000 --- a/content/v2.0/account-management/multi-member/invite-member.md +++ /dev/null @@ -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 %}} diff --git a/content/v2.0/account-management/multi-member/remove-memberr.md b/content/v2.0/account-management/multi-member/remove-memberr.md deleted file mode 100644 index 614bebe14..000000000 --- a/content/v2.0/account-management/multi-member/remove-memberr.md +++ /dev/null @@ -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. diff --git a/content/v2.0/account-management/multi-user/_index.md b/content/v2.0/account-management/multi-user/_index.md new file mode 100644 index 000000000..365fe95fe --- /dev/null +++ b/content/v2.0/account-management/multi-user/_index.md @@ -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 >}} diff --git a/content/v2.0/account-management/multi-user/invite-user.md b/content/v2.0/account-management/multi-user/invite-user.md new file mode 100644 index 000000000..b3cfb526f --- /dev/null +++ b/content/v2.0/account-management/multi-user/invite-user.md @@ -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 %}} diff --git a/content/v2.0/account-management/multi-user/remove-user.md b/content/v2.0/account-management/multi-user/remove-user.md new file mode 100644 index 000000000..f00d2e034 --- /dev/null +++ b/content/v2.0/account-management/multi-user/remove-user.md @@ -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. diff --git a/content/v2.0/get-started.md b/content/v2.0/get-started.md index 113c8d5fb..9dbc7e64e 100644 --- a/content/v2.0/get-started.md +++ b/content/v2.0/get-started.md @@ -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 diff --git a/content/v2.0/query-data/flux/calculate-percentages.md b/content/v2.0/query-data/flux/calculate-percentages.md index 9b594ea0e..983e5527d 100644 --- a/content/v2.0/query-data/flux/calculate-percentages.md +++ b/content/v2.0/query-data/flux/calculate-percentages.md @@ -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") diff --git a/content/v2.0/query-data/flux/explore-schema.md b/content/v2.0/query-data/flux/explore-schema.md new file mode 100644 index 000000000..c199c231f --- /dev/null +++ b/content/v2.0/query-data/flux/explore-schema.md @@ -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" +) +``` diff --git a/content/v2.0/query-data/flux/mathematic-operations.md b/content/v2.0/query-data/flux/mathematic-operations.md index 284657756..8b133dfc4 100644 --- a/content/v2.0/query-data/flux/mathematic-operations.md +++ b/content/v2.0/query-data/flux/mathematic-operations.md @@ -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") diff --git a/content/v2.0/query-data/flux/scalar-values.md b/content/v2.0/query-data/flux/scalar-values.md index 4eca5112d..3bb7a8542 100644 --- a/content/v2.0/query-data/flux/scalar-values.md +++ b/content/v2.0/query-data/flux/scalar-values.md @@ -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 } diff --git a/content/v2.0/query-data/flux/sql.md b/content/v2.0/query-data/flux/sql.md index ea2842d93..6baee5ac5 100644 --- a/content/v2.0/query-data/flux/sql.md +++ b/content/v2.0/query-data/flux/sql.md @@ -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 diff --git a/content/v2.0/reference/api/client-libraries/kotlin.md b/content/v2.0/reference/api/client-libraries/kotlin.md new file mode 100644 index 000000000..ad3d976ad --- /dev/null +++ b/content/v2.0/reference/api/client-libraries/kotlin.md @@ -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 +--- diff --git a/content/v2.0/reference/api/client-libraries/scala.md b/content/v2.0/reference/api/client-libraries/scala.md new file mode 100644 index 000000000..e7fecb067 --- /dev/null +++ b/content/v2.0/reference/api/client-libraries/scala.md @@ -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 +--- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/columns.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/columns.md index 9bd20c876..9c09ff63c 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/columns.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/columns.md @@ -11,7 +11,7 @@ menu: v2_0_ref: name: columns parent: built-in-transformations -weight: 401 +weight: 402 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 diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/cumulativesum.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/cumulativesum.md index 1def460fe..29bf1635a 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/cumulativesum.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/cumulativesum.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: cumulativeSum parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/cumulativesum/ - https://docs.influxdata.com/influxdb/latest/query_language/functions/#cumulative-sum, InfluxQL – CUMULATIVE_SUM() diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/drop.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/drop.md index 75a5e90bb..ac71f26af 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/drop.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/drop.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: drop parent: built-in-transformations -weight: 401 +weight: 402 --- The `drop()` function removes specified columns from a table. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/duplicate.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/duplicate.md index cbc060dc0..db6a2ebc1 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/duplicate.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/duplicate.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: duplicate parent: built-in-transformations -weight: 401 +weight: 402 --- The `duplicate()` function duplicates a specified column in a table. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/elapsed.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/elapsed.md index b297476c2..e4adcbc2e 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/elapsed.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/elapsed.md @@ -7,7 +7,7 @@ menu: v2_0_ref: name: elapsed parent: built-in-transformations -weight: 401 +weight: 402 --- The `elapsed()` function returns the time between subsequent records. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/fill.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/fill.md index a0997656f..e3a3bf247 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/fill.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/fill.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: fill parent: built-in-transformations -weight: 401 +weight: 402 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 diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/filter.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/filter.md index 5826b2023..50e77e6ff 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/filter.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/filter.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: filter parent: built-in-transformations -weight: 401 +weight: 402 v2.0/tags: [exists] related: - /v2.0/query-data/flux/query-fields/ diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/group.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/group.md index e0201f821..77fc61f9c 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/group.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/group.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: group parent: built-in-transformations -weight: 401 +weight: 402 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 diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/histogram.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/histogram.md index cf0b839d5..7f9d43c39 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/histogram.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/histogram.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: histogram parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/histograms/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/hourselection.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/hourselection.md index b56ad99f5..ee53fa130 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/hourselection.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/hourselection.md @@ -10,7 +10,7 @@ menu: v2_0_ref: name: hourSelection parent: built-in-transformations -weight: 401 +weight: 402 --- The `hourSelection()` function retains all rows with time values in a specified hour range. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/join.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/join.md index 5d65d942a..cb4946451 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/join.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/join.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: join parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/join/ - /v2.0/reference/flux/stdlib/built-in/transformations/union/ diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/keep.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/keep.md index 6c4f0dada..94c7e6d29 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/keep.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/keep.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: keep parent: built-in-transformations -weight: 401 +weight: 402 --- The `keep()` function returns a table containing only the specified columns, ignoring all others. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/keys.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/keys.md index 21a34feb6..e7b604dcf 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/keys.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/keys.md @@ -11,7 +11,7 @@ menu: v2_0_ref: name: keys parent: built-in-transformations -weight: 401 +weight: 402 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 diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/keyvalues.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/keyvalues.md index 0dafff28e..147690368 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/keyvalues.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/keyvalues.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: keyValues parent: built-in-transformations -weight: 401 +weight: 402 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 diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/limit.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/limit.md index 6fb5f9db1..472386eca 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/limit.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/limit.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: limit parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/sort-limit/ - /v2.0/reference/flux/stdlib/built-in/transformations/tail/ diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/map.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/map.md index dfe4dd628..5979b42d5 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/map.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/map.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: map parent: built-in-transformations -weight: 401 +weight: 402 v2.0/tags: [exists] related: - /v2.0/query-data/flux/conditional-logic/ diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/pivot.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/pivot.md index 422814428..b9f552a53 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/pivot.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/pivot.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: pivot parent: built-in-transformations -weight: 401 +weight: 402 --- The `pivot()` function collects values stored vertically (column-wise) in a table diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/range.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/range.md index 1a6ad098f..70360537f 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/range.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/range.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: range parent: built-in-transformations -weight: 401 +weight: 402 related: - https://docs.influxdata.com/influxdb/latest/query_language/data_exploration/#the-where-clause, InfluxQL – WHERE --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/rename.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/rename.md index 57e3c504f..8f34a8f0c 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/rename.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/rename.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: rename parent: built-in-transformations -weight: 401 +weight: 402 --- The `rename()` function renames specified columns in a table. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/set.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/set.md index 812bc21b0..0354cbdf5 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/set.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/set.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: set parent: built-in-transformations -weight: 401 +weight: 402 --- The `set()` function assigns a static value to each record in the input table. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/sort.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/sort.md index 9c64201b4..f3de134dd 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/sort.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/sort.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: sort parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/sort-limit/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/statecount.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/statecount.md index 2b2e83ca7..0668b3948 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/statecount.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/statecount.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: stateCount parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/monitor-states/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stateduration.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stateduration.md index f46f7ef13..8e2381741 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/stateduration.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stateduration.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: stateDuration parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/monitor-states/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/_index.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/_index.md index 688684818..f64bccad1 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/_index.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/_index.md @@ -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" >}} diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findcolumn.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findcolumn.md new file mode 100644 index 000000000..53310e3b8 --- /dev/null +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findcolumn.md @@ -0,0 +1,54 @@ +--- +title: findColumn() function +description: > + The `findColumn()` function returns an array of values in a specified column from the + first table in a stream of tables where group key values match the specified predicate. +menu: + v2_0_ref: + name: findColumn + parent: Stream & table +weight: 501 +related: + - /v2.0/query-data/flux/scalar-values/ +--- + +The `findColumn()` function returns an array of values in a specified column from the +first table in a stream of tables where the group key values match the specified predicate. +The function returns an empty array if no table is found or if the column label +is not present in the set of columns. + +_**Function type:** Stream and table_ + +```js +findColumn( + fn: (key) => key._field == "fieldName") + column: "_value" +) +``` + +## Parameters + +### fn +A predicate function for matching keys in a table's group key. +Expects a `key` argument that represents a group key in the input stream. + +_**Data type:** Function_ + +### column +Name of the column to extract. + +_**Data type:** String_ + +## Example +```js +vs = from(bucket:"example-bucket") + |> range(start: -5m) + |> filter(fn:(r) => r._measurement == "cpu") + |> findColumn( + fn: (key) => key._field == "usage_idle", + column: "_value" + ) + +// Use column values +x = vs[0] + vs[1] +``` diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findrecord.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findrecord.md new file mode 100644 index 000000000..edf2f8a56 --- /dev/null +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findrecord.md @@ -0,0 +1,54 @@ +--- +title: findRecord() function +description: > + The `findRecord()` function returns a record at a specified index from the first + table in a stream of tables where the group key values match the specified predicate. +menu: + v2_0_ref: + name: findRecord + parent: Stream & table +weight: 501 +related: + - /v2.0/query-data/flux/scalar-values/ +--- + +The `findRecord()` function returns a record at a specified index from the first +table in a stream of tables where the group key values match the specified predicate. +The function returns an empty object if no table is found or if the index is out of bounds. + +_**Function type:** Stream and table_ + +```js +findRecord( + fn: (key) => key._field == "fieldName", + idx: 0 +) +``` + +## Parameters + +### fn +A predicate function for matching keys in a table's group key. +Expects a `key` argument that represents a group key in the input stream. + +_**Data type:** Function_ + +### idx +Index of the record to extract. + +_**Data type:** Integer_ + +## Example +```js +r0 = from(bucket:"example-bucket") + |> range(start: -5m) + |> filter(fn:(r) => r._measurement == "cpu") + |> tableFind() + |> findRecord( + fn: (key) => key._field == "usage_idle", + idx: 0 + ) + +// Use record values +x = r0._field + "--" + r0._measurement +``` diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getcolumn.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getcolumn.md index 0eb8864ac..37ee22574 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getcolumn.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getcolumn.md @@ -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_ diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getrecord.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getrecord.md index 6aa31318f..5ac41aa20 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getrecord.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getrecord.md @@ -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_ diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/tablefind.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/tablefind.md index 14c5c8519..4644e1ad6 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/tablefind.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/tablefind.md @@ -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_ diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/tail.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/tail.md index b86287b1b..fe975298e 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/tail.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/tail.md @@ -7,7 +7,7 @@ menu: v2_0_ref: name: tail parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/reference/flux/functions/built-in/transformations/limit/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/timeshift.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/timeshift.md index be365a397..624fe3b8a 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/timeshift.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/timeshift.md @@ -9,7 +9,7 @@ menu: v2_0_ref: name: timeShift parent: built-in-transformations -weight: 401 +weight: 402 --- The `timeShift()` function adds a fixed duration to time columns. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/truncatetimecolumn.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/truncatetimecolumn.md index 6b0a0b053..63df2ba40 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/truncatetimecolumn.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/truncatetimecolumn.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: truncateTimeColumn parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/reference/flux/stdlib/date/truncate/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/union.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/union.md index f2ed1030a..529bc546e 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/union.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/union.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: union parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/reference/flux/stdlib/built-in/transformations/join/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/window.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/window.md index 17034ffe5..ff037a5ec 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/window.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/window.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: window parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/window-aggregate/ - /v2.0/reference/flux/stdlib/built-in/transformations/aggregates/aggregatewindow/ diff --git a/content/v2.0/reference/flux/stdlib/experimental/chain.md b/content/v2.0/reference/flux/stdlib/experimental/chain.md new file mode 100644 index 000000000..8f7868231 --- /dev/null +++ b/content/v2.0/reference/flux/stdlib/experimental/chain.md @@ -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 +) +``` diff --git a/content/v2.0/reference/flux/stdlib/influxdb-v1/fieldkeys.md b/content/v2.0/reference/flux/stdlib/influxdb-v1/fieldkeys.md new file mode 100644 index 000000000..9d3b680e0 --- /dev/null +++ b/content/v2.0/reference/flux/stdlib/influxdb-v1/fieldkeys.md @@ -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/)_ diff --git a/content/v2.0/reference/flux/stdlib/influxdb-v1/fieldsascols.md b/content/v2.0/reference/flux/stdlib/influxdb-v1/fieldsascols.md index a1596f8a6..13c4df176 100644 --- a/content/v2.0/reference/flux/stdlib/influxdb-v1/fieldsascols.md +++ b/content/v2.0/reference/flux/stdlib/influxdb-v1/fieldsascols.md @@ -36,6 +36,8 @@ from(bucket:"example-bucket") ## Function definition ```js +package v1 + fieldsAsCols = (tables=<-) => tables |> pivot( diff --git a/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementfieldkeys.md b/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementfieldkeys.md new file mode 100644 index 000000000..519c91216 --- /dev/null +++ b/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementfieldkeys.md @@ -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/)_ diff --git a/content/v2.0/reference/flux/stdlib/influxdb-v1/measurements.md b/content/v2.0/reference/flux/stdlib/influxdb-v1/measurements.md index 55143bda3..d7e113fe5 100644 --- a/content/v2.0/reference/flux/stdlib/influxdb-v1/measurements.md +++ b/content/v2.0/reference/flux/stdlib/influxdb-v1/measurements.md @@ -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)_ diff --git a/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagkeys.md b/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagkeys.md index ae6f20774..b1480d09e 100644 --- a/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagkeys.md +++ b/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagkeys.md @@ -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)_ diff --git a/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagvalues.md b/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagvalues.md index 9d51d7a9e..701c42b35 100644 --- a/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagvalues.md +++ b/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagvalues.md @@ -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)_ diff --git a/content/v2.0/reference/flux/stdlib/influxdb-v1/tagkeys.md b/content/v2.0/reference/flux/stdlib/influxdb-v1/tagkeys.md index 46bc4f8d0..f523c753b 100644 --- a/content/v2.0/reference/flux/stdlib/influxdb-v1/tagkeys.md +++ b/content/v2.0/reference/flux/stdlib/influxdb-v1/tagkeys.md @@ -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) diff --git a/content/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues.md b/content/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues.md index e07f53827..35ba8e1ee 100644 --- a/content/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues.md +++ b/content/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues.md @@ -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) diff --git a/content/v2.0/reference/flux/stdlib/sql/_index.md b/content/v2.0/reference/flux/stdlib/sql/_index.md index 51d3d2c9b..2fd8814e0 100644 --- a/content/v2.0/reference/flux/stdlib/sql/_index.md +++ b/content/v2.0/reference/flux/stdlib/sql/_index.md @@ -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 diff --git a/content/v2.0/reference/flux/stdlib/sql/from.md b/content/v2.0/reference/flux/stdlib/sql/from.md index 2d8b1d43c..0ecc56666 100644 --- a/content/v2.0/reference/flux/stdlib/sql/from.md +++ b/content/v2.0/reference/flux/stdlib/sql/from.md @@ -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=¶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" ) ``` diff --git a/content/v2.0/reference/flux/stdlib/sql/to.md b/content/v2.0/reference/flux/stdlib/sql/to.md index 0286011dd..4d94200ef 100644 --- a/content/v2.0/reference/flux/stdlib/sql/to.md +++ b/content/v2.0/reference/flux/stdlib/sql/to.md @@ -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=¶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" ) ``` diff --git a/content/v2.0/reference/release-notes/flux.md b/content/v2.0/reference/release-notes/flux.md index daf7f5630..6780e4407 100644 --- a/content/v2.0/reference/release-notes/flux.md +++ b/content/v2.0/reference/release-notes/flux.md @@ -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()`. --- diff --git a/data/influxdb_urls.yml b/data/influxdb_urls.yml index cbe01e84a..202b9fd73 100644 --- a/data/influxdb_urls.yml +++ b/data/influxdb_urls.yml @@ -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 diff --git a/layouts/shortcodes/cloud_regions.html b/layouts/shortcodes/cloud_regions.html index 46c0ecf19..67798483d 100644 --- a/layouts/shortcodes/cloud_regions.html +++ b/layouts/shortcodes/cloud_regions.html @@ -13,11 +13,13 @@ + {{ range .regions }} + {{ end }}
RegionLocation URL
{{ .name }}{{ .location }} {{ .url }}