---
title: iox.from() function
description: iox.from() reads from the selected bucket and measurement in an IOx storage node.
url: https://docs.influxdata.com/flux/v0/stdlib/experimental/iox/from/
estimated_tokens: 888
product: Flux
version: v0
---

# iox.from() function

-   Flux 0.152.0+
-   View InfluxDB support

`iox.from()` is experimental and [subject to change at any time](/flux/v0/stdlib/experimental/#experimental-packages-are-subject-to-change).

`iox.from()` reads from the selected bucket and measurement in an IOx storage node.

This function creates a source that reads data from IOx. Output data is “pivoted” on the time column and includes columns for each returned tag and field per time value.

##### Function type signature

```js
(bucket: string, measurement: string) => stream[{A with _time: time}] where A: Record
```

For more information, see [Function type signatures](/flux/v0/function-type-signatures/).

## Parameters

### bucket

(Required) IOx bucket to read data from.

### measurement

(Required) Measurement to read data from.

## Examples

### Use Flux to query data from IOx

```js
import "experimental/iox"

iox.from(bucket: "example-bucket", measurement: "example-measurement")
    |> range(start: -1d)
    |> filter(fn: (r) => r._field == "example-field")
```

[inputs](/flux/v0/tags/inputs/)
