Merge pull request #1176 from influxdata/cli-transpile-examples

Add note and examples to 'influx transpile' command
pull/1180/head
Scott Anderson 2020-07-06 14:07:54 -06:00 committed by GitHub
commit 72ea5de34e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 0 deletions

View File

@ -19,8 +19,23 @@ and includes absolute time ranges using the provided `--now` time.
influx transpile [InfluxQL query] [flags]
```
{{% note %}}
The InfluxQL query must be valid and contain both a database and measurement.
See the [InfluxQL documentation](https://docs.influxdata.com/influxdb/latest/query_language/) for more information.
{{% /note %}}
## Flags
| Flag | | Description |
|:---- |:--- |:----------- |
| `-h` | `--help` | Help for the `transpile` command |
| | `--now` | RFC3339Nano timestamp to use as `now()` time (default is current UTC time) |
## Examples
```sh
## Transpile an InfluxQL query that specifies the database,
## retention policy, and measurement.
influx transpile 'SELECT example-field FROM db.rp.measurement'
## Transpile InfluxQL query using default retention policy
influx transpile 'SELECT example-field FROM db..measurement'
```