add note and examples to influx transpile command, resolves #1156

pull/1176/head
Scott Anderson 2020-07-06 10:09:49 -06:00
parent d92f9e497e
commit 78c787a70b
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 provided InfluxQL query must contain a database and measurement and must be valid InfluxQL.
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'
```