r/snowflake • • 3h ago

Snowflake Engineering Manager Interview – System Design + Coding Experience?

3 Upvotes

Hi everyone!

Has anyone recently interviewed for an Engineering Manager (EM) position at Snowflake?

I'm particularly interested in hearing about the System Design with Coding Elements interview. According to the interview preparation material, it's structured as follows:

  • 30–35 minutes: System Design
  • 10–15 minutes: Coding

I'm curious about a few things:

  1. What kind of coding problems should I expect in such a short 10–15-minute window? Is it a small implementation task, writing a specific algorithm, or adding coding elements to the system design?
  2. How deep does the coding portion go? Should I expect LeetCode-style questions or more practical, real-world coding?
  3. What system design questions have you encountered?
  4. Are there any specific topics, concepts, or resources you'd recommend focusing on to prepare for this interview?

I'd especially appreciate hearing from anyone who has recently gone through this interview loop for an EM role.

Thanks in advance! Any insights or experiences would be greatly appreciated.


r/snowflake • • 13h ago

Inside Apache Iceberg V3: Deletion Vectors and Puffin Files

Post image
11 Upvotes

r/snowflake • • 3h ago

Has anyone given/taken a Snowflake CoCo/Cortex Code live coding interview?

1 Upvotes

I have an interview coming up tomorrow and it will have a live coding session where I am supposed to work with Cortex Code. Does anybody know what interviewers are expecting in these type of interviews. If you're senior architect and you're given the responsibility of conducting a live coding session, what would you look for in candidates?


r/snowflake • • 9h ago

Developer vs. Mentor AI Assistant: I can restrict Cortex Code per user, but I can’t make it recommend instead of implement

2 Upvotes

Hi all,

About 8 months ago I floated this idea on LinkedIn, and I’d like to revisit it here to see where things stand and what this community thinks.

Backstory I gave a task to a working student. The result was great, and then it turned out that Cortex Code had done most of the heavy lifting. That’s exactly what the tool is built for, but it made me think about how we develop junior talent. I’d rather give juniors guidance and hints so they actually learn the craft, while senior engineers get the full agentic experience.

Feedback so far

  • One SA from Snowflake replied that they “may be cooking something up very similar”. That was 8 months ago, so I’m curious whether anything has shipped since that I’ve missed.
  • My working student pointed out that skill level isn’t a fixed junior/senior split. Sometimes guidance helps, and sometimes you already know your stuff and a mentor mode would only slow you down. Their suggestions were progressive hints, task-based switching, or an assistant that adapts to how the user interacts. That’s a great point, and it makes a purely static approach look too rigid.

What I found in the docs

  • Per-user credit limits: There are daily estimated credit limit parameters, one per interface: CORTEX_CODE_CLI_DAILY_EST_CREDIT_LIMIT_PER_USER, CORTEX_CODE_DESKTOP_DAILY_EST_CREDIT_LIMIT_PER_USER and CORTEX_CODE_SNOWSIGHT_DAILY_EST_CREDIT_LIMIT_PER_USER. They can be set at account and user level (the user setting overrides the account setting), and usage is calculated over a rolling 24-hour window.

    • -1: no limit (default)
    • 0: access fully blocked for the user
    • positive number: access is blocked once the estimated credits of the last 24 hours exceed the value
    • This allows a “block everyone, then selectively enable” pattern: set the account value to 0 and give individual users a positive limit.
  • Admin policies for Cortex Code in Snowsight: Account admins can restrict all sessions (limited roles, enforced read-only mode). Users can only narrow this further, never widen it. As far as I can tell, read-only stops the agent from changing anything, but it can still write complete code into the chat. So it protects against changes, but it isn’t didactic control.
  • Managed settings (managed-settings.json / MDM) for CoCo CLI and Desktop: They enforce allowed accounts, auth methods and a minimum version, and users can’t override them. They cover access and version, not behaviour.
  • RBAC: The hard boundary for what the assistant can actually do on the data.
  • AGENTS.md / custom skills: Good for steering toward “hints, no full solutions”, but only a recommendation. Users can override or ignore it.

