Forrest logo
tool overview
On this page you find all important commands for the CLI tool snowsql. If the command you are looking for is missing please ask our AI.

snowsql

SnowSQL is a command-line tool developed by Snowflake Inc. for interacting with the Snowflake cloud data platform. It provides a lightweight and interactive way to execute SQL queries, manage and monitor Snowflake accounts, and perform various administrative tasks.

  1. SnowSQL is written in Python and can be installed on various operating systems, including Windows, macOS, and Linux.

  2. It offers a familiar SQL interface, allowing users to execute queries against Snowflake databases using standard SQL syntax.

  3. SnowSQL supports tab-completion, history recall, and customizable input and output formats, making it easy to navigate and interact with data.

  4. It integrates with various command-line tools, such as jq, grep, and awk, enabling users to process and transform query results.

  5. It facilitates secure access by supporting various authentication methods, including username/password, SSO, and multi-factor authentication.

  6. SnowSQL provides options for configuring connection parameters, such as the account URL, warehouse, database, and schema, allowing users to easily switch between different environments.

  7. It supports scripting and automation through the ability to execute SQL scripts from files or standard input.

  8. SnowSQL allows users to save and manage connection and configuration settings as profiles, reducing the need for repetitive configuration.

  9. It offers advanced features like query history tracking, query performance profiling, and resource monitoring to help optimize query performance and troubleshoot issues.

  10. SnowSQL is continuously updated and improved by Snowflake Inc., ensuring compatibility with the latest Snowflake platform features and capabilities.

List of commands for snowsql:

  • snowsql:tldr:17372 snowsql: Execute commands from a specific file on the default connection.
    $ snowsql --filename ${filename-sql}
    try on your machine
    explain this command
  • snowsql:tldr:43fb3 snowsql: Connect to an instance specified by a specific configuration file (defaults to `~/.snowsql/config`).
    $ snowsql --config ${path-to-configuration_file}
    try on your machine
    explain this command
  • snowsql:tldr:c1241 snowsql: Connect to a specific instance at (password can be provided in prompt or configuration file).
    $ snowsql --accountname ${account} --username ${username} --dbname ${database} --schemaname ${schema}
    try on your machine
    explain this command
  • snowsql:tldr:f4600 snowsql: Connect to the default instance using a token for multi-factor authentication.
    $ snowsql --mfa-passcode ${token}
    try on your machine
    explain this command
  • snowsql:tldr:f92ff snowsql: Execute a single SQL query or SnowSQL command on the default connection (useful in shell scripts).
    $ snowsql --query '${query}'
    try on your machine
    explain this command
tool overview