This is not an official Google product.
This Data Studio lets users query datasets from InfluxDB v2 instances through the InfluxDB API.
Connect your InfluxDB to Google Data Studio and start pushing your data to in minutes.
To add the InfluxDB Connector in Data Studio you can use this link:
TBD: If you are already in Data Studio, click the "Create" button and select "Data Source". From there you can search for the InfluxDB Connector.
To access your InfluxDB, enter your Connection information:
InfluxDB URL
Token
Organization
Bucket
Measurement
Once you are connected, Data Studio will show you a list of all the fields available from your Measurement. This includes your Tag set, Field set and Timestamp.
After you have reviewed the fields, press "CREATE REPORT" button to create your report.
InfluxDB 1.8.0 introduced forward compatibility APIs for InfluxDB 2.0. This allow you to easily move from InfluxDB 1.x to InfluxDB 2.0 Cloud or open source.
Connector usage differences:
username:password
for an authentication token. Example: my-user:my-password
. Use an empty string (""
) if the server doesn't require authentication.-
as a value.When authorizing the connector, an OAuth consent screen may be presented to you with a warning "This app isn't verified". This is because the connector has requested authorization to make requests to an external API (E.g. to fetch data from the service you're connecting to).
This warning will no longer be display after the connector will include in Partner connectors gallery - see #2
The connector uses two types of query: schema query
and data query
.
Please, check that both of them correctly works with your dataset.
It is used to determine all your fields from configured Bucket
and Measurement
. The query is used only in the configuration.
import "influxdata/influxdb/v1"
bucket = "my-bucket"
measurement = "my-measurement"
start_range = duration(v: uint(v: 1970-01-01) - uint(v: now()))
v1.tagKeys(
bucket: bucket,
predicate: (r) => r._measurement == measurement,
start: start_range
) |> filter(fn: (r) => r._value != "_start" and r._value != "_stop" and r._value != "_measurement" and r._value != "_field")
|> yield(name: "tags")
from(bucket: bucket)
|> range(start: start_range)
|> filter(fn: (r) => r["_measurement"] == measurement)
|> keep(fn: (column) => column == "_field" or column == "_value")
|> unique(column: "_field")
|> yield(name: "fields")
You can optimize this query by Schema Query Range
configuration in first step of Data Studio connection wizard:
then the start_range
of query will be -6h
.
It is used for retrieve data from InfluxDB. The time-range is configured via Date Range Control Widget.
bucket = "my-bucket"
measurement = "my-measurement"
// Configure DataRange in Data Studio - https://support.google.com/datastudio/answer/6291067?hl=en
start = time(v: 1) // or start of specified Data Range
stop = now() // or end of specified Data Range
from(bucket: bucket)
|> range(start: start, stop: stop)
|> filter(fn: (r) => r["_measurement"] == measurement)
|> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")
Open Apps Script project in your browser:
$ yarn open
or
Push your local changes to Apps Script:
$ yarn push
Update the production deployment of connector:
$ yarn deploy
Bug reports and pull requests are welcome on GitHub at https://github.com/influxdata/influxdb-gds-connector.
The gem is available as open source under the terms of the MIT License.