I can't query from the CLI tool but can connect and get a list of buckets

I’ve posted screen shots on this reddit question: Reddit - Dive into anything

.\influx bucket list works as expected and gives this output:

PS C:\Development\influx> .\influx bucket list
ID                      Name            Retention       Shard group duration    Organization ID         Schema Type
9506194c1d25d186        ESP32Logger     720h0m0s        n/a                     c8401321ff2716be        implicit
82b3ad82f0f7b54f        _monitoring     168h0m0s        n/a                     c8401321ff2716be        implicit
9349c6636671e5b3        _tasks          72h0m0s         n/a                     c8401321ff2716be        implicit

But when I use this query command:

.\influx query 'from(bucket:"ESP32Logger") |> range(start:-1h)'

I get this error:

Error: failed to execute query: 400 Bad Request: error @1:13-1:24: undefined identifier ESP32Logger


It will not work at CLI. you have to use that query in UI–>Explore and script editor


Thanks. Is that because I’m using the serverless cloud (IOx) version?


In any version, flux queries will work in UI and not in CLI