CertSafari
    Snowflake SnowPro Core Certification (COF-C03)· Lessons

    Domain 1 · Lesson 2/19

    Snowflake CLI and the VS Code extension: local tools for Snowflake

    Use Snowflake Interfaces and tools

    13 min read
    5.17% of exam
    5 sources
    Published 20 Oct 2026
    Docs as of 18 Oct 2026

    What you will be able to do

    • Explain how the Snowflake CLI (snow) differs from the legacy SnowSQL client
    • Install snow and define named connections, including key-pair authentication, in config.toml
    • Sign in to Snowflake from the VS Code extension, browse objects, and run SQL files without leaving the editor

    1.Snowflake CLI versus SnowSQL

    Snowflake has two command-line clients, and only one is still developed. Snowflake CLI, run as snow, is the preferred client for new installs and new work. It is open source and built for developer workloads as well as SQL. SnowSQL is the legacy client, for SQL queries, DDL, DML, and loading or unloading data. New features go only into Snowflake CLI. SnowSQL 1.5.x is supported through April 16, 2028, and there is a migration path from SnowSQL to snow.

    The two tools differ in scope as well as age. SnowSQL runs SQL. Snowflake CLI also creates, deploys and manages applications. Its top-level commands include streamlit, app for Snowflake Native Apps, spcs for Snowpark Container Services, snowpark for procedures and functions, git, stage, notebook, cortex, and sql for plain queries. That reach is why it fits CI/CD and automated deployment: deployment artifacts are uploaded to stages for you.

    Snowflake CLI and SnowSQL side by side
    AspectSnowflake CLI (snow)SnowSQL
    StatusPreferred client for new installs and new workLegacy client, 1.5.x supported through April 16, 2028
    ScopeSQL plus Streamlit, Native Apps, Snowpark Container Services, Snowpark, Git, stagesSQL queries, DDL, DML, loading and unloading data
    New featuresAll new features and enhancementsNone
    LicenceOpen sourceNot stated

    Checkpoint 1 of 7· Check yourself

    A team is choosing one command-line client for new work. It must run SQL and also deploy Streamlit apps and Snowflake Native Apps from a CI/CD pipeline, and they want a tool that will keep getting new features. What should they pick?

    Checkpoint 2 of 7· Exam question

    What is the primary distinction between the Snowflake CLI and SnowSQL?

    Sources12

    2.Installing the snow CLI

    Binary installs through a package manager are the recommended method. On macOS, use Homebrew: either the community snowflake-cli formula, which may lag behind the newest release, or Snowflake's own tap, which publishes a pre-built cask with every release. On Linux, install the .deb package (Debian, Ubuntu) or the .rpm package (RHEL, CentOS, Fedora) from the Snowflake CLI repository. AIX is not supported. Whatever the platform, running snow --help afterwards confirms the install and lists the command groups.

    Installing Snowflake CLI with Homebrew on macOSbash
    brew install snowflake-cli

    Installing the binary does not give you access. You also need a Snowflake account with privileges for whatever you plan to do, and a configured connection. If your account requires MFA, expect a prompt for approval on every snow command. MFA caching cuts that to one authentication every four hours. Snowflake CLI also runs code from your project directory and from remote URLs, so only run it against projects and SQL sources you trust.

    Checkpoint 3 of 7· Fill the gap

    You are installing the actively developed command-line client on macOS with the community Homebrew formula. Which package name completes the command?

    brew install  ? 

    Sources3

    3.Named connections in config.toml

    A connection definition is a named block of connection parameters. snow reads these blocks from the [connections] section of config.toml (or from connections.toml). Each block is [connections.<name>]. Besides credentials, the block holds defaults for the session: warehouse, database and schema. This is where the CLI keeps the context that a Snowsight worksheet keeps in its selectors; context itself is covered in Session context and SQL variables.

    A named connection in config.toml, including default warehouse, database and schematoml
    [connections.myconnection]
    account = "myaccount"
    user = "jondoe"
    password = "password"
    warehouse = "my-wh"
    database = "my_db"
    schema = "my_schema"

    To choose which connection runs by default, set default_connection_name = "myconnection" at the top of the file. It does not work inside a connection block. You can also skip config files entirely with --temporary-connection. When the same parameter is set in more than one place, snow takes the value from the highest-ranked source in the table below. A password hard-coded in the file, like the one above, is the weakest choice: Snowflake strongly recommends putting it in SNOWFLAKE_CONNECTIONS_<NAME>_PASSWORD or SNOWFLAKE_PASSWORD instead.

    Where snow looks for a connection parameter, highest priority first
    PrioritySourceExample
    1Command-line parameters--private-key-file on snow connection add
    2Environment variables overriding a specific config.toml parameterSNOWFLAKE_CONNECTIONS_MYCONNECTION_PASSWORD
    3Connections defined in config.toml or connections.toml[connections.myconnection]
    4Generic environment variablesSNOWFLAKE_USER

    The authentication method also goes in the connection definition. A CI job cannot type a password or approve an MFA push, so key-pair authentication is the usual fit. Set authenticator = "SNOWFLAKE_JWT" and give the key path in private_key_file, for example [connections.jwt] with private_key_file = "~/sf_private_key.p8". You can also pass --authenticator SNOWFLAKE_JWT --private-key-file to snow connection add. Other supported methods include OAuth, MFA with caching, SSO, an external browser, a programmatic access token, and workload identity federation. They are compared in Authentication: SSO/federated, MFA, OAuth, key-pair.

    Checkpoint 4 of 7· Check yourself

    In Snowsight you set Settings » Preferences » Default warehouse to ANALYTICS_WH. On your laptop, snow sql runs with the [connections.myconnection] block in config.toml, and that block sets warehouse = "my-wh". No command-line option or environment variable sets a warehouse. Which warehouse does the CLI session use, and why?

    Sources4

    4.Connecting from VS Code with the Snowflake extension

    The Snowflake extension for Visual Studio Code lets you write and run Snowflake SQL inside the editor. It also adds debugging, syntax highlighting and SQL autocomplete in Snowpark Python code. Install it from the Visual Studio Marketplace: go to Code > Settings > Extensions, search for Snowflake, check for the Snowflake badge, and select Install. Without marketplace access, download a .vsix file from the extension's Version History tab and choose More (…) > Install from VSIX.

    You must sign in before you can do anything. Select the Snowflake icon in the Activity Bar. The first time, enter your account identifier or connection URL. Then pick an auth method: single sign-on, username/password, or key pair. OAuth is set up in the connections.toml file instead. After sign-in, the sidebar shows your account, your default role, the OBJECT EXPLORER and QUERY HISTORY. Use the dropdowns in the Account section to change role, database, schema and warehouse. The current session's role, database, schema and active warehouse are always on display.

    The extension can use the same connection files as the command line. Snowflake: Edit Connections File in the Account pane opens connections.toml, so connections you define for snow also appear in VS Code. The extension can also read an older SnowSQL config: set Snowsql Config Path in the extension's user settings. It only reads the connection values from that file and ignores everything else. For new work, Snowflake recommends Snowflake CLI config.toml connections over SnowSQL files.

    Checkpoint 5 of 7· Check yourself

    When you sign in with the Snowflake extension for VS Code, the Auth Method list offers only Single sign-on, Username/password and Key Pair. Your team already uses OAuth connections with snow. How do you sign in to the extension with OAuth?

    Sources5

    5.Browsing objects and running SQL in VS Code

    The OBJECT EXPLORER brings the database browser into the editor. Expand a database, then a schema, then the object you want. Selecting it shows its properties in the Query Results pane. Open data preview shows up to 100 rows of a table, view or materialized view, and Show SQL shows the object's SQL. Stages appear in the same tree: you can list staged files and manage them, and file uploads work for internal stages only. All other stage operations work on both internal and external stages.

    SQL lives in files. Create a file of type Snowflake SQL File, or open an existing .sql file. Execute All Statements runs the whole file. Place the cursor on one statement and select Execute to run just that one, or select several to run them top to bottom. You can cancel a running query from QUERY HISTORY. Results open in the Snowsight results viewer, which shows up to 1 million rows. From there you can sort, hide or freeze columns, or save to CSV or gzip.

    Checkpoint 6 of 7· Check yourself

    A deployment script runs an INSERT and then calls LAST_QUERY_ID() to log the ID of that INSERT. It logs the right ID when run in a Snowsight worksheet. Run as a Snowflake SQL File through the VS Code extension, it logs a different ID. What explains this?

    Checkpoint 7 of 7· Exam question

    A data engineer is writing a Snowpark Python script in Visual Studio Code and wants to browse the target database's schemas, preview up to 100 rows of a table, and inspect its DDL without leaving the editor. What should they use?

    Sources5

    Practise it for real

    Install the Snowflake CLI, define a named default connection, and run a query through it.

    1. 1.Run brew install snowflake-cli on macOS, or install the .deb or .rpm package on Linux.

      Why: A package-manager binary is the recommended way to install snow.

      You should see: The install finishes without errors.

    2. 2.Run snow --help.

      Why: This checks that the binary is on your PATH and shows the command groups.

      You should see: Usage text listing commands such as app, connection, sql, stage and streamlit.

    3. 3.In config.toml, add a [connections.myconnection] block with account, user, warehouse, database and schema, and put default_connection_name = "myconnection" at the top of the file.

      Why: The named block keeps your credentials and session defaults together, and the top-level setting makes it the connection snow uses by default.

      You should see: The file has one top-level setting followed by the connection block.

    4. 4.Export your password as SNOWFLAKE_CONNECTIONS_MYCONNECTION_PASSWORD instead of writing it in the file.

      Why: Snowflake recommends environment variables for passwords, and this one outranks the value in config.toml.

      You should see: The config file contains no plaintext password.

    5. 5.Run snow sql -q "select 42".

      Why: This proves the default connection authenticates and can run a query on its warehouse.

      You should see: A one-row result table showing 42.

    Stuck? Get a nudge

    If authentication fails in a job with no one at the keyboard, switch the block to authenticator = "SNOWFLAKE_JWT" with a private_key_file path.

    Sources

    (5)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Snowflake CLI is the preferred command-line client for new installs and new work.”
      ↩︎ Snowflake CLI versus SnowSQL
      “across workloads such as Streamlit in Snowflake, the Snowflake Native App Framework, Snowpark Container Services, and Snowpark.”
      ↩︎ Snowflake CLI versus SnowSQL
      “Snowflake supports SnowSQL 1.5.x through April 16, 2028.”
      ↩︎ Snowflake CLI versus SnowSQL
      “Snowflake will only add new features and enhancements to Snowflake CLI.”
      ↩︎ Exam trap 1
      “SnowSQL is a legacy command-line client. Snowflake will only add new features and enhancements to Snowflake CLI.”
      ↩︎ Checkpoint
    2. 2.
      “SnowSQL is a legacy command-line client for SQL queries, DDL, DML, and loading or unloading data.”
      ↩︎ Snowflake CLI versus SnowSQL
    3. 3.
      “Note that Snowflake CLI is not currently available for AIX systems.”
      ↩︎ Installing the snow CLI
      “You can use MFA caching to require authentication only once every four hours.”
      ↩︎ Installing the snow CLI
    4. 4.
      “Connection definitions are stored in the [connections] section of the config.toml file”
      ↩︎ Named connections in config.toml
      “set the authenticator parameter to SNOWFLAKE_JWT and provide the path to the file with your private key”
      ↩︎ Named connections in config.toml
      “You cannot include it within a connection definition.”
      ↩︎ Exam trap 2
    5. 5.
      “write and execute Snowflake SQL statements directly in VS Code”
      ↩︎ Connecting from VS Code with the Snowflake extension
      “You can use the Account section of the Side Bar pane to select roles, databases, schemas, and warehouses.”
      ↩︎ Connecting from VS Code with the Snowflake extension
      “For new work, Snowflake recommends Snowflake CLI config.toml connections.”
      ↩︎ Connecting from VS Code with the Snowflake extension
      “to display the SQL code associated with the object”
      ↩︎ Browsing objects and running SQL in VS Code
      “This supports the display of up to 1 million rows.”
      ↩︎ Browsing objects and running SQL in VS Code
      “This process makes LAST_QUERY_ID() inaccurate.”
      ↩︎ Exam trap 3
      “only supports uploads for internal stages, all other operations work for both internal and external stages.”
      ↩︎ Exam trap 4
      “A connection definition is a collection of connection-related parameters.”
      ↩︎ Checkpoint
      “Use OAuth authentication in your connections.toml configuration file.”
      ↩︎ Checkpoint
      “to display a preview of up to 100 rows of content associated with a table, view, materialized view, or similar object”
      ↩︎ Prediction
      “the VS Code extension automatically runs DESC RESULT '<query_id>' in the background after every query. This process makes LAST_QUERY_ID() inaccurate.”
      ↩︎ Checkpoint

    Ready to test yourself?

    Practise the 21 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.