计划查询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 Analytics 会使用计算机的本地时区将所选内容转换为 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:00 到计划程序中。For 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 Analytics 电子邮件查询所有者每小时一次。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 Analytics 才会发送失败报告。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.