SET
描述
SET 命令设置一个属性,返回现有属性的值,或返回所有具有值和含义的 SQLConf 属性。
语法
SET
SET [ -v ]
SET property_key[ = property_value ]
参数
-
-v
输出现有 SQLConf 属性的键、值和含义。
-
property_key
返回指定属性键的值。
-
property_key=property_value
为给定的属性键设置值。 如果给定的属性键存在旧值,则会被新值覆盖。
示例
-- Set a property.
SET spark.sql.variable.substitute=false;
-- List all SQLConf properties with value and meaning.
SET -v;
-- List all SQLConf properties with value for current session.
SET;
-- List the value of specified property key.
SET spark.sql.variable.substitute;
+-----------------------------+-----+
| key|value|
+-----------------------------+-----+
|spark.sql.variable.substitute|false|
+-----------------------------+-----+