-
Notifications
You must be signed in to change notification settings - Fork 485
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
Dynamic value alert article #15
base: master
Are you sure you want to change the base?
Conversation
SELECT | ||
CASE | ||
WHEN active_users_last_week < active_users_in_previous_3_weeks THEN 1 ELSE 0 END | ||
FROM ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need full example here to make it clear...
|
||
For example - you have a query that returns number of active users last week and another query that returns the active users in the last 3 weeks. | ||
|
||
You'll need to create an additional query to trigger an alert when the # of active users last week is lower than previous 3 weeks. The target is dynamic so in order to make it work with an alert, write the following query that examines and compares the two values using the 'CASE' clause (this works for PostgreSQL): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`CASE`
@@ -0,0 +1,16 @@ | |||
# Creating an Alert with a Target Value from Another Query |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "Trigger alert based on a dynamic target value"?
? |
@arikfr ? |
No description provided.