---
title: Query data sources
description: Query different data sources with Flux including InfluxDB, SQL databases, CSV, and Prometheus.
url: https://docs.influxdata.com/flux/v0/query-data/
estimated_tokens: 1522
product: Flux
version: v0
---

# Query data sources

Query the following data sources with Flux:

-   [InfluxDB](#influxdb)
-   [SQL databases](#sql-databases)
-   [CSV](#csv)
-   [Google Cloud Bigtable](#google-cloud-bigtable)

### [InfluxDB](/flux/v0/query-data/influxdb/)

Use [`from()`](/flux/v0/stdlib/influxdata/influxdb/from/) and [`range`](/flux/v0/stdlib/universe/range/) to query data from InfluxDB using Flux.

```js
from(bucket: "example-bucket")
  |> range(start: -1h)
```

[Read more](/flux/v0/query-data/influxdb/)

### [SQL databases](/flux/v0/query-data/sql/)

Use [`sql.from()`](/flux/v0/stdlib/sql/from/) to query SQL databases with Flux.

```js
import "sql"

sql.from(
    driverName: "postgres",
    dataSourceName: "postgresql://user:password@localhost",
    query:"SELECT * FROM TestTable",
)
```

[Read more](/flux/v0/query-data/sql/)

### [CSV](/flux/v0/query-data/csv/)

Use [`csv.from()`](/flux/v0/stdlib/csv/from/) and [experimental `csv.from()`](/flux/v0/stdlib/experimental/csv/from/) to query CSV data with Flux. Query a CSV string, CSV file, or CSV data from a URL.

```js
import "csv"

csvData =
    "
#group,false,false,true,true,true,false,false
#datatype,string,long,string,string,string,long,double
#default,_result,,,,,,
,result,table,dataset,metric,sensorID,timestamp,value
,,0,air-sensors,humidity,TLM0100,1627049400000000000,34.79
,,0,air-sensors,humidity,TLM0100,1627049700000000000,34.65
,,1,air-sensors,humidity,TLM0200,1627049400000000000,35.64
,,1,air-sensors,humidity,TLM0200,1627049700000000000,35.67
"

csv.from(csv: csvData)
```

[Read more](/flux/v0/query-data/csv/)

### [Google Cloud Bigtable](/flux/v0/query-data/bigtable/)

Use [`bigtable.from`](/flux/v0/stdlib/experimental/bigtable/from) to query [Google Cloud Bigtable](https://cloud.google.com/bigtable/) with Flux.

```js
import "experimental/bigtable"

bigtable.from(url: "http://example.com/metrics")
```

[Read more](/flux/v0/query-data/bigtable/)
