Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support DateTime(TimeZone) for Annotations query #642

Open
Slach opened this issue Oct 17, 2024 · 0 comments
Open

Support DateTime(TimeZone) for Annotations query #642

Slach opened this issue Oct 17, 2024 · 0 comments
Labels
p3 Priority 3
Milestone

Comments

@Slach
Copy link
Collaborator

Slach commented Oct 17, 2024

current standart expected query is

SELECT 
       toUInt64(event_time) * 1000 AS time,
       (toUInt64(event_time) + (rand() % 600)) * 1000 AS time_end,
       if(rand() % 2 = 1, '[alert] title', '[annotation] title') AS title,
       if(rand() % 2 = 1, '[alert] description', '[annotation] description') AS text,
       arrayStringConcat(['test1', 'test2', service_name],',') AS tags
FROM default.test_grafana
WHERE
  rand() % 100 IN (1,50) AND
  toUInt64(event_time) >= $from AND toUInt64(event_time) < $to

Would be great to use event_time (which have DateTime('timezone')) as is without transformation to UInt64

@Slach Slach added this to the 3.3.0 milestone Oct 17, 2024
@svb-alt svb-alt added p2 Priority 2 p3 Priority 3 and removed p2 Priority 2 labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3 Priority 3
Projects
None yet
Development

No branches or pull requests

2 participants