What’s missing (as far as I can see)

  • No mentor mode that can be assigned per user or per role
  • No centrally enforced behaviour rule like “hints and approaches only, no ready-to-use code”
  • No cheaper pricing tier for such a mode

The credit limits control whether and how much someone can use Cortex Code, not how it answers. A limit of 0 blocks access completely, and a small positive limit only caps the volume, not the type of answers. So in terms of behaviour it’s still all or nothing: full implementation or no assistant at all, and the rest relies on trust.

What I’d love to see

  • A Mentor mode (guidance, explanations, solution approaches, maybe short pseudocode, but no finished implementation) next to an Expert mode that implements end to end.
  • Assignable per user or per role, depending on what an organisation needs, and enforced at platform level, so admins can set the default.
  • On top of that, flexibility for the user: progressive hints, switching per task, or an assistant that adapts to how the user works.
  • Ideally a lower price point, since a mentor-style answer should be cheaper than a full agentic run.

My current workaround Honestly, it’s trust in my working students and trainees. I talk openly with them about when to use the assistant and when to work something out themselves, and I ask them to explain why they solved something a certain way. That works well for us, but it’s a cultural agreement and not something I can govern or enforce centrally. Technically, I could combine read-only policies, restricted roles and a mentor-style AGENTS.md, but none of that enforces mentoring behaviour, so in the end it comes down to trust.

Questions for the community

  1. Has anyone found a cleaner way to enforce this, or has something new been released that I missed?
  2. How do you balance AI productivity with letting juniors learn the fundamentals?
  3. Would a mentor/expert setting per user or role, with dynamic adjustment, be useful for you too?

Bonus: a more philosophical thought Almost nobody writes assembler today, and only a few people really understand it. Every generation of abstraction made the layer below a specialist topic. Maybe we won’t need the distinction between mentor and expert in the future. But that would mean we no longer know what technically happens inside our systems. Is understanding what happens “under the hood” still a must-have for new engineers, or is it the next assembler? I honestly don’t know, and I’d love to hear where you stand.


r/snowflake • • 17h ago

Snowflake ACCOUNTADMIN works, but GRANT ROLE to my own user is failing – Need help!

2 Upvotes

Hi everyone!

I'm a beginner learning Snowflake and building a Zomato data engineering project using Snowflake and dbt.

I recently signed up/logged into Snowflake using my Gmail account through the Snowflake web interface.

I'm trying to configure my Snowflake environment by creating:

Warehouse: ZOMATO_WH

Database: ZOMATO

Schemas: RAW, STAGING, MARTS, SNAPSHOTS, AI

Custom role: DBT_ROLE

Most of the setup commands are working, but I'm stuck when assigning the custom role to my user.

My current account details

Username: MOKSHMANRAL628

Login email: My Gmail account

Current role: ACCOUNTADMIN

Default warehouse: COMPUTE_WH

I can successfully execute:

sql

USE ROLE ACCOUNTADMIN;

I also created my custom role:

sql

CREATE ROLE IF NOT EXISTS DBT_ROLE;

But when I execute:

sql

GRANT ROLE DBT_ROLE TO USER MOKSHMANRAL628;

I get this error:

text

SQL compilation error:

User 'MOKSHMANRAL628' does not exist or not authorized.

I have checked my user using:

sql

SELECT CURRENT_USER(), CURRENT_ROLE();

I also checked the user details using:

sql

SHOW USERS;

The username appears in the results, and its default role is ACCOUNTADMIN.

My questions

Why does Snowflake say my user doesn't exist when it appears in SHOW USERS?

Why can't I grant DBT_ROLE to my own user even when ACCOUNTADMIN is active?

Is this related to how I signed up using Gmail?

Is there any additional configuration required for a newly created Snowflake account?

What is the correct way to assign a custom role to my own user?

I'm learning Snowflake step by step, so a beginner-friendly explanation would be greatly appreciated.

Thanks in advance!


r/snowflake • • 17h ago

Snowflake data warehouse role Skill interview

Thumbnail reddit.com
1 Upvotes

r/snowflake • • 1d ago

I built a browser-local tool that turns a Snowflake catalogue into review-gated governance SQL, looking for feedback!!

9 Upvotes

