grafana / grafana/redshift-datasource
Add timeGroup macro without alias
- Dominant language
- TypeScript
- Stars
- 19
- Forks
- 10
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 3
Description
### What happened?
I am using grafana with a Amazon Redshift sql datesource.
The query
`SELECT $__timeGroupAlias(CURRENT_DATE, $__interval)`
does not work as `$__timeGroupAlias` seems to be unknown. (error executing query: ERROR: syntax error at or near \"$\"
Position: 8)
The query
`SELECT $__timeGroup(CURRENT_DATE, $__interval)`
results in
`SELECT floor(extract(epoch from CURRENT_DATE)/300)*300 AS \"time\"` which is not correct as according to the documentation it should not add the "time" alias.
### What did you expect to happen?
- `$__timeGroupAlias` should return what is currently returned by `$__timeGroup`
- `$__timeGroup` should not add an alias
### Did this work before?
I have not tested in with older Grafana versions.
### How do we reproduce it?
Use queries.
### Is the bug inside a dashboard panel?
_No response_
### Environment (with versions)?
Grafana: v11.2.0-73451 (a0268a9ad2)
OS: Mac
Browser: Brave
### Grafana platform?
I use Grafana Cloud
### Datasource(s)?
Amazon Redshift
Contributor guide
Assessment
This issue has not been assessed yet.