Analytics
Snowflake Usage Analytics
5min
the most popular analytics offering in datalakehouse allows the viewing of comprehensive snowflake costs snowflake cost calculators surface usage and costs, available to the account administrator role under the account > billing & usage tab these insights are largely presented as data, not as historical trends as a result, this excludes in depth analysis of the various parameters that affect usage and costs, and levers you can pull to control them rest assured, snowflake does a good job of making the usage statistics and costs easily visible via their standard interface however, some organizations may need more detail it infrastructure leads and business sponsors of initiatives that leverage snowflake to achieve important business outcomes would need to review usage statistics and costs on a more frequent basis data analytics tools provide deeper insight on snowflake costs and usage this is where datalakehouse io comes into play prior to deploying snowflake usage analytics, complete the pre install items pre install items new datalakehhouse io customer if datalakehouse io is not already landing data into your snowflake target, follow these steps which will create the necessary users, warehouse, databases, etc in order to get this dashboard configured in datalakehouse io, the following script will need to be run in snowflake modify the role, username & password to fit your naming convention and existing names \ // datalakehouse io create user script begin; \ // create variables at top to propogate through script for user set role name = 'datalakehouse role'; set user name = 'datalakehouse user'; set user password = 'tmp!password'; change to a unique password set warehouse name = 'datalakehouse wh'; set database name = 'datalakehouse raw'; \ // change role to securityadmin as required for user and role controls use role securityadmin; \ // create role for datalakehouse io with required grant create role if not exists identifier($role name); grant role identifier($role name) to role sysadmin; \ // create a new user for datalakehouse io interaction create user if not exists identifier($user name) password = $user password default role = $role name default warehouse = $warehouse name comment = 'datalakehouse io user to synchronize data from our source systems into our snowflake data cloud '; \ // grant the created datalakehouse role to the user grant role identifier($role name) to user identifier($user name); \ // change the active role to sysadmin as required for db and wh controls use role sysadmin; \ // create a warehouse for datalakehouse io separate compute create warehouse if not exists identifier($warehouse name) warehouse size = xsmall warehouse type = standard auto suspend = 60 auto resume = true initially suspended = true comment = 'datalakehouse io warehouse to separate compute from other warehouse usage in our snowflake account '; \ // create the database for datalakehouse io raw landing zone create database if not exists identifier($database name); \ // grant the datalakehouse io role access to the created warehouse grant usage, monitor on warehouse identifier($warehouse name) to role identifier($role name); \ // grant the datalakehouse io access to database grant create schema, monitor, usage on database identifier($database name) to role identifier($role name); \ // \ // snowflake usage analytics \ // \ // this section is required to be completed by an accountadmin in order \ // to give this user access to certain snowflake database tables for usage analytics \ // to apply, simply uncomment the rows in this section and run \ // nb if needing to run separately, update with the role name created above \ // \ use role accountadmin; \ grant monitor usage on account to role identifier($role name); \ grant imported privileges on database snowflake to role identifier($role name); \ // snowflake usage analytics only pre requisite (finish) \ // finally commit the transaction of creating the above objects commit; existing datalakehouse io customer if datalakehouse io is already landing data into your snowflake target, follow these steps in order to get this dashboard configured in datalakehouse io, the following script will need to be run in snowflake modify the role, username & password to fit your naming convention and existing names use role accountadmin; create user dlh usage analytics svc password="@bl3b0died#svcaccount" change to meet your standards comment="user specifically for dlh io snowflake usage analytics"; change password to meet your standards create role dlh usage analytics svc role; if necessary, change the role name to meet your naming standards grant monitor usage on account to role dlh usage analytics svc role; grant imported privileges on database snowflake to role dlh usage analytics svc role; grant monitor, usage on warehouse compute wh to dlh usage analytics svc role; grant role dlh usage analytics svc role to user dlh usage analytics svc; create a snowflake source connector create a what is a source connection? docid\ dalfu3jvof0g4 if7atke to snowflake that will be used for creating and running the sync bridge install the package install the snowflake usage analytics package by following the how to access analytics docid\ sd11vm7awa81b7nq1ze4n steps with a user who has the org admin role in datalakehouse io