Snowflake Profiler Details
Prerequisites
- A Snowflake user with permission to create Personal Access Tokens (PATs) and to query the
SNOWFLAKE.ACCOUNT_USAGEschema (e.g., theACCOUNTADMINrole or a role grantedIMPORTED PRIVILEGES ON DATABASE SNOWFLAKE). - The
rate_sheetstep also readsSNOWFLAKE.ORGANIZATION_USAGE.RATE_SHEET_DAILYfor the effective credit rate and account tier. This is available toACCOUNTADMINin an ORGADMIN-enabled account (the first account in an organization is ORGADMIN-enabled by default, so single-account orgs are covered), or to a custom role granted theORGANIZATION_BILLING_VIEWERdatabase role. If the account isn't ORGADMIN-enabled — or the organization is on a reseller contract — the view returns no rows, sorate_sheetis skipped and the rest of the profile still completes. - Network access from the machine running Lakebridge to your Snowflake account.
Authentication
The Snowflake profiler authenticates with a Programmatic Access Token (PAT). Follow Snowflake's official guide to generate one:
Snowflake docs: Programmatic access tokens
You'll need:
account— your Snowflake account identifier (e.g.,myorg-myaccount.snowflakecomputing.com)user— Snowflake usernamerole,warehouse,database,schema— typicallyACCOUNTADMIN,COMPUTE_WH,SNOWFLAKE,ACCOUNT_USAGE- The PAT itself (paste when prompted; it's stored under
patin the credentials file)
If your account or user has a network policy, also see Snowflake's docs on bypassing the network policy on a PAT for short-term testing from a dynamic IP.
Configure and run the profiler
databricks labs lakebridge configure-database-profiler
Pick snowflake when prompted, then paste the connection details and PAT.
databricks labs lakebridge execute-database-profiler
The extract is written to a DuckDB file at ~/.databricks/labs/lakebridge_profilers/snowflake_assessment/profiler_extract.db. It contains raw SNOWFLAKE.ACCOUNT_USAGE data — warehouse usage, query history, storage, users, and (when applicable) pipe / autoclustering / materialized-view refresh credits. By default each extract looks back 90 days. Inspect it with:
cd ~/.databricks/labs/lakebridge_profilers/snowflake_assessment
duckdb profiler_extract.db "SHOW TABLES;"
duckdb profiler_extract.db "SELECT * FROM warehouse_usage LIMIT 10;"
duckdb profiler_extract.db "SELECT * FROM query_history LIMIT 10;"