Snowflake 简明教程
Snowflake - Monitor Usage and Storage
Snowflake 按 storage 、 usage 和 cloud services 向客户收费。监控存储的数据和使用情况变得非常重要。
Snowflake charges customer based on storage, usage and cloud services. It becomes important to monitor the storage data and usage.
个别用户可以查看长时间查询的历史记录,而帐户管理员可以查看每个用户、每个用户或按日期使用的服务消耗和利用情况等账单。
Individual user can view the history for long running queries while account admin can view billing for each user, consumption and utilization of services by each user or by date etc.
Checking Storage
用户可以查看各个表以及数据大小中包含了多少行。如果用户有表的访问权限,他们只需要选择一个表就能查看这些详细信息。在左下方的面板中,用户可以看到 Table Name 及行数和数据存储大小。之后,它会显示表的列定义。
User can check how many rows are having individual table as well as data size. If user has access of table, he/she can view these details by just selecting a table. In the left down panel, user can see Table Name then number of rows and data storage size. After that, it shows the columns definition of the table.
以下屏幕截图显示了如何查看存储详细信息−
The following screenshot shows how to check storage details −

History
在此部分中,用户可以查看他们在 Snowflake 中的活动,比如他们正在使用哪些查询、查询当前的状态、查询花费了多少时间等等。
In this section, users can check their activities in snowflake like what queries are they using, current status of query, how much time it took to run, etc.
要查看历史记录,请单击顶部功能区中显示的 History 选项卡。它将显示用户的历史记录。如果用户已访问或以帐户管理员身份登录,他们可以根据各个用户筛选历史记录。它显示以下信息−
To view the history, click the History tab present at the top Ribbon. It will show the user’s history. If user has accessed or logged in as Account Admin, they can filter out the history based on individual user. It displays following information −
-
Status where query is RUNNING/FAILED/SUCCESS
-
Query ID − Query ID is unique for all queries those are executed
-
SQL Text − It displays what query user has run.
-
User − User who has performed the action.
-
Warehouse − Which warehouse is used to run the query.
-
Cluster − if it is multi-cluster then number of clusters used
-
Size − Warehouse size
-
Session ID − Every worksheet has unique session id.
-
Start Time − When query started to execute
-
End Time − When query completed the execution
-
Total Duration − Total duration of time query ran.
-
Bytes Scanned − It shows how much data is scanned to bring the result
-
Rows − Number of rows scanned
以下屏幕截图显示了历史记录视图 −
The following screenshot displays the History view −

在筛选器中,用户可以通过单击 "+" 符号放置一个或多个筛选器,并且可以通过使用 "–" 符号来移除筛选器。以下屏幕截图显示了可用筛选器的列表 −
In the Filter, user can place one or many filters by clicking the "+" sign and for removing the filters use the "–" sign. The following screenshot displays list of available filters −

Monitoring
要执行帐户级别的监控,用户必须以 ACCOUNTADMIN 角色登录。
To perform account level monitoring, user must be logged in as an ACCOUNTADMIN role.
出于监视的目的,以 Account Admin 的身份登录。单击顶部功能区中显示的 Account link 。它将默认显示帐户使用情况。用户可以看到创建的数据仓库的数量、已使用的信用额度、平均使用的存储(这意味着我们在运行查询期间扫描了多少数据与整体存储相比)以及传输了多少数据。
For monitoring purpose, login as Account Admin. Click the Account link present at top ribbon. It will show Account Usage by default. User can see the number of warehouses created, how much credit has been used, average storage used (it means that how much data we scanned during running the query vs overall storage), and how much data transferred.
它还会显示每个数据仓库使用的信用额度,并显示一个饼状图。在右侧,用户可以看到表格形式的 Date 与 Credit Used 。用户甚至可以通过单击“下载数据”来下载数据。可以通过更改右上角的月份来查看当月的使用情况。
It also shows credits utilized by each warehouse and it displays a pie-chart as well. On the right side, user can see Date Vs Credit Used in tabular form. User can even download the data by clicking on Download data. Monthly usage can be seen by changing the month at right top side.
以下屏幕截图显示了 Usage 选项卡信息:
The following screenshot displays the Usage tab information −

单击下一选项卡 Billing 。在此处,用户可以看到之前添加的任何付款方式。用户也可以通过单击“添加信用卡”链接并提供常规详细信息(如信用卡号、CVV、到期日期、姓名等)来添加一个新的付款方式。
Click the next tab Billing. Here, the user can see any payment method added previously. User can add a new payment method as well, by clicking Add Credit Card link and then provide regular details like Credit card#, CVV, Expiry, Name etc.
以下屏幕截图显示了 Billing 部分:
The following screenshot displays Billing section −

单击下一选项卡 USERS 。它显示帐户中所有用户的名称。
Click the next tab USERS. It displays name of all the users present in the account.
-
By selecting Users, the account admin can reset user passwords or disable a user or delete a user by using Reset Password, Disable User, and Drop button, respectively. By clicking the Create button, present at the top of user list, the Account Admin can create a new user.
以下屏幕截图显示用户选项卡功能:
The following screenshot displays Users tab functionality −

现在单击下一选项卡 ROLES 。可以通过单击角色列表顶部的 Create 按钮在此处创建新角色。通过选择一个角色,它还可以通过单击 Edit 按钮和 Drop 按钮启用或删除角色。
Now click the next tab ROLES. A new role can be created here by clicking the Create button present at top of the role list. By selecting a role, it gives the option to enable or delete the role as well, by clicking Edit button and Drop respectively.
以下屏幕截图显示了 Roles 选项卡的功能:
The following screenshot displays functionality of Roles tab −

除此之外,还有策略、会话、资源监视器和阅读器帐户选项卡。帐户管理员可以创建/编辑/删除策略、创建/编辑/删除会话、创建/编辑/删除资源监视器,以及类似地对阅读器帐户进行操作。
Apart from these, there are Policies, Sessions, Resource Monitors and Reader Accounts tab as well. Account Admin can create/edit/delete policies, create/edit/delete sessions, create/edit/delete resource monitors and similarly to Reader Accounts.