bf7dddaec5
Closes: https://github.com/influxdata/influxdb/issues/18947 https://github.com/influxdata/influxdb/issues/20852 Similarly to 2.x, the flux CLI now only supports the -execute argument or commands on stdin. Examples: ``` ➜ echo 'import "influxdata/influxdb/v1" v1.databases()' | ./influx -type flux Result: _result Table: keys: [organizationID] organizationID:string databaseName:string retentionPolicy:string retentionPeriod:int default:bool bucketId:string ---------------------- ---------------------- ---------------------- -------------------------- ------------ ---------------------- _internal monitor 604800000000000 true telegraf autogen 0 true db autogen 0 true ➜ ./influx -type flux -execute 'import "influxdata/influxdb/v1" v1.databases()' Result: _result Table: keys: [organizationID] organizationID:string databaseName:string retentionPolicy:string retentionPeriod:int default:bool bucketId:string ---------------------- ---------------------- ---------------------- -------------------------- ------------ ---------------------- _internal monitor 604800000000000 true telegraf autogen 0 true db autogen 0 true ➜ ./influx -type flux -execute 'import "influxdata/influxdb/v1"' Error (500): error in query specification while starting program: this Flux script returns no streaming data. Consider adding a "yield" or invoking streaming functions directly, without performing an assignment ``` Note that tty input is explicitly forbidden, unlike 2.x: ``` ➜ ./influx -type flux Connected to http://localhost:8086 version unknown InfluxDB shell version: unknown Interactive flux is not supported. Provide your flux script via stdin or the -execute argument. ``` |
||
---|---|---|
.. | ||
cli | ||
main.go |