SET

Description

The SET command sets a property, returns the value of an existing property or returns all SQLConf properties with value and meaning.

Syntax

  1. SET
  2. SET [ -v ]
  3. SET property_key[ = property_value ]

Parameters

  • -v

    Outputs the key, value and meaning of existing SQLConf properties.

  • property_key

    Returns the value of specified property key.

  • property_key=property_value

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

Examples

  1. -- Set a property.
  2. SET spark.sql.variable.substitute=false;
  3. -- List all SQLConf properties with value and meaning.
  4. SET -v;
  5. -- List all SQLConf properties with value for current session.
  6. SET;
  7. -- List the value of specified property key.
  8. SET spark.sql.variable.substitute;
  9. +-----------------------------+-----+
  10. | key|value|
  11. +-----------------------------+-----+
  12. |spark.sql.variable.substitute|false|
  13. +-----------------------------+-----+