Guides · Get started in Snowflake

Get started with ZLens in Snowflake

ZLens is a free app that runs inside your own Snowflake account. It reads only the data you grant it and answers questions about that data. Every answer is labeled with what it’s built on: Certified, From Metrics or AI-generated. This guide takes you from the Marketplace listing to your first certified answer in 20 steps, about 15 minutes of your time.

On this page: Install · Set up · Open ZLens · Choose your data · Ask · Review the models · Certify an answer · Next steps · If something looks wrong

What you need

  • A paid Snowflake account on AWS, in any commercial region, and Snowsight signed in as ACCOUNTADMIN or a role that can install apps. A trial account can’t run the app’s container or Cortex until a card is added. Not an admin? Send your admin this note.
  • A database with the tables you want to ask about. No data yet? Step 7 shows how to copy Snowflake’s sample data.
  • Nothing extra for the AI. ZLens asks Claude through Snowflake Cortex, inside your account, and Snowflake usually gives apps Cortex access already.

The screenshots use an NBA sample database and an app named ZLENS_TEST. Your database, schema and app names will differ.

Part 1: Install the app

About 2 minutes.

Step 1. Open the listing and press Get

In Snowsight, open Marketplace, find ZLens and press Get. Or open the listing directly.

The ZLens listing on Snowflake Marketplace, with the Get button

Step 2. Review the permissions

Snowflake lists what the app needs. Each item has a plain reason:

  • CREATE WAREHOUSE: an extra-small warehouse for ZLens’s own queries. It suspends after 60 idle seconds.
  • BIND SERVICE ENDPOINT: ZLens’s own address, so you can open it in your browser.
  • CREATE COMPUTE POOL: one small compute pool to run ZLens.

Press Agree & continue.

The permissions ZLens needs for version V5: create a warehouse, bind a service endpoint and create a compute pool

“Future upgrades” lists privileges that Snowflake shows for every app of this kind. ZLens asks for none of them, and a patch cannot add one. The app’s README has the details.

Step 3. Name the app and press Get

Keep the suggested name or type your own, then press Get. You’ll use this name in a few lines of SQL; Snowsight always shows it under Apps.

The Get dialog with the application name field

Step 4. Open the app

After about a minute, Snowflake says Successfully Installed. Press Configure.

Successfully Installed, with the Configure button

Part 2: Set up

About 5 minutes.

Step 5. Let the app tell you what’s missing

The app opens on its own page, the launcher. Until setup is done, it shows Set up ZLens first and names the step that’s missing, with the SQL lines and your app’s name already filled in. It checks again every 10 seconds for 10 minutes, so it moves on by itself once you’re done. If it says it has stopped checking, press Check again.

The launcher page saying Set up ZLens first, with the missing step and its SQL

Step 6. Name the person who uses ZLens

The free app serves one person. Anyone else who opens it is refused.

  1. On the app’s page, open the Configurations tab.
  2. Pick a warehouse at the top of the page. Snowsight needs one to save.
  3. Find Snowflake user who uses ZLens and press its Review.
The Configurations tab, with the Snowflake user who uses ZLens row and its Review button
  1. Enter the person’s Snowflake user name and press Save.
The user name field and the Save button

The row shows a green Configured badge with the name.

The user row marked Configured, with the user name

Leave “Stage for ZLens backups (optional)” empty. It sits above the user row, but it takes a stage name, not a user. You only need it if you want backups that outlive the app.

Prefer SQL? Run this instead, with your app’s name and user:

ALTER APPLICATION ZLENS_APP SET CONFIGURATION ZLENS_USER VALUE = 'THEIR_USER';

Step 7. Grant the data ZLens may read

Open a SQL worksheet. Paste these lines and replace ZLENS_APP, MY_DB and MY_SCHEMA with your own names. Repeat the schema lines for each schema ZLens should read.

GRANT USAGE ON DATABASE MY_DB TO APPLICATION ZLENS_APP;
GRANT USAGE ON SCHEMA MY_DB.MY_SCHEMA TO APPLICATION ZLENS_APP;
GRANT SELECT ON ALL TABLES IN SCHEMA MY_DB.MY_SCHEMA TO APPLICATION ZLENS_APP;
GRANT SELECT ON ALL VIEWS IN SCHEMA MY_DB.MY_SCHEMA TO APPLICATION ZLENS_APP;

Select all the lines, then press Run. Snowsight’s Run on its own runs only the statement under the cursor.

A worksheet with the grant lines for two schemas, selected and ready to run

