Connect to a Databricks data source
The Databricks data source enables you to query and visualize Databricks data within Amazon Managed Grafana. It includes a SQL editor to format and color code your queries.
Note
This data source is for Grafana Enterprise only. For more information, see Manage access to Enterprise plugins.
Additionally, in workspaces that support version 9 or newer, this data source might require you to install the appropriate plugin. For more information, see Extend your workspace with plugins.
Adding a Databricks data source
Follow these steps to add a Databricks data source in the Grafana console.
To add a Databricks data source
-
Open the side menu by choosing the Grafana icon in the top header.
-
In the side menu, under the Dashboards link, select Data Sources.
Note
If you don't see the Data Sources link, you do not have the
Admin
role for Grafana. -
Choose the + Add data source button in the top header.
-
Select Databricks from the Type dropdown list.
Note
If you don't see the Databricks option, and need it, you must upgrade to Grafana Enterprise.
-
Choose the options to connect to and edit your data.
Notes when using the Databricks data source
Time series
Time series visualizations are selectable when you add a
datetime
field to your query. This field will be used as the
timestamp for the series. If the field does not include a specific time zone,
Grafana will assume that the time is UTC.
Multi-line time series
To create a multi-line time series visualization, the query must include at least three fields in the following order.
-
A
datetime
field with an alias oftime
. -
A value to
GROUP BY
. -
One or more metric values to visualize.
The following is an example of a query that will return multi-line time series options.
SELECT log_time AS time, machine_group, avg(disk_free) AS avg_disk_free FROM mgbench.logs1 GROUP BY machine_group, log_time ORDER BY log_time