I’m following along with the Introduction to InfluxDB and I keep getting an error when trying to run the Flux code.
import "experimental/csv"
relativeToNow = (tables=<-) => tables
|> elapsed()
|> sort(columns: ["_time"], desc: true)
|> cumulativeSum(columns: ["elapsed"])
|> map(fn: (r) => ({r with _time: time(v: int(v: now()) - r.elapsed * 1000000000)}))
csv.from(url: "https://influx-testdata.s3.amazonaws.com/noaa.csv")
|> relativeToNow()
|> limit(n: 100)
|> to(bucket: "noaa")
This is the error
executing query: failed to create Flight record reader: arrow/flight: could not create flight reader: arrow/ipc: could not read schema from stream: arrow/ipc: could not read message schema: rpc error: code = InvalidArgument desc = Error while planning query: SQL error: ParserError("Expected end of statement, found: import")
Any help would be appreciated!