How dose filesystem service initialize?

LuoS
Wed, 09 Jun 2021 05:58:52 +0000
InfluxDB 2

When I use the “csv.from()”, it’s an error: error in csv.from(): csv.from() failed to read file: filesystem service is uninitialized.
How can I deal with it?

import “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(file: “/home/ls/Influx_example/noaa.csv”, mode:“annotations”)
|> relativeToNow()
|> to(bucket: “noaa”, org: “x”)

7 posts - 3 participants