Saving bucket data to csv

InfluxDV v2.7.10
running in docker

I am trying to export all data from a bucket to an annotated csv file. I’m sing the following query at the CLI:

influx query ‘from(bucket: “speedtest”) |> range(start: -300d, stop: now())’ --raw > st20241005.csv

It completes without error, albeit silently (that alone worries me), returning to the # prompt.

I cannot find the st20241005.csv file anywhere in the file system, starting at root.

How can I check the query completes and how can I check if a file is actually saved?
Thanks,
Ric

Well, it seems I wasn’t far off. The command just needed double quotes around the CSV filename and the file was created.

The file was saved to:
/var/lib/docker/overlay2/e0f90d754d64a352556729f08dc53978bbe1a03f91ba1b9d9b1f5bbb60ff65d2/diff

Usefully it contains the enhanced info in the start of the file, but then I noticed the data apears in “chunks”, each chunk beginning with its own headers (identical to all the other “chunks”), which means importing a sngle, flat csv from speedtest is going to be a challenge.

If it were mysql/mariadb, then the task would be easy but InfluxDB seems to have a logic all its own… The data is sourced from speeedtest-tracker GitHub), so it looks like I shall have to get back to them to see if their csv export is in any way compatible with the csv input requirements of InfluxDB2.
Ric

@ricm Thanks so much for sharing your solution with the community! I appreciate it!