Documentation function

Flux 0.123.0+

The function downloads and outputs an InfluxDB sample dataset.

import "influxdata/influxdb/sample"
  set: "airSensor"

Network bandwidth

Each execution of downloads the specified dataset from Amazon S3. If using InfluxDB Cloud or a hosted InfluxDB OSS instance, you may see additional network bandwidth costs when using this function. Approximate sample dataset sizes are listed below and in the output of sample.list().



(Required) InfluxDB sample dataset to download and output.

Valid values:

  • airSensor
  • birdMigration
  • noaa
  • usgs

Available InfluxDB sample datasets


Simulated office building air sensor data with temperature, humidity, and carbon monoxide metrics.

Size: ~600 KB • Updated: every 15m


2019 African bird migration data from the Movebank: Animal Tracking dataset. Contains geotemporal data between 2019-01-01 and 2019-12-31.

Size: ~1.2 MB • Updated: N/A


Latest observations from the NOAA National Data Buoy Center (NDBC). Contains only the most recent observations (no historical data). Data is updated approximately every 15m.

Size: ~1.3 MB • Updated: every 15m


USGS earthquake data from the last week. Contains geotemporal data collected from USGS seismic sensors around the world. Data is updated approximately every 15m.

Size: ~6 MB • Updated: every 15m


Return USGS earthquake data from the last week
import "influxdata/influxdb/sample" "usgs")
Download and write NOAA NDBC data to InfluxDB

Add the following as an [InfluxDB task]influxdb/v2.0/process-data/) to regularly collect the latest reported observations from the NOAA NDBC.

import "influxdata/influxdb/sample"

option task = {
  name: "Collect NOAA NDBC data"
  every: 15m,
} "noaa")
  |> to(
      org: "example-org",
      bucket: "example-bucket"

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.