© Dmitry Anoshin, Dmitry Shirokov, Donna Strok 2020
D. Anoshin et al.Jumpstart Snowflakehttps://doi.org/10.1007/978-1-4842-5328-1_2

2. Getting Started with Snowflake

Dmitry Anoshin1 , Dmitry Shirokov2 and Donna Strok3
(1)
British Columbia, Canada
(2)
Burnaby, BC, Canada
(3)
Seattle, WA, USA
 
Congratulations on choosing to get started with Snowflake! In this chapter, we will cover the following topics:
  • Planning

  • Creating your Snowflake account

  • Connecting to Snowflake

By the end of this chapter, you will be ready to begin your cloud analytics journey and follow along with the remaining chapters of this book. In the “Planning” section, we will cover what decisions should be made before creating your Snowflake account. These considerations include pricing and region choices. We will also briefly introduce the Snowflake web interface.

Planning

You need to consider the following before creating your Snowflake account:
  • Snowflake editions

  • Cloud providers and regions

  • Snowflake pricing model

  • Types of Snowflake tools

Deciding on a Snowflake Edition

When you create your Snowflake account, you will be asked to choose a Snowflake edition. Snowflake offers five account types, and each one provides progressively more features.

Table 2-1 gives a high-level overview of the Snowflake editions and what features are considered the selling points. Please refer to Snowflake’s online pricing for the latest edition offerings and features (https://www.snowflake.com/pricing).
Table 2-1

Snowflake Editions

../images/482416_1_En_2_Chapter/482416_1_En_2_Figa_HTML.jpg

Choosing a Cloud Provider and Region

At the time of this publication, a Snowflake account can be hosted on either Amazon Web Services (AWS) or Microsoft Azure. Each cloud provider has data centers in many locations around the world. These locations are referred to as regions . Transferring data between regions can have cost implications. Therefore, region considerations are important because the costs can vary depending on your requirements.

Multiple regions might be necessary to address global data access speeds as well as replication needs. For example, if you have users located in different parts of the world, it might make sense to replicate or partition the data closer to your users. If you have a use case for multiple regions, then you will need to create a Snowflake account for each region. We will talk about solving multiple-region issues in later chapters.

Note

Snowflake accounts do not support more than one region. You will need to create a Snowflake account for each region.

Regions dictate only the geographic location of where the data is stored and the compute resources are provisioned, not the usage of the data. The usage of the data may occur from anywhere in the world. Also, the cloud platform that is chosen for each Snowflake account is completely independent from your other Snowflake accounts. You may choose to use a mix of cloud providers and regions; however, be aware that this will impact the cost of transferring data into your Snowflake account. Also, there are some limitations with using Azure as a cloud provider, as described in Table 2-2.
Table 2-2

Limitations to Your Snowflake Account When Hosted on Microsoft Azure

Snowflake editions impacted

Virtual Private Snowflake (VPS) is not currently available on Azure but is planned to be released shortly. Check with the Snowflake web site for more details:

https://docs.snowflake.net/manuals/user-guide/intro-editions.html

Security and data encryption

No support for encryption with customer-managed keys.

 

No support for secure connectivity to customer-owned virtual networks.

Data loading

To access S3 from Azure, IAM policies must allow for Snowflake access.

Third-party application support

Check with your third-party partner to determine whether Azure is supported.

These partners do support Azure: Alooma, Attunity, Databricks, Fivetran, Informatica, Looker, Matillion, MicroStrategy, Periscope, Power BI, Qubole, Sigma Computing, Stitch, Tableau, Talend, and Wherescape.

Examining Snowflake’s Pricing Model

The pricing model is an attractive feature of Snowflake. This is because Snowflake charges only for what is used. The storage and compute resource costs are based on the amount of compressed data stored in the database tables and whatever is needed for data recovery. The virtual warehouse size determines the number of servers per cluster and what the compute costs will be. The pricing model uses credits, and credits are billed by full hour. Virtual warehouse sizes come in eight T-shirt sizes, as noted in Table 2-3.
Table 2-3

Credits Charged by Full Hour Based on Virtual Warehouse Size

X-Small

Small

Medium

Large

X-Large

2X-Large

3X-Large

4X-Large

1

2

4

8

16

32

64

128

Note

Credits are billed on a per-second basis only when virtual warehouses are running. If a virtual warehouse is suspended, it will not accrue charges.

If a virtual warehouse needs to be resized, credits are billed only for the additional increase or decrease in servers. For example, if your virtual warehouse is increasing from Large to X-Large, you will be charged per minute for each cluster being added. In this case, eight additional credits are accrued for that minute during the increase. Also, each time a server is started or stopped, there is a one-minute minimum billing charge even if it took less time. After the minute of billing has occurred, then charges go back to per-second billing. Refer to the Snowflake web site to get the current pricing per credits in your currency.

Other Pricing Considerations

You can choose to leave your data in the Snowflake database. But if you need to transfer or copy your data out of Snowflake and into another external storage location (i.e., AWS S3), Snowflake will charge for the query compute costs associated with the export. Also, if you’re going to export your data out of Snowflake and into a cloud storage such as S3 or Azure Blob, there are additional egress charges for that if the location is either in a different region or with a different cloud storage provider.

Remember

Snowflake does not charge to load data into your Snowflake environment from any external stage; however, your cloud storage provider (Amazon S3 or Microsoft Azure) might charge a separate egress fee if your data storage is located in a region or network different from your Snowflake account.

Examining Types of Snowflake Tools

Snowflake can be accessed in several ways: through a UI, command line, JDBC/ODBC driver, or many third-party partner tools.
  • Snowflake web interface. Most browsers can support the Snowflake web interface. For minimum versions, check the Snowflake web site. Snowflake recommends Google Chrome (minimum version).

  • SnowSQL, the Snowflake command-line client.

  • Any client application connected via JDBC or ODBC.

  • Third-party partners that have been built with Snowflake capabilities, like Tableau and Matillion.

Snowflake Web Interface

You can use any of the browser versions in Table 2-4 to access the Snowflake web interface. Snowflake recommends using Google Chrome because the other browsers have not been tested as much as Chrome has. If any issues occur with the browser in the versions listed in Table 2-4, contact Snowflake Support for help. We will go through the Snowflake web interface more extensively later in this chapter.
Table 2-4

Browsers Supported by the Snowflake Web Interface

Browsers

Versions

Chrome

Safari

Firefox

Internet Explorer

Opera

Edge

47+

9+

45+

11+

36+

12+

SnowSQL

SnowSQL is a command-line client for connecting to and using Snowflake. SnowSQL can be installed on any Red Hat–compatible Linux operating system, macOS (64-bit), and Windows (64-bit). Other operating systems have not been tested and may not work with SnowSQL. There are some Linux systems that may not have all the needed libraries used by the SnowSQL client. SnowSQL is available for download from the Snowflake web interface as well as the Snowflake web site. We will cover SnowSQL in later chapters of this book.

JDBC and ODBC OS Platform Requirements

Both the Snowflake JDBC (64-bit) and ODBC (32-bit and 64-bit) drivers can be installed on Linux, macOS, and Windows. The JDBC driver is available for download from the Maven Central Repository at http://search.maven.org/. The ODBC driver is available on the Snowflake Client Driver Repository at https://sfc-repo.snowflakecomputing.com/odbc/index.html. The ODBC driver can also be downloaded from the Snowflake console. Windows users may need to install .NET drivers prior to the installation of the ODBC driver.

Third-Party Partners

In later chapters we will go over how the third-party partners Matillion and Tableau use Snowflake. Right now, Snowflake makes it easy to integrate with some of the more popular third-party tools like Databricks, Alteryx, Looker, Qubole, Matillion, and Tableau. For a current list of the Snowflake third-party partners, please visit the Snowflake web site at https://docs.snowflake.net/manuals/user-guide/ecosystem-all.html.

Creating a Snowflake Account

Now you should be ready to create your Snowflake account, and this is probably the easiest part of the whole process. If you do not have an account yet, you can sign up online for a free trial. When logging into www.snowflake.com, you should see the screen shown in Figure 2-1. The information that was gathered in our planning stage will help us go through this quickly. Click Start for Free in the upper-right corner of the page. This will give you a 30-day trial of Snowflake plus 400 Snowflake credits to play with.
../images/482416_1_En_2_Chapter/482416_1_En_2_Fig1_HTML.jpg
Figure 2-1

Snowflake main web page

Enter the following required details: name, company name, e-mail, phone number, Snowflake edition, cloud provider, and region. Finish by clicking Create Account, and in about 15 minutes, you will receive an e-mail with a link to your web interface. Figure 2-2 shows a sample e-mail. You must activate your account before going to the web interface.
../images/482416_1_En_2_Chapter/482416_1_En_2_Fig2_HTML.jpg
Figure 2-2

E-mail received from Snowflake once account is provisioned

Note

Account activation must occur within 72 hours or you will need to create another trial account.

Connecting to Snowflake

In this section, we will demonstrate how to connect to Snowflake and give you a tour of the web interface. We will cover other ways to connect to Snowflake in later chapters. For now, we will do the following:
  1. 1.

    Log into the Snowflake web interface

     
  2. 2.
    Tour the web interface, which will include the following:
    • Databases page

    • Shares page

    • Warehouses page

    • Worksheets page

    • History page

    • Partner Connect page

    • Help menu

    • User Preferences menu

     

Logging Into the Snowflake Web Interface

As mentioned in the previous section, the Snowflake web interface is accessible through a web browser. During your account creation, you received an e-mail that notifies you that your account has been provisioned. This e-mail contains a link to your Snowflake web interface and a link to activate your account. Clicking Activate will take you to a web browser screen where you will be prompted to create a username and password. Once you have entered your desired username and password, the Welcome to Snowflake web interface will appear, as shown in Figure 2-3. Congratulations, you have officially logged into Snowflake!
../images/482416_1_En_2_Chapter/482416_1_En_2_Fig3_HTML.jpg
Figure 2-3

Welcome to Snowflake screen

Snowflake makes it easy to navigate and learn about the different features included in the web interface. We will go over what is included in the web interface in the next section.

Touring the Web Interface

Now that you’ve logged into your Snowflake web interface, you can create and manage all of your Snowflake objects. You can also use the web interface to load some data into tables, execute ad hoc queries, run Data Manipulation Language (DML) statements such as update, run Data Definition Language (DDL) statements such as alter/create, view past queries, change your password, set your user preferences, and perform administrative tasks if you’ve been granted admin access.

If you have the required administrator role, you can perform administrative tasks in the web interface such as creating and managing users. We will go over the administrative portion of the interface in Chapter 7. For this section, we will review the following parts of the web interface: Databases page, Warehouses page, Worksheets page, History page, Help menu, and User Preferences menu.

Databases Page

The Databases page shows information about the databases you have created or have privileges to access. With the necessary privileges, you are able to perform tasks that include creating, cloning, dropping, and modifying database objects; loading data into tables; and transferring ownership of a database to a different role. To do these tasks, you just click the database name. Figure 2-4 shows the database objects in the SNOWFLAKE_SAMPLE_DATA database on the Databases page.
../images/482416_1_En_2_Chapter/482416_1_En_2_Fig4_HTML.jpg
Figure 2-4

Snowflake’s Databases page in the web user interface

Warehouses Page

The Warehouses page displays information about your virtual warehouses that have been created or that you have privileges to access. The administrative tasks that can be performed on virtual warehouses through this page include the following: creating or dropping, suspending or resuming, configuring, and transferring ownership to a different role. Figure 2-5 shows the virtual warehouses available in our example.
../images/482416_1_En_2_Chapter/482416_1_En_2_Fig5_HTML.jpg
Figure 2-5

Snowflake’s Warehouses page

Shares Page

If you need to share your data with other teams inside or outside your organization, then Snowflake data sharing might be the solution you are looking for. Snowflake data sharing enables data providers to effectively share their data and to service their data consumers in a scalable and cost-effective manner. Snowflake data sharing is available to all Snowflake customers.

Worksheets Page

The Worksheets page is probably going to be the most used page for those with access to the Snowflake user interface. This page is where users can submit ad hoc SQL queries and execute DDL and DML statements. Other tasks that can be done on the Worksheets page include the following: opening concurrent worksheets that work in separate sessions, saving and reopening worksheets, logging out of Snowflake or switching roles within the worksheet, exporting query results, and resizing the current virtual warehouse if needed.

Caution

If you log out of Snowflake, all running queries in the worksheet will cease.

History Page

The History page saves details of what was executed through the Worksheets page, SnowSQL, and any other SQL client that connects to your Snowflake instance. The history goes back 14 days, and you are able to view the details about each query. Results of queries are available for only 24 hours after the query has completed running. There are filters available to easily scan through the history, and you’re also able to change how the history is viewed by adding additional columns, such as for the status or virtual warehouse.

Partner Connect Page

The Partner Connect page is available to the right of the History page. This page provides instant access to all the third-party partners that Snowflake is compatible with. It is easy to get set up; just click Partner Connect, choose the partner tool, and click Connect. Once you receive confirmation that your account was created, click Launch. In just a few short minutes you will be able to integrate the partner with your Snowflake account.

Help Menu

The Help menu is available in the upper-right corner of the Snowflake web interface, next to Partner Connect. The Help menu is where you can access the Snowflake documentation. Additionally, if you need support, the Help menu is where you can create a support case. Also, Snowflake drivers are available for download in the Help menu.

User Preferences Menu

The User Preferences menu can be accessed by clicking the drop-down menu in the upper-right corner, next to your account name. The preferences menu is where you can change your password, security role, and notification settings. It is also where you can log out of Snowflake.

Reminder

Logging out of Snowflake will cancel all running queries that are in a worksheet.

Summary

In this chapter, we covered planning your Snowflake environment and creating a Snowflake account, and we gave you a high-level overview of the web user interface. You are now ready to load data and build your virtual warehouse. The next few chapters will help you get started onboarding your data, and then later chapters will discuss the tools you can use to analyze your data.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.208.97