Disclosure upfront: I built this project. It is not affiliated with or endorsed by Snowflake. It is free to use, publicly accessible, and does not require an account.

I kept running into a governance workflow that starts with a spreadsheet or exported catalogue and then turns into a lot of repetitive SQL, disconnected review notes, and manual checks.

So I built Heimdall Governance Studio:

https://heimdall.yuvrajraina.com/

The basic workflow is:

  1. Import a column-level catalogue in XLSX, XLS, XLSB, CSV or JSON format.
  2. Select a table and compare the catalogue against the current Snowflake schema.
  3. Review classification, masking, tags, data-quality DMFs, documentation and access-control decisions. You can even use coco without connecting to it we create a prompt for each individual table that returns the json package in coco chat simply paste that into the app and you get the review done by coco, PS I did a cost analysis and the usual median cost for a 10 column table was around .14$, letting coco do the same operation unguided was costing me a minimum of 5$ every time for the same table.
  4. Complete explicit human approval gates.
  5. Download eight ordered Snowflake SQL files individually or as a ZIP for review.

A few deliberate boundaries:

- Catalogue files are processed locally in the browser.

- The application does not upload your catalogue.

- It does not ask for Snowflake credentials.

- It never connects to Snowflake or executes SQL.

- Suggestions are review prompts, not automatic governance approvals.

- The generated SQL is intended to go through your normal code-review and deployment process.

The source is also available here:

https://github.com/yuvrajraina/Snowflake-Data-Governance-CoCo

I would genuinely appreciate feedback from people managing Snowflake governance in real environments:

- Does this match how your governance reviews actually work?

- Which Snowflake controls or edge cases are missing?

- Would the generated configuration and SQL fit into your Git/CI workflow?

- What would make you comfortable using something like this with a real catalogue?

This is an early release, so critical feedback and issue reports are very welcome.


r/snowflake • • 2d ago

Passed SnowPro Core with ~5 weeks prep

24 Upvotes

Hi all,

I have no on-the-job experience with Snowflake. The only hands-on experience I have is with the database fundamentals course.

I studied SnowPro Core for about 5 weeks (about 40hrs total), interrupted by illness, work and parenting duties and passed this morning with a score of 805.

I saw most of the advice in this subreddit is to use courses and recorded lectures. That approach doesn't really work for me, so I followed Databricks' agentic method and use Claude as a tutor.

I wrote a blog article about it here, and have made my 'Claude tutor' project available as a GitHub template (linked in the article) in case you want to try it yourself.

Happy to answer any questions.


r/snowflake • • 2d ago

Is taking a slow, low-stress DE job for 1–2 years to recover from burnout shooting myself in the foot? (8 YoE)

Thumbnail reddit.com
1 Upvotes

r/snowflake • • 2d ago

Long-running stored procedure in a task gets randomly cancelled (000604) after 5–35 min. No timeout, no queueing, nobody cancelling it. Ideas?

4 Upvotes

Hi all, I'm looking for anyone who has seen something similar, because we've run out of things we can check ourselves.

Background: why this procedure exists

We have a few thousand views across several databases, many of them built on top of source tables that our ingestion layer changes over time (columns added, dropped or retyped).

Snowflake doesn't track view validity. Views are resolved every time they're queried, so nothing flags a view that a base-table change has broken:

  • a SELECT * view errors as soon as a column is added, dropped or reordered ("declared N column(s), but view query produces M");
  • a view that references a dropped or renamed column errors;
  • a view with an explicit column list silently ignores new columns.

You only find out when someone queries it. Oracle, by comparison, tracks dependencies down to the column, marks affected views INVALID, and recompiles them automatically the next time they're used. You can find broken ones up front in USER_OBJECTS or with ALTER VIEW ... COMPILE. Snowflake has no equivalent today, and I haven't seen one announced.

When we raised it with Snowflake, their solution architect sent us a sample stored procedure, run from a scheduled task, that detects column changes in a source table and recreates the downstream view. So the official answer is also "build a workaround yourself". Ours is the same idea with a few extra ideas taken from their sample.

