docs-v2/content/influxdb/cloud/reference/flux/stdlib/experimental/csv/from.md

1.1 KiB

title description menu weight
csv.from() function The experimental `csv.from()` function retrieves annotated CSV from a URL.
influxdb_cloud_ref
name parent
csv.from * CSV-exp
401

The experimental csv.from() function retrieves annotated CSV from a URL.

{{% note %}} The experimental csv.from() function is an alternative to the standard csv.from() function. {{% /note %}}

Function type: Input

{{< keep-url >}}

import "experimental/csv"

csv.from(url: "http://localhost:8086/")

Parameters

url

The URL to retrieve annotated CSV from.

Data type: String

Examples

Query annotated CSV data from a remote URL
import "experimental/csv"

csv.from(url: "http://example.com/csv/example.csv")
  |> filter(fn: (r) => r._measurement == "example-measurement")

Function definition

package csv

import c "csv"
import "experimental/http"

from = (url) => c.from(csv: string(v: http.get(url: url).body))