쿼리 기반 또는 Look 연결 대시보드 타일의 결과가 지정된 기준점을 충족하거나 초과할 때마다 이메일이나 Slack 알림을 전송하는 알림을 만들 수 있습니다. 시계열 데이터를 기반으로 알림을 설정하는 것은 다른 데이터 유형을 기반으로 알림을 설정하는 것과 다릅니다.
시계열 데이터의 경우 알림 조건은 전체 결과 세트를 기반으로 하는 것이 아닌 시계열의 특정 행 비교를 기반으로 합니다. 이 방법은 시계열 데이터를 사용하므로 사용자는 변경 기준, 증가 및 감소와 같은 다른 데이터 유형에 사용할 수 없는 추가 알림 조건 옵션을 사용하여 시계열 두 행의 데이터를 비교하는 추가 작업을 수행할 수 있습니다.
이러한 비교 조건을 시계열 데이터에 사용할 때 알림 쿼리는 최신 데이터 행을 이전 행과 비교합니다. 시계열에서 현재 위치를 추적하기 위해 즉, 알림 조건을 이전에 알림 쿼리가 실행된 시점에 없었던 데이터만 기반으로 하기 위해 Looker는 알림 쿼리를 실행될 때마다 최신 시계열 데이터 값을 유지해야 합니다.
이 페이지에서는 시계열 데이터를 사용하는 알림 조건을 선택할 때 고려해야 하는 두 가지 중요한 사례를 설명합니다.
예를 들어 시계열 간격은 매일(데이터는 일별로 집계됨)이지만 알림은 시간 단위 빈도로 설정되어 있습니다.
두 경우 모두 시계열 행(시계열 간격) 간의 가장 짧은 간격과 알림 쿼리 실행 빈도(빈도) 간의 관계에 따라 달라집니다. 빈도는 예약된 알림 쿼리 간의 시간이며 알림 생성자가 빈도를 설정합니다.
이상적으로는 시계열 간격과 빈도가 동일합니다. 하지만 항상 그런 것은 아닙니다. 매일 밤 데이터를 시간별로 로드하도록 ETL 작업을 구성했거나 어떤 이유로 쿼리가 실패한 경우 이러한 간격이 동기화되지 않으면 알림 쿼리가 작동하는 방식을 이해하는 것이 중요합니다.
알림 확인
알림 쿼리는 시계열 데이터의 최신 행을 확인하여 다음 중 하나가 참인지 여부를 확인합니다.
현재 시계열 값이 이전 알림 확인의 최신 시계열 값보다 더 최신인 경우
현재 시계열 값이 이전 알림 확인과 동일한 시계열 값이 있는 경우에도 시계열의 최신 시계열 값인 경우
알림 쿼리가 처음 실행되면 Looker에서 더 이상 전체 결과 세트를 평가하지 않습니다. 대신 Looker는 이러한 결과를 이전 데이터로 고려하여 알림이 생성되고 초기 알림 쿼리가 실행된 후에 발생하는 변경사항만 찾습니다.
사례 1: 시계열 간격이 빈도보다 짧음
이 예시에서는 사용자가 매일 시간별 판매가 목표보다 큰지 여부를 확인하려고 합니다.
시계열 간격 = 시간별 빈도 = 매일
이 방법은 1시간을 초과하는 빈도로 시간별 데이터를 확인합니다. 알림은 이전 알림 간격에서 확인되지 않은 모든 새 시계열 행을 확인합니다. 시간별 데이터와 일일 알림 확인이 있는 경우 알림은 매일 행 24개를 확인합니다. 각 행은 지정된 경고 조건을 기준으로 확인되며 모든 행이 조건을 충족하면 이메일이 전송됩니다.
2019년 5월 25일 오전 9시에 실행
시계열 값
측정 값
2019년 5월 25일 오전 8시
200
< 알림 확인
2019년 5월 25일 오전 9시
250
< 알림 확인
2019년 5월 25일 오전 11시에 실행
시계열 값
측정 값
2019년 5월 25일 오전 8시
200
2019년 5월 25일 오전 9시
250
< 이전 알림
2019년 5월 25일 오전 10시
300
< 알림 확인
2019년 5월 25일 오전 11시
300
< 알림 확인
2019년 5월 25일 정오에 실행(새 데이터 없음)
시계열 값
측정 값
2019년 5월 25일 오전 8시
200
2019년 5월 25일 오전 9시
250
2019년 5월 25일 오전 10시
300
< 이전 알림
2019년 5월 25일 오전 11시
300
< 알림 확인
사례 2: 시계열 간격이 빈도보다 김
이 예시에서는 사용자가 현재 누적된 판매 총계가 목표보다 큰지 시간별로 확인하려고 합니다.
시계열 간격 = 일일 빈도 = 시간별
이 방법은 하루 동안 여러 차례 날짜로 집계된 데이터를 확인합니다. 일일 판매 합계가 200 이상이면 알림을 보내도록 설정했다고 가정해 보겠습니다. 판매 합계는 하루 동안 누적되기 때문에 각 알림 검사 중에 증가합니다. 따라서 Looker는 이전 알림을 트리거한 값과 최신 시계열 값을 지속적으로 다시 확인합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-31(UTC)"],[],[],null,["# Setting alerts based on time series data\n\nYou can create an [alert](/looker/docs/alerts-overview) to send an email or a Slack notification whenever the results from a query-based or Look-linked dashboard tile meet or exceed a specified threshold. Setting an alert based on time series data differs from setting an alert based on other data types.\n\n\nFor time series data, the alert condition is based on comparing specific rows in the series rather than being based on the complete result set. Working this way with time series data lets users perform additional operations that [compare data](/looker/docs/creating-alerts#setting_alert_conditions) from two rows in the series using additional alert condition options that are not available to other data types, such as **changes by** , **increases by** , and **decreases by**.\n\n\nWhen using these comparison conditions with time series data, the alert query compares the latest row of data with its previous row. To keep track of where you are in the time series --- in order to base alert conditions only on data that wasn't there the previous time the alert query was run --- Looker must persist the value of the latest time series data every time it runs the alert query.\n\n\nThis page describes two important cases to consider when you choose alert conditions that use time series data:\n\n1. [The alert conditions tell Looker to check the data for updates less frequently than the data is updated.](#interval_is_shorter)\n - For example, the time series interval is hourly (the data is aggregated by the hour), but an alert is set for a daily frequency.\n2. [The alert conditions tell Looker to check the data for updates more frequently than the data is updated.](#interval_is_longer)\n - For example, the time series interval is daily (the data is aggregated by day), but an alert is set for an hourly frequency.\n\nBoth cases depend on the relationship between the shortest interval between the time series rows (time series interval) and [how often the alert query is run (frequency)](/looker/docs/creating-alerts#setting_alert_frequency). The frequency is the amount of time between scheduled alert queries, and is set by the alert creator.\n\n\u003cbr /\u003e\n\n\u003e Ideally, the time series interval and frequency are the same; however, that is not always the case. If an ETL job is configured to load hourly data every night, or a query fails for some reason, it's important to understand how alert queries work when these intervals are not synchronized.\n\nAlert checking\n--------------\n\n\nAlert queries will check the latest row of time series data to determine whether either of the following is true:\n\n- If the current time series value is more recent than the most recent time series value from the previous alert check\n- If the current time series value is the most recent time series value in the time series, even if it has the same time series value as from the previous alert check\n\n\nThe first time an alert query is run, Looker will no longer evaluate the entire result set. Instead, Looker will consider those results as historical data and only look for changes that occur after the alert is created and the initial alert query is run.\n\nCase 1: The time series interval is shorter than the frequency\n--------------------------------------------------------------\n\n\nIn this example, a user wants to check daily whether the hourly sales are greater than the goal:\n\n\n**Time series interval = hourly Frequency = daily**\n\n\nThis approach involves checking hourly data with a frequency that is greater than an hour. The alert will check every new time series row that wasn't checked in the previous alert interval. In the case where you have hourly data and a daily alert check, the alert will check 24 rows every day. Each row is checked against the specified alert condition, and if *any* row fulfills the condition, an email will be sent.\n\n### Run 5/25/19 9:00 AM\n\n### Run 5/25/19 11:00 AM\n\n### Run 5/25/19 12:00 PM (no new data)\n\nCase 2: The time series interval is longer than the frequency\n-------------------------------------------------------------\n\n\nIn this example, a user wants to check hourly whether today's cumulative sales totals are greater than\nthe goal:\n\n\n**Time series interval = daily Frequency = hourly**\n\n\nThis approach involves checking data that is aggregated by **date** many times throughout\nthe day. Let's say that you've set up an alert to notify you if the daily sales\ntotal equals or exceeds 200. The sales total is increasing during each alert\ncheck as it accumulates throughout the day, so Looker continually rechecks the\nlatest time series value against the value that triggered the previous alert.\n\n### Run 5/25/19 9:00 AM\n\n### Run 5/25/19 10:00 AM\n\n### Run 5/25/19 11:00 AM"]]