排程查詢Schedule a query

重要

這項功能處於公開預覽狀態This feature is in Public Preview. 請連絡 Azure Databricks 代表以要求存取權。Contact your Azure Databricks representative to request access.

您可以使用已排程的查詢執行,讓儀表板保持更新或電源,以進行例行的警示。You can use scheduled query executions to keep your dashboards updated or to power routine alerts. 根據預設,您的查詢沒有排程。By default, your queries do not have a schedule. 在 [查詢編輯器] 的左下角,您會看到 [排程] 區域:In the bottom left corner of the query editor you’ll see the schedule area:

重新整理設定Refresh settings

若要設定排程,請按一下 [ 永不 ],以允許的排程間隔開啟選擇器。To set the schedule, click Never to open a picker with allowed schedule intervals.

排程間隔Schedule interval

設定排程,然後按一下 [確定]Set the schedule and click OK. 設定排程之後,您的查詢會自動執行。Once you set a schedule your query will run automatically.

注意

當您將查詢排程在某一天的特定時間執行時,SQL 分析會使用您電腦的當地時區,將您的選取專案轉換為 UTC。When you schedule queries to run at a certain time-of-day, SQL Analytics converts your selection to UTC using your computer’s local timezone. 這表示,如果您想要在特定時間(UTC)執行查詢,則必須依據您的本機位移來調整選擇器。This means if you want a query to run at a certain time in UTC, you must adjust the picker by your local offset.

例如,如果您想要每天以 utc 執行查詢, 00:00 但目前的時區 CDT (UTC-5) ,您應該進入排程器 19:00For example, if you want a query to execute at 00:00 UTC each day but your current timezone is CDT (UTC-5), you should enter 19:00 into the scheduler. [UTC] 值會顯示在您的選取範圍右邊,以協助確認您的數學。The UTC value is displayed to the right of your selection to help confirm your math.

重要

不支援排程使用 參數 的查詢。Scheduling queries that use parameters is not supported.

排程的查詢失敗報告Scheduled query failure reports

如果有一或多個查詢失敗,則 SQL 分析電子郵件會查詢每小時一次的擁有者。If one or more queries fails, SQL Analytics emails query owners once per hour. 這些電子郵件會繼續進行,直到沒有其他失敗為止。These emails continue until there are no more failures. 失敗報表電子郵件會在與實際查詢排程無關的進程上執行。Failure report emails run on an independent process from the actual query schedules. 在 SQL 分析傳送失敗報告之前,最多可能需要一小時的時間才能執行查詢。It may take up to an hour after a failed query execution before SQL Analytics sends the failure report.

若要切換失敗報告,請參閱 一般設定To toggle failure reports, see General settings.