Install the Snoweaver CLI
This guide provides instructions for installing the Snoweaver CLI client. For detailed usage information, please refer to the sections on Snoweaver CLI.
Prerequisites
Before continuing with this tutorial, ensure you have completed the following prerequisites:
Install the SnowSQL CLI client on your client machine.
Configure a connection to a Snoweaver project
Open your SnowSQL conifguration file in a text editor.
Add a new connection entry for the project you wish to access. Use the following template as a guide:
[connections.learn_dev] accountname = <your account> username = <your user name> role = LEARN_DEV_DEVELOPER warehouse = LEARN_SW_WH dbname = SNOWEAVER schemaname = LEARN_DEV password = <password>
Note
The provided example uses the project and role from the tutorial. Adjust these settings according to the specific project you are connecting to.
Test your connection with the following command:
snowsql -c learn_dev -q 'select current_schema();'
Download and setup the client
Launch a shell command terminal.
Run the following command to check if jq is installed:
jq --version
If it’s not installed, please refer to this installation guide to set it up.
Execute the following commands to download the CLI bash file:
cd ~ mkdir sw_cli curl -L -o sw_cli/sw https://raw.githubusercontent.com/Snoweaver-Labs/quickstart/main/cli/sw chmod +x sw_cli/sw
Update your PATH environment variable to include the CLI client directory:
echo -e "\n# add SW Cli\nexport PATH=\$PATH:~/sw_cli/" >> ~/.bashrc
Restart your terminal and verify that the sw command is now available.
Launch a shell command terminal.
Execute the following commands to download the CLI bash file:
cd ~ mkdir sw_cli curl -L -o sw_cli/sw https://raw.githubusercontent.com/Snoweaver-Labs/quickstart/main/cli/sw chmod +x sw_cli/sw curl -L -o sw_cli/jq https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-macos-arm64 chmod +x sw_cli/jq
Note
You may skip the jq installation steps if jq is already installed. If you’re using an older machine with an Intel chip, please update the download link for jq to: https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-macos-amd64
Update your PATH environment variable to include the CLI client directory:
echo -e "\n# add SW CLI\nexport PATH=\$PATH:~/sw_cli/" >> ~/.zprofile
Restart your terminal and verify that the sw command is now available.
Run the following command to check if jq is available:
jq --version
Download and install the latest version of Git for Windows.
Open PowerShell with Administrator privileges.
Execute the following commands:
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Snoweaver-Labs/quickstart/main/cli/sw" -OutFile "C:\Program Files\Git\usr\bin\sw" Invoke-WebRequest -Uri "https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-windows-amd64.exe" -OutFile "C:\Program Files\Git\usr\bin\jq.exe"
Note
We assume Git is installed in the default directory C:\Program Files\Git. If it is installed in a different directory, please adjust the commands accordingly.
To use the latest version of jq, please refer to the jq website.
Open Git Bash
Verify that you can use the sw command.
Verify that you can use the jq command.
Hint
You can right-click in any folder within File Explorer and select ‘Open Git Bash Here’ from the context menu to launch Git Bash at that location.