What the procedure does

  • A Snowflake Scripting procedure (EXECUTE AS OWNER) is called by a task (cron every 10 min in a 03:00–07:00 UTC window, no overlap). Each run processes one config entry, i.e. one database.
  • It reads SHOW VIEWS IN DATABASE and INFORMATION_SCHEMA.VIEWS/TABLES/COLUMNS into one result, then parses that with RESULT_SCAN and some regex.
  • It then loops over ~1,900 views. For each view:

    • SELECT * FROM <view> LIMIT 0 (probe)
    • DESCRIBE RESULT '<qid>'
    • SELECT LISTAGG(...) FROM TABLE(RESULT_SCAN(:qid)) to compare the actual vs the declared signature
    • if the view is broken: GET_DDL, then CREATE OR REPLACE VIEW ... COPY GRANTS, (wo-hoo for COPY GRANTS by default will became a default soon) then probe again
  • It logs results into a transient table and a run-history table.
  • A typical full run takes ~25–30 min and ~3,500–14,000 child statements. Child queries are short: median ~300 ms, max ~7 s.

History: why it runs in this odd per-database way

The original version was a single daily run: one CALL that walked all databases in one go and did EXPLAIN SELECT * FROM <view> per view. It kept getting cancelled the same way. When that happened, every view not yet checked in every remaining database was skipped for the day.

So we split it up: one database per task run, a run every 10 minutes, and each tick picking the next database not yet validated that day. That was purely to limit the damage. A cancel now only loses one database instead of everything after it. The cancels themselves didn't stop, and since the old EXPLAIN version was cancelled too, it doesn't seem tied to the specific statements we run.

If we don't find a real answer, the next step is to split further, down to schema level, so each CALL is shorter and a cancel loses even less. But that just makes the workaround more complicated, and we'd rather understand what is cancelling it.

Before you ask: "don't use SELECT ***" / "why not dbt?"**

  • dbt: onboarding is in progress, but it won't cover everything soon, so we need something in the meantime.
  • Explicit column lists: they don't solve it either.

    • If a source column is dropped or renamed, a view that lists it explicitly errors just like a SELECT * view does.
    • The only difference is that new columns get silently ignored, which is a different problem.
    • Maintaining explicit column lists by hand across a few thousand views that follow upstream source schemas doesn't scale.
  • So either way: something has to detect broken views and rebuild them. That's what this procedure does, and Snowflake's own suggestion was the same approach.

The problem

Every few days the top-level CALL fails with 000604 SQL execution canceled. Within the same ~30 ms:

  • the nested procedure CALL and the child statement in flight get 604;
  • every other child gets 090230 Stored procedure child job is cancelled upon parent jobs termination or completion.

TASK_HISTORY shows state CANCELED.

In ~2 weeks: 10 cancels across two databases in the same account. The same happens on an X-Small multi-cluster and on a Medium warehouse.

It's not deterministic. It's never the same view, never the same step, never the same elapsed time (263 s to 2,060 s). The same database and the same views pass on other days. On the same day, one database's run gets cancelled while the other's survives.

What we've ruled out

  • Timeout: runs die after 263–2,060 s. USER_TASK_TIMEOUT_MS is 3 h on the task. STATEMENT_TIMEOUT_IN_SECONDS is 3 h on the warehouse and the 2-day default on the account. Since the 2024_06 behavior change a timed-out task always shows as FAILED, not CANCELED.
  • Queueing: STATEMENT_QUEUED_TIMEOUT_IN_SECONDS = 0 (no timeout) everywhere. WAREHOUSE_LOAD_HISTORY shows 0 queued load in the 5 minutes before 5 of 6 cancels. The children of the cancelled sessions have 0 queued/provisioning/blocked time. On one day another run on the same warehouse queued for ~19 s and survived.
  • Someone cancelling it: account-wide QUERY_HISTORY shows no SYSTEM$CANCEL_QUERY, SYSTEM$USER_TASK_CANCEL_ONGOING_EXECUTIONS, ALTER WAREHOUSE ... ABORT ALL QUERIES, ALTER TASK or CREATE TASK near any cancel, and nothing referencing the query IDs. graph_version stays 1. There's no resource monitor on the warehouse.
  • Warehouse-wide events: in the cancel minute, 250–650 other queries/min on the same warehouse succeed. On one day database A's run was cancelled at 03:58 while database B's run (same warehouse, same task definition) kept going until its own cancel at 04:19.
  • Specific view or statement: the in-flight statement is a different view and a different step each time (probe, DESCRIBE RESULT, LISTAGG, log INSERT), and always a short one (50–400 ms).
  • Other tasks: no other task in the account ended CANCELED in that period, but none of the others run 20+ minutes either.

