# Prerequisites¶

This tutorial requires a database, table, and virtual warehouse to load and query data. Creating these Snowflake objects requires a Snowflake user with a role with the necessary access control permissions. In addition, SnowSQL is required to execute the SQL statements in the tutorial. Lastly, the tutorial requires CSV files containing sample data to load.

Note that you can complete the tutorial using an existing Snowflake warehouse, database and table, and your own local data files; however, for simplicity, we recommend using the Snowflake objects and set of data files we’ve provided.

In this Topic:

## Required User and Permissions¶

To create the database, table, and virtual warehouse used in this tutorial, your Snowflake user must have a role that has been granted the necessary permissions to create these objects.

## SnowSQL Installation¶

The SnowSQL installer is available for download from the Snowflake Client Repository. No authentication is required. This version of the SnowSQL installer enables auto-upgrade for patches.

For more detailed instructions, see Installing SnowSQL.

To install SnowSQL:

1. Open a terminal window.

2. Run curl to download the SnowSQL installer.

For increased flexibility, Snowflake provides both Amazon Web Services (AWS) and Azure endpoints for downloading the SnowSQL installer. Accounts hosted on any supported cloud platform can download the installer from either endpoint.

Linux

AWS endpoint
$curl -O https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/linux_x86_64/snowsql-1.2.9-linux_x86_64.bash Microsoft Azure endpoint $ curl -O https://sfc-repo.azure.snowflakecomputing.com/snowsql/bootstrap/1.2/linux_x86_64/snowsql-1.2.9-linux_x86_64.bash

macOS

AWS endpoint
$curl -O https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/<bootstrap_version>/darwin_x86_64/snowsql-<version>-darwin_x86_64.pkg  Microsoft Azure endpoint $ curl -O https://sfc-repo.azure.snowflakecomputing.com/snowsql/bootstrap/<bootstrap_version>/darwin_x86_64/snowsql-<version>-darwin_x86_64.pkg


Windows

AWS endpoint
$curl -O https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/windows_x86_64/snowsql-1.2.9-windows_x86_64.msi Microsoft Azure endpoint $ curl -O https://sfc-repo.azure.snowflakecomputing.com/snowsql/bootstrap/1.2/windows_x86_64/snowsql-1.2.9-windows_x86_64.msi
3. Run the installer:

Linux

1. Open a terminal window.

\$ bash snowsql-linux_x86_64.bash

3. Follow the instructions provided by the installer.

macOS

1. Double-click snowsql-darwin_x86_64.pkg in the download location to run the installer PKG file.

2. Follow the instructions provided by the installer.

Windows

1. Double-click snowsql-windows_x86_64.msi in the download location to run the installer MSI file.

2. Follow the instructions provided by the installer.

Download the set of sample data files. Right-click the name of the archive file, getting-started.zip, and save the link/file to your local file system.

You can unpack the sample files in any location; however, we recommend using the directories referenced in the tutorial examples:

Linux/macOS

/tmp

Windows

C:\temp

The sample files include dummy employee data in CSV format with five records each. The field delimiter is the comma (,) character.

Example record:

Althea,Featherstone,afeatherstona@sf_tuts.com,"8172 Browning Street, Apt B",Calatrava,7/12/2017


Note

• There are no blank spaces before or after the commas separating the fields in each record. This is the default that Snowflake expects when loading CSV data.

• Because the field delimiter is the comma character, any commas within a field string must be escaped, or the entire field must be enclosed in double quotes (" ").