diff --git a/content/v2.0/reference/cli/influx/_index.md b/content/v2.0/reference/cli/influx/_index.md index fc7d46ddc..f0e1a257e 100644 --- a/content/v2.0/reference/cli/influx/_index.md +++ b/content/v2.0/reference/cli/influx/_index.md @@ -43,20 +43,21 @@ retrieving authentication tokens._ {{% /note %}} ## Commands -| Command | Description | -|:------- |:----------- | -| [auth](/v2.0/reference/cli/influx/auth) | Authorization management commands | -| [bucket](/v2.0/reference/cli/influx/bucket) | Bucket management commands | -| [delete](/v2.0/reference/cli/influx/delete) | Delete points from InfluxDB | -| [help](/v2.0/reference/cli/influx/help) | Help about any command | -| [org](/v2.0/reference/cli/influx/org) | Organization management commands | -| [ping](/v2.0/reference/cli/influx/ping) | Check the InfluxDB `/health` endpoint | -| [query](/v2.0/reference/cli/influx/query) | Execute a Flux query | -| [repl](/v2.0/reference/cli/influx/repl) | Interactive REPL (read-eval-print-loop) | -| [setup](/v2.0/reference/cli/influx/setup) | Create default username, password, org, bucket, etc. | -| [task](/v2.0/reference/cli/influx/task) | Task management commands | -| [user](/v2.0/reference/cli/influx/user) | User management commands | -| [write](/v2.0/reference/cli/influx/write) | Write points to InfluxDB | +| Command | Description | +|:------- |:----------- | +| [auth](/v2.0/reference/cli/influx/auth) | Authorization management commands | +| [bucket](/v2.0/reference/cli/influx/bucket) | Bucket management commands | +| [delete](/v2.0/reference/cli/influx/delete) | Delete points from InfluxDB | +| [help](/v2.0/reference/cli/influx/help) | Help about any command | +| [org](/v2.0/reference/cli/influx/org) | Organization management commands | +| [ping](/v2.0/reference/cli/influx/ping) | Check the InfluxDB `/health` endpoint | +| [query](/v2.0/reference/cli/influx/query) | Execute a Flux query | +| [repl](/v2.0/reference/cli/influx/repl) | Interactive REPL (read-eval-print-loop) | +| [setup](/v2.0/reference/cli/influx/setup) | Create default username, password, org, bucket, etc. | +| [task](/v2.0/reference/cli/influx/task) | Task management commands | +| [transpile](/v2.0/reference/cli/influx/transpile) | Manually transpile an InfluxQL query to Flux | +| [user](/v2.0/reference/cli/influx/user) | User management commands | +| [write](/v2.0/reference/cli/influx/write) | Write points to InfluxDB | {{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/transpile/_index.md b/content/v2.0/reference/cli/influx/transpile/_index.md new file mode 100644 index 000000000..802a63411 --- /dev/null +++ b/content/v2.0/reference/cli/influx/transpile/_index.md @@ -0,0 +1,28 @@ +--- +title: influx transpile – Transpile InfluxQL to Flux +description: > + The 'influx transpile' command transpiles an InfluxQL query to Flux source code. +menu: + v2_0_ref: + name: influx transpile + parent: influx +weight: 101 +v2.0/tags: [influxql, flux] +--- + +The `influx transpile` command transpiles an InfluxQL query to Flux source code. +The transpiled query assumes the bucket name is `/` +and includes absolute time ranges using the provided `--now` time. + +## Usage +``` +influx transpile [InfluxQL query] [flags] +``` + +## Flags +| Flag | Description | +|:---- |:----------- | +| `-h`, `--help` | Help for the `transpile` command | +| `--now` | RFC3339Nano timestamp to use as `now()` time (default is current UTC time) | + +{{% influx-cli-global-flags %}} diff --git a/layouts/shortcodes/influx-cli-global-flags.md b/layouts/shortcodes/influx-cli-global-flags.md index 1b12fcc04..c14c0f7dc 100644 --- a/layouts/shortcodes/influx-cli-global-flags.md +++ b/layouts/shortcodes/influx-cli-global-flags.md @@ -4,5 +4,5 @@ |:----------------|:--------------------------------------------------------------------------------------------|:----------:| | `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string | | `--local` | Run commands against the local filesystem | | -| `-t`, `--token` | API token to use in client calls | string | | `--skip-verify` | Skip certificate verification (use when connecting over TLS with a self-signed certificate) | | +| `-t`, `--token` | API token to use in client calls | string |