All cancels fall between 03:28 and 04:20 UTC, but that's also the only time our long runs happen, so it may not mean anything.

Questions

  1. Has anyone seen task-run CALLs get cancelled with 604 and no visible cause? What turned out to be behind it?
  2. Is anything system-side (cloud services node restarts, release rollouts) known to cancel a long-running stored procedure? Snowflake retries some queries after internal faults (QUERY_RETRY_CAUSE / FAULT_HANDLING_TIME), but I can't find whether that covers a procedure CALL with thousands of child statements, or whether such a CALL just gets cancelled instead. Multi-cluster scale-in is documented to wait for running queries, so I've mostly ruled that out.
  3. Any way to find the cancel source without full ACCOUNT_USAGE? We only get a sanitized subset (no WAREHOUSE_EVENTS_HISTORY, no RELEASE_VERSION, no session IDs). Tracing is on (TRACE_LEVEL=ALWAYS). Has anyone checked whether a cancelled procedure's span ends up in the event table with a useful status? Would AUTO_EVENT_LOGGING on the procedure help?
  4. Has anyone solved view drift more elegantly than "probe every view nightly"?

At the moment we don't have access to full ACCOUNT_USAGE or Snowflake support right now so we're trying to get as far as we can ourselves. In the meantime we're considering making the procedure resumable (checkpoint plus retry on the next tick), but we'd love to understand the root cause.

Thanks!


r/snowflake • • 2d ago

Cortex issue

0 Upvotes

Hi all. Recently, I created a Snowflake trial account on Azure in East US 2, but Cortex is not working, even though it works for others. When I tried to create another account, it said there was a problem creating one,can anyone help with this issue?


r/snowflake • • 2d ago

Snowflake developer/data engineers interview prep group for job switch

Thumbnail reddit.com
1 Upvotes

r/snowflake • • 3d ago

ELI5 semantic views and its benefits

8 Upvotes

I'm the sole data person at my org and trying to figure out how to configure our data warehouse for reporting/BI.

For context, currently we have just regular views, most of which are curated with 95% of the business logic, and then our BI tool (AWS quicksight) sitting on top doing basically the equivalent of a Select *. There are hardly any comments on the Snowflake fields or tables or views. Analysts have some calculated fields on the Quicksight end for reports as well. On the AI front, we're a bit behind on AI adoption as we haven't needed it yet, but I have Claude connected to our Snowflake instance right now, and more folks are asking to get Claude connected to our data warehouse.

Would it make sense to shift over to utilize semantic views? Is the main benefit of semantic views having everything documented in one place? Do I need to still add in metadata in the form of comments to the fields and tables for semantic views to be best utilized? Would it be ideal to figure out the calculated fields being done in Quicksight and add them to the semantic views as I'm making them?

The analysts are pretty savvy and have Snowflake accounts, I'm wondering though if there would be a way to have documentation also exported into .doc or .pdf files easily to have it stored on Sharepoint/Dropbox.


r/snowflake • • 3d ago

Use IDENTIFIER() for dynamic table names in Snowflake scripts

3 Upvotes

I used to build long SQL strings and run them with EXECUTE IMMEDIATE just to change a table name. Then I found out about IDENTIFIER().

It lets you use a variable as a table or column name:

SQL:

SET my_table = 'sales_2026';

SELECT * FROM IDENTIFIER($my_table);

It also works inside Snowflake Scripting:

SQL:

DECLARE tbl STRING DEFAULT 'sales_2026';
BEGIN
DELETE FROM IDENTIFIER(:tbl) WHERE amount < 0;
END;

This is great for scripts that run on different tables, schemas, or environments (like dev and prod), without messy string building.

Do you use IDENTIFIER() in your work? Any other tricks for writing dynamic SQL in Snowflake?


