Skip to content

Commit c8d6294

Browse files
committed
Few edits
1 parent ced460f commit c8d6294

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

docusaurus/docs/how-to-guides/data-source-plugins/sql-requirements.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,32 @@
22
id: sql-requirements
33
title: Requirements to support SQL expressions
44
sidebar_label: Support SQL expressions
5-
description: Data source requirements to support SQL expressions.
5+
description: Requirements for data source plugins to support SQL expressions.
66
keywords:
77
- grafana
88
- plugin
99
- datasource
1010
- sql
1111
---
1212

13-
Follow this guide to understand the plugin requirements to support SQL expressions.
13+
Follow this guide to understand what your data source plugin requires to support SQL expressions.
1414

1515
:::caution
1616
Only plugins with a backend can support SQL expressions.
1717
:::
1818

19-
## Types of SQL responses
20-
21-
Requirements depend on the type of response for your query.
22-
23-
SQL expressions support two types of responses:
19+
Requirements depend on the type of response for your query. SQL expressions support two types of responses:
2420

2521
- [Tabular data response](#tabular-data-response)
2622
- [Labeled metric time data response](#labeled-metric-time-data-response)
2723

28-
### Tabular data response
24+
## Requirements for tabular data responses
2925

3026
A tabular data response is a single [data frame](../../key-concepts/data-frames) with no labels on any of the fields (columns). In short, a data frame that can be directly mapped to a SQL table.
3127

3228
Tabular data responses work out-of-the-box.
3329

34-
### Labeled metric time data response
30+
## Requirements for labeled metric time data responses
3531

3632
A labeled metric time data response contains data that meets the [data plane specification](https://grafana.com/developers/dataplane) and has the `Frame.Meta.Type` property set with the data plane `type`. It can be a timeseries or numeric.
3733

@@ -79,13 +75,13 @@ func main() {
7975
}
8076
```
8177

82-
#### What does the conversion look like?
78+
### What does the conversion look like?
8379

8480
This is how SQL expressions convert labeled data:
8581

8682
![SQL conversion](./images/sql-conversion.png)
8783

88-
## Instrument and test
84+
## Instrument and test your plugin
8985

9086
### Test your plugin's SQL compatibility
9187

@@ -102,6 +98,7 @@ Use the following metrics to check your data source's compatibility with SQL exp
10298
```
10399
sum(rate(grafana_sse_sql_command_input_count[$__rate_interval])) by (status,attempted_conversion,datasource_type,input_frame_type)`
104100
```
101+
105102
## Troubleshooting
106103

107104
### My data source sends labeled data without a frame type

0 commit comments

Comments
 (0)