SET (Databricks SQL)

Sets a Databricks SQL parameter at the session level, returns the value of an existing parameter or returns all parameters with value and meaning.

Syntax

SET
SET [ -v ]
SET parameter_key [ = parameter_value ]

Parameters

  • (none)

    Outputs the key and value of changed Databricks SQL parameters.

  • -v

    Outputs the key, value and meaning of existing Databricks SQL parameters.

  • parameter_key

    Returns the value of the specified Databricks SQL parameter.

  • parameter_key = parameter_value

    Sets the value for a given parameter. If an old value exists for a given parameter, then it gets overridden by the new value.

Examples

-- Set a property.
> SET ansi_mode = true;

-- List all configuration parameters with their value and description.
> SET -v;

-- List all configuration parameters with a set value for the current session.
> SET;

-- List the value of specified property key.
> SET ansi_mode;
  key        value
  ---------  -----
  ansi_mode  true