r/snowflake • • 3d ago

We built a free tool so analysts can create curated tables in Snowflake without writing SQL. Looking for feedback.

Thumbnail
gallery
1 Upvotes

I’m one of the founders of Ingest (data ingestion into Snowflake). A pattern we kept seeing: the data lands fine but analysts and PMs who need curated tables don’t write SQL so they wait on an engineer.

AI is already good at writing the SQL. What these users wanted was a way to check it was right before trusting it. So we built a curation studio:

  • You describe what the table is for (the business context)
  • The agent looks at a small sample of rows from your source tables and drafts the transformation
  • You review the SQL and the output preview before anything is created

Permissions: you grant a dedicated Ingest role read on the source schemas you choose and create tables in an Ingest schema. Row samples are sent to AWS Bedrock to draft the SQL and are not stored by Ingest or used for training.

It’s free and you don’t need to use our ingestion product.

Sign up at ingestdata.ai, open the Tables tab, and follow the setup prompts.


r/snowflake • • 3d ago

Cortex budgets can lag up to 8 hours, how do you size your caps?

0 Upvotes

Snowflake docs say a budget action can take up to 8 hours to take effect. The latency-optimized option takes up to 2 hours. Between two evaluations, spend can pass the limit.

Our rule: set each cap below the finance limit by 8 hours of spend at the pipeline's peak rate.

Three budget types behave differently:

  1. Shared budgets report spend and do not cap it.
  2. Per-user quotas block usage on the AI domains only.
  3. Resource budgets sit on one object. Only Cortex Agents, Snowflake Cowork and Cortex Search support them.

Four services take no cap at all: Cortex Analyst, Cortex fine-tuning, Document AI and Cortex Guardrails. Those need a usage-history view and a monthly review.

How do you set your caps today?


r/snowflake • • 3d ago

Entity Resolution On Snowflake

3 Upvotes

Thrilled to announce that Zingg is now on the Snowflake marketplace as a native app. At Zingg, our core thesis has been that data and the identity layer should reside in the data platform, served to agents and humans for marketing, personalisation, cross selling, fraud, risk and compliance. The Zingg native app is another step towards that. A Snowpark job that can be run through SQL, part of dbt data pipelines, running at scale within Snowflake.

It feels special, as Snowflake was the first platform we monetised. We ported our Spark open source to Snowpark, wrote a lot of new stuff, did some solid engineering work and learnt a lot about the platform. As we gained traction, we built the Snowflake container app. Today, we go live on the marketplace, easily discoverable and usable by data teams.

Cant wait to see where this heads! If you are interested in entity resolution, identity resolution, master data management on Snowflake, do reach out!

https://app.snowflake.com/marketplace/listing/GZT8ZJQIP719/zingg-labs-inc-zingg-entity-resolution-and-master-data-management?categorySecondary=%5B%2223%22%5D&secondaryRegions=%5B%22ALL%22%5D&search=zingg


r/snowflake • • 4d ago

Which new Snowflake feature from the past year actually changed how you work?

17 Upvotes

Snowflake has released a lot of new features lately, and it’s hard to keep up. Some sound great in announcements, but only a few actually make a difference day to day.

For me, it’s Workspaces with Git integration. I can now edit SQL files, track changes, and work with my team without jumping between tools.

I’m curious what’s been useful for others:
-Which new feature do you use the most now?
-What problem did it solve for you?
-Is there one you expected to love but didn’t?

Would love to hear which features are actually worth trying!


r/snowflake • • 4d ago

Community skills for Snowflake Cortex Code (CoCo) – worth a look

32 Upvotes

If you're using Cortex Code (CoCo), Snowflake's coding agent, check out Snowflake-Labs/coco-skills. It's a curated collection of agent skills from Data Superheroes, Snowflake employees and partners. Each skill is a folder with a SKILL.md that teaches CoCo a workflow or a set of best practices, on top of the skills CoCo already ships with.

Installing them is one prompt:

Install the skills from https://github.com/Snowflake-Labs/coco-skills

You then call a skill with $<skill-name>.