Snowsight shows only the last line’s result. “Statement executed successfully. 0 objects affected” just means that schema has no views. The launcher confirms which databases ZLens can read (step 9).

Try it on Snowflake’s sample data. If you have no tables yet, copy four TPC-H sample tables into a database you own (about 1.7 million rows), then grant that database instead:

CREATE DATABASE IF NOT EXISTS ZLENS_SAMPLE COMMENT = 'ZLens: copy of TPC-H SF1 sample data';
CREATE SCHEMA IF NOT EXISTS ZLENS_SAMPLE.TPCH;
CREATE OR REPLACE TABLE ZLENS_SAMPLE.TPCH.REGION   AS SELECT * FROM SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.REGION;
CREATE OR REPLACE TABLE ZLENS_SAMPLE.TPCH.NATION   AS SELECT * FROM SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.NATION;
CREATE OR REPLACE TABLE ZLENS_SAMPLE.TPCH.CUSTOMER AS SELECT * FROM SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.CUSTOMER;
CREATE OR REPLACE TABLE ZLENS_SAMPLE.TPCH.ORDERS   AS SELECT * FROM SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.ORDERS;

GRANT USAGE ON DATABASE ZLENS_SAMPLE TO APPLICATION ZLENS_APP;
GRANT USAGE ON SCHEMA ZLENS_SAMPLE.TPCH TO APPLICATION ZLENS_APP;
GRANT SELECT ON ALL TABLES IN SCHEMA ZLENS_SAMPLE.TPCH TO APPLICATION ZLENS_APP;

No SNOWFLAKE_SAMPLE_DATA database in your account? Create it first:

CREATE DATABASE SNOWFLAKE_SAMPLE_DATA FROM SHARE SFC_SAMPLES.SAMPLE_DATA;

Step 8. Only if someone else will use it: let their role open the app

The role that installed the app can open it already. For another role, add it on the app’s Access management page, or run:

GRANT APPLICATION ROLE ZLENS_APP.app_user TO ROLE THEIR_ROLE;

Part 3: Open ZLens

Step 9. Launch app

On the app’s page, press Launch app. When setup is done, the launcher shows:

  • ZLens is ready;
  • Ask is ready: ZLens asks Claude through Snowflake Cortex;
  • the person it serves and the databases it can read.

Press Open ZLens.

The launcher saying ZLens is ready and Ask is ready, with the person it serves, the databases it can read and the Open ZLens button
  • How long it takes to start: usually 2 to 3 minutes. It can take up to 20 minutes the first time after an install or update, and the page shows the time so far.
  • Close the launcher tab once ZLens is open. While it stays open, it keeps two warehouses running.
  • If ZLens says Ask isn’t ready, it shows the one line an ACCOUNTADMIN needs to run.

Step 10. Sign in to ZLens

ZLens opens at its own address, and Snowflake asks you to sign in once more. The page names it SNOWSERVICES_INGRESS: this is Snowflake’s own sign-in. If your browser blocks the new tab, copy the address from the launcher instead.

Snowflake’s sign-in page for the app, named SNOWSERVICES_INGRESS

Part 4: Choose your data

Under a minute.

Step 11. Pick the schemas and press Read these tables

ZLens lists the schemas you granted, with their tables, rows and size. It also estimates how long reading and checking will take, and what the checks cost. With 100 tables or fewer, every schema is ticked already. Press Read these tables.

Choose your data: the granted schemas with their tables, rows and size, the time and cost estimate, and the Read these tables button

ZLens reads only names, types, comments and keys, and scans no table. That’s why it’s quick.

Step 12. Ready to ask, within seconds

ZLens says Ready to ask and offers four places to start. Press Finish setup · Open Ask.

Ready to ask: four places to start, and the Finish setup, Open Ask button

In the background, ZLens checks the keys, joins and rules behind the models it drafted. A strip at the top of the page shows the progress.

The Ask page, with the background checks shown in a strip at the top

Part 5: Ask your first questions

Step 13. Ask in your own words

Type a question and press Enter. Each answer shows:

  • its label, such as AI-generated with the checks it passed;
  • how ZLens read your question;
  • where the answer came from.
An answer labeled AI-generated, with the checks it passed, how ZLens read the question and where the answer came from

Answers stay AI-generated until you certify them (Part 7).

Step 14. Questions your data can’t answer

If no table holds what you asked, ZLens says Not in this data, runs no query, and says why.

An answer that says Not in this data and explains why, with no query run

Part 6: Review the models ZLens drafted

About 1 minute.

Step 15. Open the drafts

When the strip says ZLens drafted models and joins, press Review the drafts, then Review drafts. Nothing is saved until you do.

