[Trino] Support datasource variables in query specs

Open
#937 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go, typescript
Domain
api, backend, frontend

Research direction

Read the Trino plugin runtime, both query editors, the CUE schema, and the Go SDK; compare how the Prometheus plugin handles datasource variables. Trace variable resolution and datasource picker validation for both Trino query kinds. Done when $datasource is accepted in both editors and schemas and resolves to a Trino datasource at runtime.

Written by the indexing model from the issue text.

Description

enhancement

Follow-up from the review of #931.

Trino queries select their datasource with a fixed spec.datasource selector. A dashboard can't switch Trino clusters with a datasource variable ($datasource), as it can with Prometheus.

Proposal: support a variable in spec.datasource for both Trino query kinds the way the Prometheus plugin does: resolve the variable in the runtime, accept it in the query editors' datasource picker, and allow it in the CUE schema and Go SDK.

Dominant language
TypeScript
Stars
33
Forks
95
Avg merge
2d 12h
Merged PRs (30d)
40

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from perses/plugins

All issues in perses/plugins

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.