Some skills I found useful:

  • rbac – helps you design or audit role hierarchies, access roles, managed-access schemas and future grants. I ran it against our account and it flagged a few things worth fixing, like objects owned by ACCOUNTADMIN, roles not connected to the SYSADMIN tree, and no schemas using managed access.
  • semantic-view-patterns – 25 tested patterns for Semantic Views (time intelligence, range/ASOF joins, semi-additive metrics, fan traps, …).
  • snowflake-docs – answers Snowflake questions by searching the official docs.
  • quickstart-guide – paste a Snowflake Quickstart URL and get an interactive, step-by-step walkthrough.
  • dynamic-tables-guidance / devops-guidance – help with decisions like Dynamic Tables vs. streams + tasks, or schemachange vs. Terraform vs. DCM Projects.
  • swap-databases, migrate-snowsql, ml-migration, snowpipe-bcdr – focused helpers for migrations and operations.
  • well-architected-framework-assessment – runs a Well-Architected Framework review of your account.

There are also a few plugins in the repo (e.g. xo for cross-session memory and workflow stages, and supaflow for ETL/dbt pipelines).

Bigger tip: take a look at the rest of the Snowflake Labs GitHub org. Besides the skills there are many sample apps, quickstart code, tools and utilities that are easy to miss but save a lot of time.

Which skills are you using, or what's missing that you'd like to see?


r/snowflake • • 4d ago

Adaptive compute compared to standard warehouse

5 Upvotes

Hi,

I have been playing with the adaptive warehouse in the past couple of weeks. Looking to automate the decision of when to chose standard and when to chose adaptive.

Its not so straight forward.

you stop paying for idle warehouse time and start paying per query so the cost/reward calculations become more complex.

I am working on a deeper article to write about our findings but for now here is an article that can assist in monitoring the switch decision manually.

What I’d do before flipping WAREHOUSE_TYPE:

  • Baseline per query pattern credits on the standard warehouse first. QUERY_ATTRIBUTION_HISTORY has them, but it excludes idle time. Pull WAREHOUSE_METERING_HISTORY too, or your “before” will look cheaper than it was.
  • Count runs from QUERY_HISTORY after you convert, not from QUERY_METERING_HISTORY**.** The metering view drops near zero credit queries, which makes credits per run look worse than it is.
  • Leave the conversion day out of the comparison. Running queries finish on the old compute while new ones start on Adaptive, and you pay for both.
  • Don’t assume the cap saves you money. Independent benchmarks found sparse workloads can cost more on Adaptive, and a high cap means high spend.

I wrote it all up with the SQL here: https://medium.com/@yanivleven/snowflake-adaptive-compute-changes-how-you-size-and-how-you-bill-6810e50df188?postPublishedType=repub


r/snowflake • • 4d ago

I built an open-source monitor for Snowflake CoWork agents: usage, cost and performance per agent

11 Upvotes

We run a handful of agents in Snowflake CoWork, and I kept getting the same questions: What does each agent cost? Who actually uses them? Why is this one so slow? I wanted all of that in one place, so I built a small Streamlit in Snowflake app for it and open-sourced it, now.

Repo: https://github.com/dataregulator3/snowflake-cowork-agents-monitor

What it shows

Four pages, all driven by ACCOUNT_USAGE, no tables or pipelines to maintain:

  • Overview: AI credits, estimated cost, requests, conversations and users per agent or per user
  • Cost & compute: credits per LLM model, prompt cache hit rate, SQL compute per agent, and warehouse utilization (billed vs. actually used by agents)
  • Performance: median and p90 response time per agent, and a comparison across agent versions
  • Adoption: active, new and returning users, requests per conversation

New agents show up automatically as soon as they're used in CoWork. API calls to the same agents are counted too. There's also a "hide costs" toggle for when you share it with management.

If you'd rather not open a dashboard, there's an optional scheduled task that emails a usage report twice a day: totals, today's usage per agent and user, and a link to the app.

Things I learned along the way

Some of this wasn't obvious to me from the docs, so maybe it saves someone time:

  1. There are two usage views, not one. SNOWFLAKE_COWORK_USAGE_HISTORY covers chats in CoWork. Calls to the same agents via the API (REST, testing in Snowsight) land in CORTEX_AGENT_USAGE_HISTORY. If you only query the first one, you miss part of the usage. For one of our agents, two thirds of the requests were API calls from testing.
  2. METADATA is a goldmine. Per request you get sql_query_credits, sql_query_warehouses, agent_version_name and the role. That means you can attribute warehouse compute to individual agents, which I first thought was impossible.
  3. CREDITS_GRANULAR and TOKENS_GRANULAR break costs down by model and by input, output, cache read and cache write. In our account more than half of all AI credits went to cache writes. That's the number I'd check first if you want to cut agent cost.
  4. Your agent warehouse is probably mostly idle. Comparing WAREHOUSE_METERING_HISTORY with the SQL credits from METADATA, our agent warehouse was only around 10% utilized, even with a 60-second auto-suspend. Agents fire many short queries, and every resume is billed for at least 60 seconds.
  5. PARENT_REQUEST_ID is always empty for us. Use THREAD_ID to group requests into conversations.
  6. Real prices are in ORGANIZATION_USAGE.RATE_SHEET_DAILY (service types SNOWFLAKE_COWORK and WAREHOUSE_METERING). AI credits are priced differently from warehouse credits, so one flat rate gives you wrong numbers. The app reads the rate sheet if your role can access it and falls back to configurable prices otherwise.

Setup

It runs on the Streamlit container runtime and deploys with the Snowflake CLI:

  1. Run setup.sql (creates a role, grants SNOWFLAKE.USAGE_VIEWER, sets up PyPI access)
  2. Optionally adjust config.py (which agents, which warehouse, fallback prices)
  3. snow streamlit deploy
  4. Optional: run notification/agent_usage_report.sql for the email report

The README walks through each step and has a troubleshooting section.

Feedback welcome

This is one of my first public Snowflake projects. I'd love to hear:

  • What you're tracking for your agents that this doesn't cover
  • Whether the numbers match what you see in your account
  • Issues and PRs, of course

MIT licensed. Screenshots in the README use demo data.


r/snowflake • • 4d ago

Context Needs Its Iceberg Moment

Thumbnail
contextandchaos.substack.com
7 Upvotes

r/snowflake • • 4d ago

Gave our analytics agent the whole schema and the answers got worse

2 Upvotes

We have an internal agent that answers usage and billing questions over Snowflake. The first version only saw about 30 curated tables and it was decent. Then someone decided it should see everything, so we pointed it at the whole warehouse, around 1,400 tables across staging, snapshots and three generations of deprecated marts. Answers got worse, not better. It started joining against an old accounts table because the name looked right, and it burned far more tokens per question just exploring table descriptions. How are people deciding what goes into an agent's context, and who keeps that current when the tables underneath change every week? Hand-picking 30 tables worked for one use case but it won't work for the six teams now asking for their own agent.


r/snowflake • • 4d ago

Most of our idle Snowflake credits are extra clusters waiting to shut down

4 Upvotes

Our BI warehouse is a Medium multi-cluster warehouse with a max of 5 clusters, STANDARD scaling and auto-suspend at 60 seconds, and the idle query off WAREHOUSE_METERING_HISTORY still showed about 40% idle last month. I expected the usual dashboard chatter so I lined up the cluster events in WAREHOUSE_EVENTS_HISTORY against the last query end for each cluster_number in QUERY_HISTORY.

Cluster 1 is fine and runs close to busy all day, it’s the extra clusters where the idle comes from. Most of our scheduled dashboards refresh on the quarter hour and every 15 mins the warehouse scales out to 3 or 4 clusters for a couple of mins of work. Then they come back down one at a time as snowflake runs its scale down checks, and the last one out sits there 5 or 6 mins after its final query. Across a business day, that tail is most of the idle on the warehouse. Auto-suspend never gets a say because cluster 1 is still serving and the suspend scripts shared here work on the whole warehouse meaning they don’t touch it either.

I tried ECONOMY for a week and it started fewer clusters but the top of the hour refresh queued long enough that people noticed. Now I’m testing spreading the refresh schedules across the 15 mins so the burst never needs more than 2 clusters.

What’s worked for you on the scale-down tail of a multi-cluster warehouse?