← Back
Databricks
Databricks SQL 2025.40 brings SQL scripting GA, parameter markers, and new sketch functions
· releasefeatureapi · docs.databricks.com ↗

Key Features

SQL Scripting Now Generally Available: Write procedural SQL logic directly in Databricks SQL with support for conditional statements, loops, local variables, and exception handling.

Expanded Parameter Marker Support: Named (:param) and unnamed (?) parameter markers are now supported in DDL statements, column type definitions, and comments, enabling broader SQL statement parameterization while protecting against SQL injection attacks.

IDENTIFIER Clause Enhancements: The IDENTIFIER clause for casting strings to SQL object names is now supported in nearly every context where identifiers are permitted, including column aliases (AS IDENTIFIER(:name)) and column definitions.

Literal String Coalescing: Sequential string literals now automatically coalesce across all contexts where string literals are allowed, simplifying comment and string handling.

New Functions

The release introduces three categories of new analytical functions:

  • BITMAP_AND_AGG: Complements the existing bitmap function library
  • Theta Sketch Functions: Seven new functions for approximate distinct counts and set operations using Datasketches, including theta_sketch_agg, theta_union_agg, theta_intersection_agg, and related utilities
  • KLL Sketch Functions: Eighteen new functions for building KLL sketches and computing approximate quantiles across bigint, double, and float types

Availability

Version 2025.40 began rolling out to the Current channel on February 23, 2026, after becoming available in Preview on February 11, 2026.