docs-v2/content/influxdb/v2/query-data/flux/sql.md

34 lines
921 B
Markdown

---
title: Query SQL data sources
seotitle: Query SQL data sources with InfluxDB
list_title: Query SQL data
description: >
The Flux `sql` package provides functions for working with SQL data sources.
Use `sql.from()` to query SQL databases like PostgreSQL, MySQL, Snowflake,
SQLite, Microsoft SQL Server, Amazon Athena, and Google BigQuery.
influxdb/v2/tags: [query, flux, sql]
menu:
influxdb_v2:
parent: Query with Flux
list_title: SQL data
weight: 220
aliases:
- /influxdb/v2/query-data/guides/sql/
related:
- /flux/v0/stdlib/sql/
list_code_example: |
```js
import "sql"
sql.from(
driverName: "postgres",
dataSourceName: "postgresql://user:password@localhost",
query: "SELECT * FROM example_table",
)
```
source: /shared/influxdb-v2/query-data/flux/sql.md
---
<!-- The content for this file is located at
// SOURCE content/shared/influxdb-v2/query-data/flux/sql.md -->