Merge pull request #1176 from influxdata/cli-transpile-examples
Add note and examples to 'influx transpile' commandpull/1180/head
commit
72ea5de34e
|
@ -19,8 +19,23 @@ and includes absolute time ranges using the provided `--now` time.
|
||||||
influx transpile [InfluxQL query] [flags]
|
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
|
## Flags
|
||||||
| Flag | | Description |
|
| Flag | | Description |
|
||||||
|:---- |:--- |:----------- |
|
|:---- |:--- |:----------- |
|
||||||
| `-h` | `--help` | Help for the `transpile` command |
|
| `-h` | `--help` | Help for the `transpile` command |
|
||||||
| | `--now` | RFC3339Nano timestamp to use as `now()` time (default is current UTC time) |
|
| | `--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'
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue