https://github.com/toddtreece/grafana-datafusion-datasource
https://github.com/toddtreece/grafana-datafusion-datasource
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/toddtreece/grafana-datafusion-datasource
- Owner: toddtreece
- License: apache-2.0
- Created: 2021-06-08T12:22:16.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-30T19:42:00.000Z (over 4 years ago)
- Last Synced: 2025-02-08T20:29:10.124Z (over 1 year ago)
- Language: Rust
- Size: 813 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Grafana Arrow-DataFusion Data Source
This is the result of an experiment that uses [arrow-datafusion](https://github.com/apache/arrow-datafusion) as a datasource.
You will need the following dependencies installed:
* Docker
* node v14
* yarn
To install the rest of the dependencies, you can run:
```
make setup
```
Start grafana:
```
make start
```
## Example
You can find an example of implementing a datasource [here](crates/datafusion-test-datasource/pkg/github/releases.rs).

Example `releases` query:
```sql
SELECT
date_trunc('week', published_at) AS week,
count(name) AS release_count
FROM
datasource.github.releases
WHERE
owner = 'grafana'
AND repo = 'tempo'
GROUP BY week
ORDER BY week ASC
```
Example `pull_requests` query:
```sql
SELECT
date_trunc('week', created_at) AS week,
count(*) AS pr_count
FROM
datasource.github.pull_requests
WHERE
owner = 'grafana'
AND repo = 'tempo'
GROUP BY week
ORDER BY week ASC
```