Set

Description

The SET command sets the value of a particular configuration variable (key). (Hive documentationarrow-up-right)

SET <key>=<value>
!set <option>=<value>
circle-info

Snowflake recommends not adding whitespace in the variable value assignment statement.

Sample Source Patterns

1. Set <option> with equivalence in Snowflake

The SET command is replaced by the !setarrow-up-right command.

Hive

SET hive.output.file.extension='csv';

SnowSQL (CLI Client)

!set output_format=csv

2. Set <option> without equivalence in Snowflake

Many of the variable configurations supported in Hive do not have their equivalent in Snowflake, for those scenarios, an EWI is added.

Hive

SnowSQL (CLI Client)

Known Issues

1. Predefined variables

The SET command only works for system variables, which may differ in quantity, name, or domain between Hivearrow-up-right and Snowflakearrow-up-right, so a review should be done on the variable being used within the command to find its correct Snowflake equivalence. To see the list of system variables in Oracle you can use the command SHOW ALL whereas in Snowflake you can use !optionsarrow-up-right.

  1. SPRKHVSQLXXXX: Snowflake does not support the COMMAND.

Last updated

Was this helpful?