Back to Influxdb

sql.from() function

content/flux/v0/stdlib/sql/from.md

latest1.4 KB
Original Source
<!------------------------------------------------------------------------------ IMPORTANT: This page was generated from comments in the Flux source code. Any edits made directly to this page will be overwritten the next time the documentation is generated. To make updates to this documentation, update the function comments above the function definition in the Flux source code: https://github.com/influxdata/flux/blob/master/stdlib/sql/sql.flux#L142-L142 Contributing to Flux: https://github.com/influxdata/flux#contributing Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md ------------------------------------------------------------------------------->

sql.from() retrieves data from a SQL data source.

Function type signature
js
(dataSourceName: string, driverName: string, query: string) => stream[A]

{{% caption %}} For more information, see Function type signatures. {{% /caption %}}

Parameters

driverName

({{< req >}}) Driver to use to connect to the SQL database.

Supported drivers:

  • awsathena
  • bigquery
  • hdb
  • mysql
  • postgres
  • snowflake
  • sqlite3 (Does not work with InfluxDB OSS or InfluxDB Cloud)
  • sqlserver
  • vertica, vertigo

dataSourceName

({{< req >}}) Data source name (DNS) or connection string used to connect to the SQL database.

query

({{< req >}}) Query to run against the SQL database.