The strip saying ZLens drafted models and joins, with the Review the drafts button

Step 16. Accept all that passed

The panel lists the tables to answer from, the tables with a better table to use instead, and the joins and rules it checked. Press Accept all that passed. It leaves out anything that needs a look and saves the rest.

The review panel: tables to answer from, tables with a better table to use instead, the checked joins and rules, and the Accept all that passed button

The Map shows your models and how they join.

The model map, with the models and the joins between them

Part 7: Certify an answer

About 2 minutes.

A certified answer comes from a saved query you reviewed. Ask and dashboards then use it with no AI.

Step 17. Save the answer as a draft

Under an answer, press Save as saved query. Check its name and owner, then press Save draft.

The Save as saved query form with name and owner, and the Save draft button

ZLens says Saved as a draft. Press Review it.

The message Saved as a draft, with the Review it button

Step 18. Run it and read it

Press Run and look at the rows it returns. Then:

  • read How it’s worked out;
  • open SQL if you want the exact query;
  • check the Checks list.
The saved query after Run, with its rows, How it’s worked out, SQL and the Checks list

Optional: to check every value against a report you trust today, open ⋯ › Compare with an old report and upload that report’s CSV or Excel export. A match isn’t needed to certify. How the report check works.

Step 19. Certify

Press Certify. ZLens shows One last step: confirm you reviewed it. Look over the SQL and the rows it returns, then press I reviewed it — certify.

One last step: confirm you reviewed it, with the I reviewed it, certify button

The saved query is now CERTIFIED, with who certified it and the checks it passed.

The saved query marked Certified, with who certified it and the checks it passed

Step 20. Ask again

Ask the same question in a new chat. The answer is now labeled Certified answer, with the saved query and its owner. It runs the query you reviewed, not SQL that AI wrote.

The same question asked again, now labeled Certified answer, with the saved query and its owner

Saved queries keeps your Drafts and your Certified queries apart.

Saved queries, with the Drafts and Certified tabs

Next steps

Bring in the SQL behind your reports

In Saved queries, press Import. Paste SQL or upload files. ZLens reads:

  • SQL: .sql files;
  • Tableau: .twb or .twbx workbooks;
  • Power BI: a template (.pbit), model.bim or TMDL files.

Each query becomes a draft for you to review and certify. A .pbix file can’t be read: in Power BI, use File › Export › Power BI template, then import the .pbit.

The Import page: paste SQL, or upload SQL, Tableau or Power BI files, with the owner filled in

Stopping and starting

ZLens stops by itself after 60 minutes with no one using it, and your projects are kept. Launch app starts it again. To stop or start it now:

CALL ZLENS_APP.app_public.stop_app();
CALL ZLENS_APP.app_public.start_app();
The result of stop_app in a worksheet
The launcher starting ZLens again after Launch app

What it costs

The app is free. Snowflake bills your account for:

  • the compute pool: one CPU_X64_XS node while ZLens runs (about 0.06 credits an hour), and nothing once it has stopped;
  • the warehouse: extra-small, suspending after 60 seconds with no queries;
  • Cortex: the questions you ask, and search by meaning;
  • storage: the app’s volume and its daily snapshots.

If something looks wrong

  • “service is not yet running (serviceStatus=PENDING)”. You opened ZLens’s address while it was stopped or starting. Start from Launch app instead.
  • Snowsight asks you to select a warehouse. Pick your app’s own warehouse, which is your app’s name followed by _WH.
  • The launcher looks greyed out, with a Start button. Snowsight put the page to sleep. Press Start, then Check again.
  • “One step is missing: grant ZLens a database”. Run step 7’s lines: select them all, then press Run.
  • “Ask is not ready”. ZLens shows the one line an ACCOUNTADMIN runs, either the Cortex grant or the account’s cross-region setting. Which cross-region setting reaches Claude from your region explains the second.
  • Someone else opens ZLens. The free app serves one person. They’re told it is set up for someone else.

ZLens has no internet access. It reads only what you grant, sends nothing to its provider, and keeps its projects on a volume in your Snowflake account.

Get ZLens on Snowflake Marketplace

Free for one person. It runs inside your Snowflake account, asks Claude through Cortex, and labels every answer Certified, From Metrics or AI-generated.

More: ZLens for Snowflake · Use Claude in Snowflake · Check numbers against an old report · All guides

Snowflake, Snowsight and Cortex are trademarks of Snowflake Inc.; Claude is a trademark of Anthropic. ZLens is not affiliated with or endorsed by either.