Skip to main content

Configuration parameters

Applies to: check marked yes Databricks SQL

A configuration parameter is a setting which affects the behavior of Databricks SQL outside of the specified SQL syntax.

The effective value of a configuration parameter is derived from the different levels where it is set.

Configuration parameter scopes

  • System

    The system value is the default value used by Databricks SQL if there is no override.

  • Global

    An administrator can override the system default value for a parameter using the Configure SQL parameters or SQL Warehouse API. This value is then the initial value seen by any newly established session moving forward.

  • Session

    A user can override a configuration parameter temporarily within a session scope by using the SET statement. The setting remains in effect for the duration of the session unless the user overrides is again with a SET statement or RESET.

Supported configuration parameters

The following is a list of the supported configuration parameters that you can set in Databricks SQL, their system defaults, and at which levels they can be set. Databricks SQL does not support setting Spark configurations that aren’t listed.

Parameter nameDescriptionSystem defaultGlobally settableSession settable
ANSI_MODEAllows you to disable strict ANSI SQL behavior for certain functions and casting rules.TRUEYesYes
LEGACY_TIME_PARSER_POLICYControls how date and timestamps are parsed and formatted.EXCEPTIONYesYes
MAX_FILE_PARTITION_BYTESThe maximum number of bytes to pack into a single partition when reading from file based sources.128mNoYes
READ_ONLY_EXTERNAL_METASTOREControls whether an external metastore is treated as read-only.FALSEYesNo
STATEMENT_TIMEOUTSets a SQL statement timeout in seconds172800 secondsYesYes
TIMEZONESets the local time zone.UTCYesYes
USE_CACHED_RESULTControls whether Databricks SQL caches and reuses results whenever possible.TRUENoYes

The ANSI_MODE system default value is FALSE for accounts added before Databricks SQL 2022.35.