Course: The InfluxDB Basics 101 lesson Introduction to InfluxDB unable to run Flux query

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!

Hello @nickdavies92,
We’re in the process for creating a new course. InfluxDB Cloud powered by IOx doesn’t allow you to query with Flux if you’ve created a new account.
You can query with SQL instead. I apologize for the confusion.