Differences between sfsql and SnowSQL¶
SnowSQL (snowsql
) provides many improvements and enhancements over the sfsql
command line interface, including more intuitive option and command names. This topic lists differences in usage between the two
command line clients.
Command line options¶
Many of the command line options in SnowSQL are backward-compatible with the corresponding options in sfsql
; however, there are key differences, as described in the following table:
Option |
|
SnowSQL ( |
---|---|---|
Account identifier |
|
|
User name |
|
|
Password |
|
N/A (use SNOWSQL_PWD environment variable) |
Prompt for password |
N/A |
|
Database |
|
|
Schema |
|
|
Warehouse |
|
|
Role |
|
|
Host name |
|
|
Port number |
|
|
MFA passcode |
|
|
MFA passcode in password |
|
|
Explain a SQL |
|
N/A |
Explain a SQL in dot form |
|
N/A |
Run a SQL file |
|
|
Stop on error |
N/A |
|
Exit on error |
|
|
Authenticator |
|
|
Use a user-defined connection |
N/A |
|
Trace level |
|
|
Show CLI version |
N/A |
|
Use specified config |
N/A |
|
Set options |
N/A |
|
Set variables |
N/A |
|
Help |
|
|
Commands¶
For commands, the key difference is all commands in SnowSQL must be prefixed with an exclamation point (e.g. !exit
). In addition, the names of some of the commands have changed.
Command |
|
SnowSQL ( |
---|---|---|
Load and run a SQL file |
|
|
Print a message |
|
|
Set an option |
N/A |
|
Show all options |
N/A |
|
Set a variable |
|
|
Unset a variable |
|
N/A |
Show all variables |
N/A |
|
Connect and start a new session |
|
|
Exit the current session |
N/A |
|
Spool output into a file |
|
|
Quit the CLI |
|
|
Executes a system command |
|
|
Help |
|
|
Special characters¶
The following characters have special meaning in the two clients:
Usage |
|
SnowSQL ( |
---|---|---|
Prefix for variable names |
|
|
Setting off comments in code |
|
|