The Trino datasource allows to query and visualize Trino data from within Grafana.
Drop this into Grafana's plugins
directory. To run it locally without installing Grafana, run it in a Docker container using:
docker run -d -p 3000:3000 \
-v "$(pwd):/var/lib/grafana/plugins/trino" \
-e "GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=trino-datasource" \
--name=grafana \
grafana/grafana-oss
- Authentication:
- HTTP Basic
- TLS client authentication
- Raw SQL editor only, no query builder yet
- Macros
Plugin supports the following marcos:
$timeFrom($column)
- replaced with the lower boundary of the currently selected "Time Range" as a timestamp.$timeTo($column)
- replaced with the upper boundary of the currently selected "Time Range" as a timestamp.$timeGroup($column, $interval)
- replaced with an expression that rounds values of a column to the selected "Group by a time interval" value.$dateFilter($column)
- replaced with a range condition for the currently selected "Time Range" as dates, on a column passed as the $column argument. Use it in queries or query variables as...WHERE $dateFilter($column)...
or...WHERE $dateFilter(created_at)....
.$timeFilter($column)
- replaced with a range condition for the currently selected "Time Range" as timestamps, on a column passed as the $column argument.$unixEpochFilter($column)
- replaced with a range condition for the currently selected "Time Range", on a column passed as the $column argument.$parseTime
- parse a timestamp string using the default or specified format.
A description of macros is available by typing their names in Raw Editor
Template variable values are only quoted when the template variable is a multi-value
.
If the variable is a multi-value variable then use the IN
comparison operator
rather than =
to match against multiple values.
Example with a template variable named hostname:
SELECT
atimestamp as time,
aint as value
FROM table
WHERE $__timeFilter(atimestamp) and hostname in($hostname)
ORDER BY atimestamp ASC
Grafana automatically creates a quoted, comma-separated string for multi-value variables.
For example: if server01
and server02
are selected then it will be formatted as:
'server01', 'server02'
. To disable quoting, use the csv
formatting option for variables:
${servers:csv}
Read more about variable formatting options in the Variables documentation.
If you have any idea for an improvement or found a bug do not hesitate to open an issue or submit a pull request. We will appreciate any help from the community.
See DEVELOPMENT.md for development instructions.
Apache 2.0 License, please see LICENSE for details.
grafana-trino's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.