← Blog

Forecasting and anomaly detection belong in SQL, not a model backlog

Databricks Predictive AI Functions put forecasting, driver analysis, anomaly detection, and prediction into Beta SQL-native functions — so analysts and Genie users get model-backed answers without waiting on custom ML pipelines.

Data EngineeringLakehouseLLM Ops

Most “what happens next?” questions die in a backlog because answering them meant commissioning a model, not writing a query. That bottleneck is now a product decision, not a staffing constraint.

Databricks put Predictive AI Functions into Beta: SQL-native functions that let analysts and business users run forecasting, driver analysis, anomaly detection, and prediction without building or operating custom ML. The set includes an upgraded `ai_forecast` (transformer-based time-series foundation model with holiday support and external covariates) plus `ai_top_drivers`, `ai_detect_anomalies`, `ai_predict_value`, and `ai_predict_class`. Functions run in SQL, embed in dashboards, and surface through Genie in plain language — with Databricks maintaining the models centrally so quality stays consistent across surfaces. Databricks reports the new `ai_forecast` outperforming prior versions and leading cloud-warehouse forecast functions on fev-bench win rate.

What analytics and data platform leaders should require:

  • Prefer governed, SQL-callable predictive functions over one-off notebook models for recurring forecast and anomaly work
  • Keep Genie answers grounded in the same maintained models as dashboard and SQL paths
  • Measure time-to-trusted forecast — not how many custom models the data science team can stand up

When forecasting and anomaly detection live next to the warehouse metrics, the conversation moves from “can we build a model?” to “what decision does this change?”