<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged snowflake</title>
<link>https://coderlegion.com/tag/snowflake</link>
<description>Powered by Question2Answer</description>
<item>
<title>Ask Your Snowflake Account Anything — Build an AI Admin Agent with Cortex + GitHub Copilot ( Part 1 )</title>
<link>https://coderlegion.com/26370/ask-your-snowflake-account-anything-build-an-admin-agent-with-cortex-github-copilot-part</link>
<description>&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; — Spin up a Snowflake Cortex Agent that can answer admin questions like &lt;em&gt;&quot;Which warehouses burned the most credits last month?&quot;&lt;/em&gt; or &lt;em&gt;&quot;Who are my top 5 spenders?&quot;&lt;/em&gt; — all from a natural-language prompt inside GitHub Copilot Chat.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-problem&quot;&gt;The Problem&lt;/h3&gt;
&lt;p&gt;Snowflake &lt;code&gt;ACCOUNT_USAGE&lt;/code&gt; contains everything you need to understand spend, performance, and security. The catch? You have to know the right table, the right join, and write it correctly every time.&lt;/p&gt;
&lt;p&gt;What if you could just ask?&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-you-ll-build&quot;&gt;What You'll Build&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;GitHub Copilot Chat
      │  (natural language)
      ▼
MCP Server (Python, local)
      │  ask_admin tool
      ▼
Snowflake Cortex Agent
      │  routes to the right semantic view
      ▼
SNOWFLAKE.ACCOUNT_USAGE (+ optional ORGANIZATION_USAGE)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;By the end you'll be able to type questions like these into Copilot Chat and get back answers with real numbers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;What are total compute credits by warehouse in the last 30 days?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Which users consumed the most credits this month?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;How many failed logins occurred in the last 7 days?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;What are serverless credits by service type?&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Requirement &lt;/th&gt;&lt;th&gt;Notes&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Snowflake account (any paid edition) &lt;/td&gt;&lt;td&gt;&lt;code&gt;ACCOUNTADMIN&lt;/code&gt; or a role with &lt;code&gt;ACCOUNT_USAGE&lt;/code&gt; access&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Python 3.9+ &lt;/td&gt;&lt;td&gt;For the MCP bridge&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;VS Code + GitHub Copilot Chat &lt;/td&gt;&lt;td&gt;Agent mode enabled&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Git &lt;/td&gt;&lt;td&gt;To clone the template&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-1-clone-the-template&quot;&gt;Step 1 — Clone the Template&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;git clone https://github.com/LALITHASWAROOPK/agent_snowflake_admin_assistant.git
cd agent_snowflake_admin_assistant/agent_snowflake_admin
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Open the folder in VS Code:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;code .
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-2-deploy-the-sql-objects-5-scripts-5-minutes-&quot;&gt;Step 2 — Deploy the SQL Objects (5 scripts, ~5 minutes)&lt;/h3&gt;
&lt;p&gt;All SQL is in the &lt;code&gt;sql/&lt;/code&gt; folder. Replace the four placeholders before running:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Placeholder &lt;/th&gt;&lt;th&gt;What to set&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;&amp;lt;APP_DB&amp;gt;&lt;/code&gt; &lt;/td&gt;&lt;td&gt;A database to hold your views/agent&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;&amp;lt;APP_SCHEMA&amp;gt;&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Schema inside that database&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;&amp;lt;ADMIN_ROLE&amp;gt;&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Role that owns the objects&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;&amp;lt;DEVELOPER_ROLE&amp;gt;&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Role that will query the agent&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;&amp;lt;EXEC_WAREHOUSE&amp;gt;&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Warehouse the agent will use at runtime&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Run them in order in a Snowflake worksheet or SnowSQL:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;@sql/01_create_views.sql        -- Base views over ACCOUNT_USAGE
@sql/02_create_semantic_views.sql  -- Semantic layer (natural-language metadata)
@sql/03_create_agent.sql        -- Cortex Agent wired to those views
@sql/04_create_budget.sql       -- Optional: spending guardrails
@sql/05_grants.sql              -- RBAC grants
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;what-the-views-cover&quot;&gt;What the Views Cover&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;01_create_views.sql&lt;/code&gt; builds seven base views, all sourced exclusively from &lt;code&gt;SNOWFLAKE.ACCOUNT_USAGE&lt;/code&gt; — no custom tables, no proprietary schemas:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;View &lt;/th&gt;&lt;th&gt;Source&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;V_WAREHOUSE_COST_BY_TAG&lt;/code&gt; &lt;/td&gt;&lt;td&gt;&lt;code&gt;WAREHOUSE_METERING_HISTORY&lt;/code&gt; + &lt;code&gt;TAG_REFERENCES&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;V_QUERY_PERFORMANCE&lt;/code&gt; &lt;/td&gt;&lt;td&gt;&lt;code&gt;QUERY_HISTORY&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;V_USER_SPEND&lt;/code&gt; &lt;/td&gt;&lt;td&gt;&lt;code&gt;QUERY_ATTRIBUTION_HISTORY&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;V_SERVERLESS_COSTS&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Tasks, pipes, clustering, search, MV refresh&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;V_STORAGE_USAGE&lt;/code&gt; &lt;/td&gt;&lt;td&gt;&lt;code&gt;STORAGE_USAGE&lt;/code&gt; + &lt;code&gt;DATABASE_STORAGE_USAGE_HISTORY&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;V_LOGIN_HISTORY&lt;/code&gt; &lt;/td&gt;&lt;td&gt;&lt;code&gt;LOGIN_HISTORY&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;V_DATA_TRANSFER&lt;/code&gt; &lt;/td&gt;&lt;td&gt;&lt;code&gt;DATA_TRANSFER_HISTORY&lt;/code&gt; + &lt;code&gt;REPLICATION_USAGE_HISTORY&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;code&gt;02_create_semantic_views.sql&lt;/code&gt; wraps each base view with a &lt;code&gt;COMMENT&lt;/code&gt; block that tells the Cortex Agent what the view is for — this is how the agent knows which view to query for any given question.&lt;/p&gt;
&lt;h4 id=&quot;why-semantic-views-&quot;&gt;Why Semantic Views?&lt;/h4&gt;
&lt;p&gt;Snowflake Cortex Agents use &lt;strong&gt;semantic views&lt;/strong&gt; as tool definitions. A semantic view is just a standard view with a &lt;code&gt;COMMENT&lt;/code&gt; that describes its purpose in natural language. The agent reads those comments at inference time to decide which tool (view) answers the user's question.&lt;/p&gt;
&lt;p&gt;No prompt engineering required on your end.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-3-start-the-mcp-bridge&quot;&gt;Step 3 — Start the MCP Bridge&lt;/h3&gt;
&lt;p&gt;The MCP (Model Context Protocol) server is a lightweight Python HTTP server that exposes one tool — &lt;code&gt;ask_admin&lt;/code&gt; — which Copilot Chat can call.&lt;/p&gt;
&lt;h4 id=&quot;install-dependencies&quot;&gt;Install dependencies&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pip install -r mcp/requirements.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;configure-your-environment&quot;&gt;Configure your environment&lt;/h4&gt;
&lt;p&gt;Create a &lt;code&gt;.env&lt;/code&gt; file in the repo root (never commit this):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-env&quot;&gt;SNOWFLAKE_ACCOUNT=&amp;lt;your_account&amp;gt;
SNOWFLAKE_USER=&amp;lt;your_user&amp;gt;
SNOWFLAKE_AUTHENTICATOR=externalbrowser
SNOWFLAKE_ROLE=&amp;lt;DEVELOPER_ROLE&amp;gt;
SNOWFLAKE_WAREHOUSE=&amp;lt;EXEC_WAREHOUSE&amp;gt;
SNOWFLAKE_AGENT_FQN=&amp;lt;APP_DB&amp;gt;.&amp;lt;APP_SCHEMA&amp;gt;.&amp;lt;AGENT_NAME&amp;gt;
MCP_PORT=3000
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;&lt;p&gt;Supports &lt;code&gt;externalbrowser&lt;/code&gt; (SSO), &lt;code&gt;snowflake&lt;/code&gt; (password), and OAuth — set &lt;code&gt;SNOWFLAKE_AUTHENTICATOR&lt;/code&gt; and the matching credential variable.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;launch-the-server&quot;&gt;Launch the server&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;./scripts/start-mcp.ps1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or directly:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;python mcp/server.py
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Verify it's up:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;Invoke-RestMethod -Uri http://127.0.0.1:3000/health -Method Get
# → {&quot;status&quot;:&quot;ok&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-4-connect-copilot-chat&quot;&gt;Step 4 — Connect Copilot Chat&lt;/h3&gt;
&lt;p&gt;The repo ships a pre-configured &lt;code&gt;.vscode/mcp.json&lt;/code&gt; that wires the local MCP server into VS Code:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
  &quot;mcpServers&quot;: {
    &quot;snowflake-admin&quot;: {
      &quot;url&quot;: &quot;http://127.0.0.1:3000&quot;
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;VS Code picks this up automatically when you open the workspace. You'll see the &lt;code&gt;ask_admin&lt;/code&gt; tool listed inside Copilot Chat's tool picker.&lt;/p&gt;
&lt;p&gt;There's also a GitHub Copilot instruction file at &lt;code&gt;.github/instructions/admin.instructions.md&lt;/code&gt; which gives Copilot context about the agent's scope so it routes questions there automatically.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-5-ask-it-questions&quot;&gt;Step 5 — Ask It Questions&lt;/h3&gt;
&lt;p&gt;Switch Copilot Chat to &lt;strong&gt;Agent mode&lt;/strong&gt; and try:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;What are my top 5 warehouses by compute credits in the last 30 days?
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;Which users have spent the most credits this month?
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;Show me failed logins by user in the last 7 days.
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;What serverless services are costing me the most right now?
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;What's my current storage usage broken down by database?
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The agent selects the right semantic view, runs the query, and returns a plain-English answer with the numbers inline — no SQL, no context switching.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;optional-budget-guardrails&quot;&gt;Optional: Budget Guardrails&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;04_create_budget.sql&lt;/code&gt; sets up a Snowflake Budget object so you can enforce credit limits at the agent level. Handy for keeping a shared admin agent from running runaway queries:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CALL &amp;lt;APP_DB&amp;gt;.&amp;lt;APP_SCHEMA&amp;gt;.&amp;lt;BUDGET_NAME&amp;gt;!SET_SPENDING_LIMIT(100);
CALL &amp;lt;APP_DB&amp;gt;.&amp;lt;APP_SCHEMA&amp;gt;.&amp;lt;BUDGET_NAME&amp;gt;!GET_SPENDING_HISTORY();
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;architecture-recap&quot;&gt;Architecture Recap&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;┌─────────────────────────────────────┐
│         GitHub Copilot Chat         │
│      (Agent mode + ask_admin tool)  │
└────────────────┬────────────────────┘
                 │ HTTP / MCP
┌────────────────▼────────────────────┐
│      MCP Bridge  (mcp/server.py)    │
│  Exposes: /mcp/tools/list           │
│           /mcp/tools/call           │
│           /health                   │
└────────────────┬────────────────────┘
                 │ snowflake-connector-python
┌────────────────▼────────────────────┐
│   SNOWFLAKE.CORTEX.DATA_AGENT_RUN   │
│   ← Cortex Agent (semantic router)  │
└────────────────┬────────────────────┘
                 │ picks the right tool
┌────────────────▼────────────────────┐
│     Semantic Views (SV_*)           │
│     Base Views    (V_*)             │
│     ↑ SNOWFLAKE.ACCOUNT_USAGE       │
└─────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;key-things-to-know&quot;&gt;Key Things to Know&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Account Usage latency&lt;/strong&gt;: &lt;code&gt;SNOWFLAKE.ACCOUNT_USAGE&lt;/code&gt; is typically delayed by up to a few hours — not real-time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rate sheet&lt;/strong&gt;: &lt;code&gt;ORGANIZATION_USAGE.RATE_SHEET_DAILY&lt;/code&gt; is optional and depends on your edition/region.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auth flexibility&lt;/strong&gt;: The MCP server supports SSO (&lt;code&gt;externalbrowser&lt;/code&gt;), OAuth, and password auth — configure once in &lt;code&gt;.env&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;get-the-code&quot;&gt;Get the Code&lt;/h3&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/LALITHASWAROOPK/agent_snowflake_admin&quot;&gt;github.com/LALITHASWAROOPK/agent_snowflake_admin_assistant&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;PRs and issues welcome. If you build on top of this, tag me — I'd love to see what you add.&lt;/p&gt;
&lt;hr&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/26370/ask-your-snowflake-account-anything-build-an-admin-agent-with-cortex-github-copilot-part</guid>
<pubDate>Mon, 07 Sep 2026 05:46:43 +0000</pubDate>
</item>
<item>
<title>Moving Data Is Easier Than Moving Knowledge</title>
<link>https://coderlegion.com/26369/moving-data-is-easier-than-moving-knowledge</link>
<description>&lt;blockquote&gt;&lt;p&gt;This is Part 1 of a two-part technical series. &lt;a rel=&quot;nofollow&quot; href=&quot;https://medium.com/@ghrupakkumar/how-to-use-ai-agents-to-build-ai-ready-data-products-c19ea4895102&quot;&gt;Rupak's article on building AI-ready data products&lt;/a&gt; describes the larger destination: a machine-readable context layer, governed semantics, and engineering guardrails. This post tackles the migration problem that comes first—recovering legacy knowledge and turning it into grounded SQL. Part 2 will cover natural-language questions, governed execution, and explained answers.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;All examples and names below are synthetic&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Moving data is often the easier part of an SAP-to-cloud migration. Moving the knowledge is harder.&lt;/p&gt;
&lt;p&gt;A pipeline can copy a table. It does not automatically carry forward why two tables are joined, which filter defines an open order, how technical statuses become business terms, or who owns the report.&lt;/p&gt;
&lt;p&gt;Without that context, a new platform can produce a technically valid answer that is wrong for the business.&lt;/p&gt;
&lt;h3 id=&quot;a-question-the-copied-tables-cannot-answer&quot;&gt;A question the copied tables cannot answer&lt;/h3&gt;
&lt;p&gt;Imagine an estate with more than 5,000 SAP HANA calculation views, hundreds of Qlik and Spotfire applications, and more than 2,500 cloud tables.&lt;/p&gt;
&lt;p&gt;A data engineer receives a simple request:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Rebuild our sales-order backlog dashboard. What existing logic should I preserve?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The answer is scattered. A HANA calculation view may define the joins, filters, and open quantity. A Qlik application may map technical statuses and write a shared QVD. A Spotfire analysis may implement its own aging logic. Ownership and downstream usage may live in reporting metadata, while field-level dependencies live in a lineage graph.&lt;/p&gt;
&lt;p&gt;Qlik and Spotfire are &lt;strong&gt;parallel reporting platforms over HANA&lt;/strong&gt;. They are not sequential stages feeding one another; the same HANA model may support applications in either or both.&lt;/p&gt;
&lt;p&gt;The migration task is therefore not just code conversion. It is evidence discovery.&lt;/p&gt;
&lt;h3 id=&quot;how-the-assistant-builds-context&quot;&gt;How the assistant builds context&lt;/h3&gt;
&lt;p&gt;We call the user experience an &lt;strong&gt;Enterprise Data Discovery Assistant&lt;/strong&gt;. Under the hood, a bounded Snowflake Cortex Agent selects retrieval and analysis tools. “Agent” describes the architecture; “assistant” describes its read-only responsibility. It does not change source systems, deploy code, or promote pipelines.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Engineer question
       |
       v
Enterprise Data Discovery Assistant
       |
       +-- HANA repository code
       +-- Parallel BI artifacts
       |      +-- Qlik scripts and QVDs
       |      +-- Spotfire queries and metadata
       +-- Reporting metadata catalog
       +-- Schema, object, and column lineage
       |
       v
Recovered logic + ownership + dependencies
       |
       v
Grounded SQL draft -&amp;gt; data-engineer validation
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The four evidence layers play different roles:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;HANA repository code&lt;/strong&gt; provides the calculation-view definition. Parsing indexed &lt;code&gt;.hdbcalculationview&lt;/code&gt; XML reveals sources, joins, filters, calculated columns, unions, and nested-view dependencies.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Parallel BI artifacts&lt;/strong&gt; reveal reporting logic. Qlik contributes load queries, aliases, mappings, resident loads, and QVD flow. Spotfire contributes source queries, columns, and any calculations present in its indexed metadata or exports.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;reporting metadata catalog&lt;/strong&gt; connects Qlik and Spotfire applications to HANA models, queries, fields, owners, paths, saved-query details, and comments. It adds operational context around the code; it does not replace the code.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Schema and lineage metadata&lt;/strong&gt; traces upstream sources, downstream consumers, object dependencies, and column paths, then helps map recovered logic to approved target objects.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Together, these sources answer more than “What SQL should I write?” They can also answer: Who owns this dashboard? Which reports use this HANA view? Which QVDs feed the application? What could break if the model changes?&lt;/p&gt;
&lt;p&gt;Search locates the artifacts. Deterministic parsers extract their structure. The language model relates the findings to the engineer's question.&lt;/p&gt;
&lt;h3 id=&quot;from-a-question-to-grounded-sql&quot;&gt;From a question to grounded SQL&lt;/h3&gt;
&lt;p&gt;The experience should feel like a conversation, not a metadata report. The engineer asks one question; the assistant shows what it checked and returns an evidence-backed answer with SQL.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/fnedrcv11obajb37qz8f.gif&quot; alt=&quot;Image description&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Synthetic chat demonstration: no production data or internal interface is shown.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The response separates recovered facts from the proposed target design. In this example, the assistant verifies the HANA joins and filter, recovers the Qlik status mapping and QVD flow, identifies the owner, and finds downstream Qlik and Spotfire consumers before drafting SQL.&lt;/p&gt;
&lt;p&gt;Only then does the assistant propose a starting point:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SELECT
    i.order_id,
    i.ordered_qty - i.confirmed_qty AS open_quantity,
    s.business_status
FROM sales_order_item AS i
LEFT JOIN status_map AS s
    ON i.status_code = s.status_code
WHERE i.cancelled_flag = 'N';
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The SQL is useful because its origin and limitations are visible—not because it appeared quickly.&lt;/p&gt;
&lt;h3 id=&quot;grounded-sql-is-a-handoff&quot;&gt;Grounded SQL is a handoff&lt;/h3&gt;
&lt;p&gt;The draft is not a production pipeline. A data engineer still confirms the grain, compares results with the legacy report, maps the logic to canonical target names, and preserves null, fallback, and refresh behavior. Production work also requires incremental patterns such as CDC or watermarks, data-quality tests, security, documentation, owner approval, and CI/CD which was covered in Developer Toolkit.&lt;/p&gt;
&lt;p&gt;Trust comes from a few explicit boundaries:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Prefer exact identifiers when available; use semantic search for discovery, then verify the selected objects.&lt;/li&gt;
&lt;li&gt;Parse large HANA XML and Qlik scripts deterministically.&lt;/li&gt;
&lt;li&gt;Separate &lt;strong&gt;verified evidence&lt;/strong&gt;, &lt;strong&gt;proposed design&lt;/strong&gt;, and &lt;strong&gt;missing evidence&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Keep generated code read-only until it passes normal engineering review and testing.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If an expected Qlik or Spotfire expression is absent from the indexed sources, the assistant says so instead of reconstructing it from assumptions.&lt;/p&gt;
&lt;p&gt;The same human-in-the-loop pattern shaped the assistant itself. &lt;strong&gt;Snowflake CoCo&lt;/strong&gt;,supported the build-and-tune cycle by helping refine tool instructions, test prompts, failure analysis, and response behavior. Engineers decided which changes to adopt and validated the results.&lt;/p&gt;
&lt;p&gt;Moving data gives a new platform rows and columns. Moving knowledge preserves the meaning, ownership, and dependencies people rely on—and provides the context needed to build governed data products.&lt;/p&gt;
&lt;p&gt;Part 2 will follow a natural-language question through governed SQL execution and show how the final answer explains its sources and limitations.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/26369/moving-data-is-easier-than-moving-knowledge</guid>
<pubDate>Mon, 07 Sep 2026 05:45:44 +0000</pubDate>
</item>
<item>
<title>Snowflake Summit 26: What Developers, Engineers, and Architects Need to Know</title>
<link>https://coderlegion.com/19368/snowflake-summit-26-what-developers-engineers-and-architects-need-to-know</link>
<description>&lt;p&gt;Snowflake's biggest user conference yet kicked off June 1 in San Francisco, and the company arrived with a full slate of product announcements aimed squarely at builders. Here's what matters most if you're writing code, managing data infrastructure, or designing systems on Snowflake.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;first-two-new-names&quot;&gt;First, Two New Names&lt;/h3&gt;
&lt;p&gt;Before getting into the announcements, note two product rebranding moves. Cortex Code is now officially &lt;strong&gt;Snowflake Coco&lt;/strong&gt;. The informal name had already taken hold with customers, so Snowflake made it official. Snowflake Intelligence is now &lt;strong&gt;Snowflake Cowork&lt;/strong&gt; — a rename that reflects how the product has grown from a next-gen BI tool into a broader productivity platform for knowledge workers.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;coco-gets-a-lot-more-surface-area&quot;&gt;Coco Gets a Lot More Surface Area&lt;/h3&gt;
&lt;p&gt;The biggest news for developers is how many places Coco now lives. Snowflake is introducing a &lt;strong&gt;VS Code extension&lt;/strong&gt;, an &lt;strong&gt;Excel plugin&lt;/strong&gt;, &lt;strong&gt;Slack integration&lt;/strong&gt;, and a standalone &lt;strong&gt;Coco Desktop app&lt;/strong&gt;. Claude Code support is also on the list — useful for any team already using Anthropic's CLI in their workflow.&lt;/p&gt;
&lt;p&gt;On the capability side, Coco can now handle &lt;strong&gt;long-running autonomous tasks&lt;/strong&gt; via Cloud Agents, create &lt;strong&gt;reusable workflows through Skills&lt;/strong&gt;, and support &lt;strong&gt;automations&lt;/strong&gt; for recurring monitoring and validation tasks. New integrations with &lt;strong&gt;Retool, Superblocks, and Vercel&lt;/strong&gt; let developers turn a prompt into a deployed app on Snowflake's App Runtime.&lt;/p&gt;
&lt;p&gt;Bala Kasiviswanathan, Snowflake's VP of Developer and AI Experiences, framed the shift this way: &quot;A year ago, building on enterprise data meant writing code, managing infrastructure, and stitching together disconnected tools for orchestration, streaming, governance, and deployment. Today, Snowflake CoCo is collapsing that complexity into a single AI-native development experience.&quot;&lt;/p&gt;
&lt;p&gt;CEO Sridhar Ramaswamy added that Coco can already outperform frontier models on operations within Snowflake, and that partners are shifting from time-and-material billing to outcome-based engagements because of it.&lt;/p&gt;
&lt;p&gt;The customer numbers are concrete. Fanatics reduced pipeline troubleshooting from days to hours. Thomson Reuters modernized legacy systems and delivered insights in days instead of weeks across more than 37,500 governed tables.&lt;/p&gt;
&lt;p&gt;Coco also works across data sources beyond Snowflake — including &lt;strong&gt;AWS Glue, dbt, Apache Airflow, Databricks, and Postgres&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;snowflake-datastream-managed-streaming-built-in&quot;&gt;Snowflake Datastream: Managed Streaming, Built In&lt;/h3&gt;
&lt;p&gt;For data engineers managing streaming infrastructure, Snowflake introduced &lt;strong&gt;Datastream&lt;/strong&gt; — a fully managed, Kafka wire protocol compatible streaming service built natively into the platform. Existing Kafka clients and applications can point to it without rewriting integrations. Under the hood, it's pure Snowflake technology, not a Kafka wrapper.&lt;/p&gt;
&lt;p&gt;The practical appeal: streaming data routes directly into Snowflake tables with low latency, and it automatically inherits existing governance, access controls, masking policies, and lineage. No separate broker to manage. Datastream enters private preview shortly after Summit.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;apache-iceberg-v3-goes-ga-and-open-data-gets-serious&quot;&gt;Apache Iceberg v3 Goes GA — and Open Data Gets Serious&lt;/h3&gt;
&lt;p&gt;Snowflake announced several moves on the open data front. &lt;strong&gt;Apache Iceberg v3 support is now generally available&lt;/strong&gt;, with the broadest feature set on the market — expanded data types, cross-system change tracking, and improved semi-structured data performance.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Snowflake Storage for Apache Iceberg Tables&lt;/strong&gt; is also GA, with bi-directional read/write access to Snowflake-managed Iceberg tables from external engines via Horizon Catalog, powered by Apache Polaris. The &lt;strong&gt;Iceberg REST Scan Plan API&lt;/strong&gt; ensures security and masking policies travel with data even when accessed by external tools.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Zero-copy integrations&lt;/strong&gt; for SAP, Salesforce, and Workday mean direct access to that data without replication. The architectural goal: work on a single, governed copy of data wherever it lives, without moving it.&lt;/p&gt;
&lt;p&gt;Two new context layers sit on top of all of this. &lt;strong&gt;Horizon Context&lt;/strong&gt; brings in explicit, customer-defined metadata — including from the Select Star acquisition, which ingests metadata from Postgres, SQL Server, Tableau, and Power BI. &lt;strong&gt;Cortex Sense&lt;/strong&gt; builds implicit context automatically from usage patterns, feeding both Coco and Cowork without requiring manual configuration.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;natoma-acquisition-governing-what-agents-actually-do&quot;&gt;Natoma Acquisition: Governing What Agents Actually Do&lt;/h3&gt;
&lt;p&gt;This is the announcement that architects should pay the most attention to. Snowflake announced its intent to acquire &lt;strong&gt;Natoma&lt;/strong&gt;, an enterprise Model Context Protocol (MCP) platform. The significance: Natoma extends governance beyond data access to cover AI agent &lt;em&gt;actions&lt;/em&gt; — sending emails, summarizing Slack threads, updating Jira tickets, checking calendars — all from within Snowflake's governed environment with policy enforcement and full audit trails.&lt;/p&gt;
&lt;p&gt;For anyone designing agentic systems, this signals where Snowflake is heading. The goal is to be the control plane not just for what data agents can see, but for what they can do across enterprise systems.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;ai-security-three-new-layers&quot;&gt;AI Security: Three New Layers&lt;/h3&gt;
&lt;p&gt;Four security announcements are worth noting for teams building agentic workloads:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Agent Identity&lt;/strong&gt; gives every agent a verified identity with role-based permissions and a full audit trail. &lt;strong&gt;Prompt Injection Protection&lt;/strong&gt; uses ML-driven detection to block jailbreak attempts. The &lt;strong&gt;Trust Center&lt;/strong&gt; is getting an AI security package with codified best practices for agent configuration, credential usage, and data access. And &lt;strong&gt;multi-party authorization&lt;/strong&gt; requires a second approver for sensitive operations — protecting against both insider threats and runaway agents.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;a-few-more-things-worth-noting&quot;&gt;A Few More Things Worth Noting&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Snowflake Apps&lt;/strong&gt; now supports native React development alongside AI-powered workflows, moving from prompt to a production-ready app deployed inside the security perimeter.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Adaptive Compute&lt;/strong&gt; goes GA at Summit. It automatically determines the right mix of compute resources in real time — no manual warehouse sizing — with reported gains of up to 3.5x over first-generation warehouses.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cowork&lt;/strong&gt; is adding automations, background agents, and a next-generation artifacts and dashboards layer. For architects: Cowork is the governed, managed experience for everyone in the organization. Coco is the power tool for technical users who know what they're doing.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/19368/snowflake-summit-26-what-developers-engineers-and-architects-need-to-know</guid>
<pubDate>Tue, 02 Jun 2026 13:00:00 +0000</pubDate>
</item>
<item>
<title>How to Handle NULLs in Snowflake: A Complete Guide!</title>
<link>https://coderlegion.com/14166/how-to-handle-nulls-in-snowflake-a-complete-guide</link>
<description>&lt;p&gt;&lt;em&gt;Dear Readers,&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;NULL in data is like a weed, it can mess up your analysis and calculations, and ultimately bleed the value out of your analytics work. In this article, we’ll dive into what NULL is, why it exists, when it appears, and how to deal with it in Snowflake ?&lt;/p&gt;
&lt;p&gt;So, without further ado, let’s meet this culprit.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What NULL?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In SQL, NULL is basically the database equivalent of a shrug.It is a special marker that represents a missing or unknown value. It's not the same as an empty string ('') or the number zero (0). It simply means “I don’t know” or “there’s no value here at all.”&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why NULL Exists?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;NULL is essential because sometimes your data just doesn’t exist yet, or never will. NULL allows the database to acknowledge the gap without faking a value.&lt;/p&gt;
&lt;p&gt;Eg:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A customer doesn’t have a middle name.&lt;/li&gt;
&lt;li&gt;A product doesn’t have a discount yet.&lt;/li&gt;
&lt;li&gt;A delivery date is unknown at the time of record insertion.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;When NULL Appears?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;NULL occurs anytime there is a lack of value from the user. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Common reasons include:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Optional fields with no provided value.&lt;/li&gt;
&lt;li&gt;Data not yet available (future delivery dates, pending approvals)&lt;/li&gt;
&lt;li&gt;Inapplicable values (someone’s “date of divorce” who never married)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;How to Deal with NULL in Snowflake?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Snowflake provides multiple functions and methods to deal with NULL dataset aka unknown data similar to other databases. I have listed some of them below:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use IS NULL / IS NOT NULL to identify the NULL data.&lt;/li&gt;
&lt;li&gt;Use COALESCE(col, default) or IFNULL(col, default) to replace them in select , joins, aggregates etc&lt;/li&gt;
&lt;li&gt;Use explicit filter on WHERE clauses to include NULL rows as it can can drop NULL rows unexpectedly.&lt;/li&gt;
&lt;li&gt;Use NVL, CASE WHEN, or similar functions to handle them in calculations or strings.&lt;/li&gt;
&lt;li&gt;Comparisons with NULL return UNKNOWN in SQL’s three-valued logic. Use COALESCE or IS NULL checks to avoid surprises.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Eg:&lt;/p&gt;
&lt;p&gt;==Using NULL/NOT NULL &lt;/p&gt;
&lt;p&gt;-- Finds all employees without a manager&lt;br&gt;
SELECT name FROM employees WHERE manager_id IS NULL;&lt;/p&gt;
&lt;p&gt;-- Finds all employees with a manager&lt;br&gt;
SELECT name FROM employees WHERE manager_id IS NOT NULL;&lt;/p&gt;
&lt;p&gt;==Using COALESCE&lt;/p&gt;
&lt;p&gt;-- Calculates total compensation, treating a NULL bonus as 0&lt;/p&gt;
&lt;p&gt;SELECT salary + COALESCE(bonus, 0) AS total_compensation FROM employees&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Trouble NULL Causes:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Comparison Traps&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;NULL comparisons are a common pitfall because standard operators like = or != don’t work as expected. Any comparison involving NULL returns UNKNOWN, not TRUE or FALSE. Use IS NULL or IS NOT NULL to handle the traps.&lt;/p&gt;
&lt;p&gt;Eg:&lt;/p&gt;
&lt;p&gt;--Evaluates to UNKNOWN when &lt;code&gt;NULL = NULL&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;SELECT *&lt;br&gt;
FROM employees&lt;br&gt;
WHERE manager_id = NULL;&lt;/p&gt;
&lt;p&gt;-- The correct way to find employees with a NULL manager_id is:&lt;br&gt;
SELECT *&lt;br&gt;
FROM employees&lt;br&gt;
WHERE manager_id IS NULL;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Math &amp;amp; Concatenation Failures:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;NULL acts like a virus in arithmetic and string concatenation operations. Any operation involving NULL will result in NULL.&lt;/p&gt;
&lt;p&gt;Eg:&lt;/p&gt;
&lt;p&gt;--Return of NULL total+compensation when bonus is NULL:&lt;/p&gt;
&lt;p&gt;SELECT salary + bonus AS total_compensation&lt;br&gt;
FROM employees;&lt;/p&gt;
&lt;p&gt;--The correct way to add bonus is use COALESCE :&lt;/p&gt;
&lt;p&gt;SELECT salary + COALESCE(bonus, 0) AS total_compensation&lt;br&gt;
FROM employees;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Aggregate Surprises:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Aggregate functions like SUM() and AVG() ignore NULL values. This can lead to misleading results if you’re not aware of it.&lt;/p&gt;
&lt;p&gt;Eg:&lt;/p&gt;
&lt;p&gt;--Excludes NULL rows &lt;/p&gt;
&lt;p&gt;SELECT AVG(salary) AS avg_salary, SUM(salary) AS total_salary&lt;br&gt;
FROM employees;&lt;/p&gt;
&lt;p&gt;--Use COALESCE to treat NULL salaries as 0 to get more accurate company-wide average&lt;/p&gt;
&lt;p&gt;SELECT AVG(COALESCE(salary, 0)) FROM employees;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Join Issues:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;NULL values in join keys never match each other. If an employee has a NULL in manager_id, that row won’t link to any id in the employees table even if other employees also have NULL as manager_id.&lt;/p&gt;
&lt;p&gt;Use a LEFT JOIN + COALESCE to tackle the NULL issue.In following demonstrated way, you keep all employees in the output, and NULL managers are clearly labeled without risking false matches.&lt;/p&gt;
&lt;p&gt;Eg:&lt;/p&gt;
&lt;p&gt;--This INNER JOIN excludes employees with no manager_id&lt;/p&gt;
&lt;p&gt;SELECT &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;   E.name AS employee,
   M.name AS manager
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;FROM employees AS E&lt;br&gt;
INNER JOIN &lt;br&gt;
employees AS M &lt;br&gt;
ON E.manager_id = M.id;&lt;/p&gt;
&lt;p&gt;--Use COALESCE to include employees without a manager&lt;/p&gt;
&lt;p&gt;SELECT &lt;br&gt;
  E.name AS employee,&lt;br&gt;
  COALESCE(M.name, 'No Manager') AS manager&lt;br&gt;
FROM employees E&lt;br&gt;
LEFT JOIN employees M &lt;br&gt;
  ON E.manager_id = M.id;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5.Logic Surprises&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In SQL’s three-valued logic (TRUE, FALSE, UNKNOWN), an UNKNOWN result in a WHERE clause acts like FALSE and discards the row. However, UNKNOWN can have different effects in other clauses such as CASE.&lt;/p&gt;
&lt;p&gt;Eg:&lt;/p&gt;
&lt;p&gt;--Logic Mishandling for NULL data.&lt;/p&gt;
&lt;p&gt;SELECT&lt;br&gt;
  CASE&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;WHEN bonus &amp;gt; 10000 THEN 'High Bonus'
WHEN bonus &amp;gt; 5000 THEN 'Mid Bonus'
ELSE 'Low or No Bonus'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;  END AS bonus_category&lt;br&gt;
FROM employees;&lt;/p&gt;
&lt;p&gt;-- Explicitly checks for NULL first&lt;/p&gt;
&lt;p&gt;SELECT&lt;br&gt;
  CASE&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;WHEN bonus IS NULL THEN 'No Bonus'
WHEN bonus &amp;gt; 10000 THEN 'High Bonus'
WHEN bonus &amp;gt; 5000 THEN 'Mid Bonus'
ELSE 'Low Bonus'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;  END AS bonus_category&lt;br&gt;
FROM employees;&lt;br&gt;
Closing thoughts,&lt;/p&gt;
&lt;p&gt;NULLs aren’t a bug, they’re part of SQL’s design.NULL is tricky. The safest approach is to scan your dataset for every attribute that could be NULL, then apply handling strategies suited to your business context. In Snowflake, a few well-placed COALESCE, IS NULL, and CASE statements can save you from major data quality headaches.&lt;/p&gt;
&lt;p&gt;Hope you enjoyed the article! If you like my writing, feel free to connect with me on Linkedin and follow for more such interesting reads.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/14166/how-to-handle-nulls-in-snowflake-a-complete-guide</guid>
<pubDate>Tue, 07 Apr 2026 14:39:38 +0000</pubDate>
</item>
<item>
<title>Snowflake Brings Google's Gemini 3 Models to Its Data Platform</title>
<link>https://coderlegion.com/9323/snowflake-brings-googles-gemini-3-models-to-its-data-platform</link>
<description>&lt;p&gt;Snowflake announced today that Google's Gemini 3 models are now running natively inside Snowflake Cortex AI. This means enterprises can use Google's latest AI models on their data without copying or moving it to another platform.&lt;/p&gt;
&lt;p&gt;The integration includes both Gemini 3 Pro and Gemini Flash 2.5, available now in public preview through Cortex AI Functions. Support for Snowflake Intelligence and Cortex Agents is coming soon.&lt;/p&gt;
&lt;h3 id=&quot;what-this-solves&quot;&gt;What This Solves&lt;/h3&gt;
&lt;p&gt;Moving enterprise data between platforms creates security risks, compliance headaches, and performance bottlenecks. By running Gemini models directly in Snowflake's governed environment, companies can build AI applications where their data already lives.&lt;/p&gt;
&lt;p&gt;Gemini 3 Pro handles complex tasks that require deep reasoning across financial records, logs, product data, and documents. It's designed for production AI agents that need to understand context and make decisions based on structured and unstructured data.&lt;/p&gt;
&lt;p&gt;Gemini Flash 2.5 focuses on speed and cost efficiency. It handles high-volume tasks like call summarization, invoice processing, and customer service interactions where you need fast results at scale.&lt;/p&gt;
&lt;h3 id=&quot;how-it-works&quot;&gt;How It Works&lt;/h3&gt;
&lt;p&gt;Developers can access Gemini models using SQL through Cortex AI Functions. Here's an example of analyzing financial documents:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SELECT 
    SNOWFLAKE.CORTEX.AI_COMPLETE(
        'gemini-3-pro',
        PROMPT(
            'Review the following financial filing and summarize key revenue trends, margin changes, and risk factors: {0}',
            filing_text
        )
    ) AS financial_summary
FROM financial_documents;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The models support cross-region inference, so you can run them across all supported clouds by enabling GCP_US or ANY_REGION in your admin settings.&lt;/p&gt;
&lt;h3 id=&quot;real-world-use-cases&quot;&gt;Real-World Use Cases&lt;/h3&gt;
&lt;p&gt;BlackLine is using Gemini models embedded in Snowflake to build agentic AI for finance and accounting teams. Jeremy Ung, BlackLine's CTO, says they're moving beyond simple automation to create AI that actively partners with financial professionals on complex processes.&lt;/p&gt;
&lt;p&gt;Fivetran CEO George Fraser notes that tasks that used to take weeks of custom development now happen in days. Teams can ask questions and get answers from their business data without building custom integrations.&lt;/p&gt;
&lt;h3 id=&quot;broader-partnership&quot;&gt;Broader Partnership&lt;/h3&gt;
&lt;p&gt;This announcement deepens the relationship between Snowflake and Google Cloud beyond just AI models. The companies are aligning their sales teams, expanding product integrations, and making Snowflake available through Google Cloud Marketplace.&lt;/p&gt;
&lt;p&gt;Snowflake is also expanding its Google Cloud footprint. It recently launched in Saudi Arabia and will launch in Melbourne, Australia in early 2026.&lt;/p&gt;
&lt;p&gt;The integration includes connections to Google Cloud's Vertex AI platform and BigQuery, giving customers more options for how they build and deploy AI applications.&lt;/p&gt;
&lt;h3 id=&quot;what-developers-should-know&quot;&gt;What Developers Should Know&lt;/h3&gt;
&lt;p&gt;Gemini joins other models from Anthropic, Meta, and OpenAI already available in Cortex AI. This gives teams flexibility to choose the right model for each task without changing their data architecture.&lt;/p&gt;
&lt;p&gt;The focus on running models inside Snowflake's governance perimeter means you maintain security controls while experimenting with different AI capabilities. You're not trading off between innovation and compliance.&lt;/p&gt;
&lt;p&gt;[Christian Kleinerman][1], Snowflake's EVP of Product, puts it simply: &quot;By combining Google Cloud's industry leadership with Snowflake's ability to bring AI directly to enterprise data, we're empowering customers to move faster, innovate more freely and redefine what's possible through data and AI.&quot;&lt;/p&gt;
&lt;p&gt;For organizations already running on Snowflake and Google Cloud, this reduces the complexity of adding AI capabilities to existing data workflows. For those evaluating platforms, it's another data point in favor of keeping your data stack consolidated.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;

  [1]: https://www.linkedin.com/in/christian-kleinerman-a973102/
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/9323/snowflake-brings-googles-gemini-3-models-to-its-data-platform</guid>
<pubDate>Tue, 06 Jan 2026 19:18:31 +0000</pubDate>
</item>
<item>
<title>SAP partnered with its competitors to let customers choose their data platform. That's not weakness.</title>
<link>https://coderlegion.com/7059/sap-partnered-with-its-competitors-customers-choose-their-data-platform-thats-weakness</link>
<description>&lt;h2 id=&quot;sap-s-data-strategy-why-the-snowflake-partnership-makes-more-sense-than-it-seems&quot;&gt;SAP's Data Strategy: Why the Snowflake Partnership Makes More Sense Than It Seems&lt;/h2&gt;
&lt;h3 id=&quot;the-partnership-nobody-expected&quot;&gt;The Partnership Nobody Expected&lt;/h3&gt;
&lt;p&gt;SAP announced a partnership with Snowflake at TechEd 2025. The announcement included a new &quot;SAP Snowflake&quot; solution extension that brings Snowflake's data and AI capabilities to SAP customers.&lt;/p&gt;
&lt;p&gt;The immediate reaction from the analyst community: why would SAP do this? They already have SAP HANA Cloud. They already have SAP Datasphere. Why partner with a competitor?&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.linkedin.com/in/muhammad-s-alam/&quot;&gt;Muhammad Alam's&lt;/a&gt; answer in the post-keynote Q&amp;amp;A session cut through the confusion: &quot;What customers want from us is optionality.&quot;&lt;/p&gt;
&lt;p&gt;That word, &quot;optionality.&quot; reveals SAP's entire data strategy.&lt;/p&gt;
&lt;h3 id=&quot;what-sap-actually-built&quot;&gt;What SAP Actually Built&lt;/h3&gt;
&lt;p&gt;SAP Business Data Cloud is not a data warehouse. It's a data fabric architecture.&lt;/p&gt;
&lt;p&gt;The distinction matters. A data warehouse consolidates data in one location. A data fabric connects data wherever it lives while maintaining business semantics, the business meaning and relationships in the data.&lt;/p&gt;
&lt;p&gt;Alam explained it in the keynote: &quot;Every intelligent application starts with trusted data. SAP is giving developers more ways to put that data to work through SAP Business Data Cloud.&quot;&lt;/p&gt;
&lt;p&gt;The technical implementation has three layers:&lt;/p&gt;
&lt;h4 id=&quot;layer-1-data-products&quot;&gt;Layer 1: Data Products&lt;/h4&gt;
&lt;p&gt;Data products are SAP's key abstraction. They package raw data with metadata, business semantics, and governance rules into reusable assets.&lt;/p&gt;
&lt;p&gt;The new Data Product Studio (general availability planned H1 2026) gives developers a visual workspace to model, configure, and manage custom data products across SAP and third-party sources.&lt;/p&gt;
&lt;p&gt;Developers can turn raw data into ready-to-use assets known as data products that support analytics, AI and application development.&lt;/p&gt;
&lt;h4 id=&quot;layer-2-business-data-cloud-connect&quot;&gt;Layer 2: Business Data Cloud Connect&lt;/h4&gt;
&lt;p&gt;This is where the partner integrations happen. Business Data Cloud Connect enables secure, zero-copy sharing of SAP's data products into customers' existing data lakes and platforms.&lt;/p&gt;
&lt;p&gt;The key technical feature: data stays in its original location. No ETL pipelines. No data duplication. Data products are published into partner catalogs with business semantics intact.&lt;/p&gt;
&lt;h4 id=&quot;layer-3-partner-compute-platforms&quot;&gt;Layer 3: Partner Compute Platforms&lt;/h4&gt;
&lt;p&gt;This is where Snowflake, Databricks, Google BigQuery, and Microsoft Fabric come in. They provide compute infrastructure for analytics and AI workloads.&lt;/p&gt;
&lt;p&gt;The architecture: SAP provides data semantics and governance. Partners provide compute and storage. Customers use both.&lt;/p&gt;
&lt;h3 id=&quot;the-snowflake-integration-specifically&quot;&gt;The Snowflake Integration Specifically&lt;/h3&gt;
&lt;p&gt;SAP Business Data Cloud Connect for Snowflake does two things:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Outbound:&lt;/strong&gt; Publishes SAP data products directly into the Snowflake Horizon catalog. Business semantics, lineage, and governance from SAP Business Data Cloud are preserved. Users working in Snowflake see SAP data with full business context.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Inbound:&lt;/strong&gt; Exposes Snowflake data products within the SAP Business Data Cloud catalog. SAP applications and agents can access Snowflake data through standardized data products.&lt;/p&gt;
&lt;p&gt;General availability is planned for H1 2026.&lt;/p&gt;
&lt;p&gt;Alam explained the value proposition: &quot;A new SAP Snowflake solution extension for SAP Business Data Cloud brings Snowflake's fully managed data and AI capabilities directly to SAP customers, enabling seamless, zero-copy data sharing that maintains governance and business context.&quot;&lt;/p&gt;
&lt;h3 id=&quot;why-this-actually-makes-sense&quot;&gt;Why This Actually Makes Sense&lt;/h3&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.linkedin.com/in/bharatsandhu/&quot;&gt;Bharat Sandhu&lt;/a&gt; framed it as customer reality: customers &quot;already know what they need to do.&quot; SAP's job is to &quot;provide customers with rich data products.&quot;&lt;/p&gt;
&lt;p&gt;The practical truth: enterprises have already invested in data platforms. Some chose Databricks three years ago. Others standardized on Snowflake. Some are committed to Google Cloud or Microsoft Azure.&lt;/p&gt;
&lt;p&gt;Requiring migration to SAP HANA Cloud for all analytics workloads creates friction. Enterprises resist because:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Migration projects are expensive and time-consuming&lt;/li&gt;
&lt;li&gt;Data teams have built expertise in their chosen platform&lt;/li&gt;
&lt;li&gt;They've already built analytics and ML pipelines&lt;/li&gt;
&lt;li&gt;Breaking those dependencies creates business risk&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;SAP's response: don't require migration. Instead, extend the existing platform with SAP's business semantics.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.linkedin.com/in/brendabown/&quot;&gt;Brenda Bown&lt;/a&gt; described the broader strategy: &quot;Meet customers where they are. Open ecosystem.&quot;&lt;/p&gt;
&lt;h3 id=&quot;the-complete-partner-landscape&quot;&gt;The Complete Partner Landscape&lt;/h3&gt;
&lt;p&gt;SAP Business Data Cloud Connect now integrates with four major platforms:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Databricks:&lt;/strong&gt; Generally available now&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Google BigQuery:&lt;/strong&gt; Planned for H1 2026&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Microsoft Fabric:&lt;/strong&gt; Planned for H1 2026&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Snowflake:&lt;/strong&gt; Planned for H1 2026&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each follows the same pattern: SAP data products published to partner catalog, partner data products exposed in SAP catalog, zero-copy sharing, governance maintained.&lt;/p&gt;
&lt;p&gt;Additionally, SAP is expanding native capabilities. A technical capability called &quot;near real-time extraction&quot; enables extraction of SAP data from on-premise systems into SAP Business Data Cloud, making it easier for developers to build custom data products enriched with SAP business context.&lt;/p&gt;
&lt;h3 id=&quot;what-about-sap-hana-cloud-&quot;&gt;What About SAP HANA Cloud?&lt;/h3&gt;
&lt;p&gt;SAP continues significant investment in SAP HANA Cloud as its multi-model AI database. New capabilities announced at TechEd reveal the positioning:&lt;/p&gt;
&lt;h4 id=&quot;knowledge-graph-generator&quot;&gt;Knowledge Graph Generator&lt;/h4&gt;
&lt;p&gt;Automatically maps relationships across SAP database tables, columns, and data models. Developers can see how data connects across systems and uncover underlying business insights.&lt;/p&gt;
&lt;p&gt;Alam described it: &quot;A new knowledge graph generator tool for SAP HANA Cloud automatically maps relationships across SAP database tables, columns, and data models, revealing how data fits together and why it matters.&quot;&lt;/p&gt;
&lt;p&gt;General availability expected Q1 2026.&lt;/p&gt;
&lt;h4 id=&quot;tabular-ai-capabilities&quot;&gt;Tabular AI Capabilities&lt;/h4&gt;
&lt;p&gt;Forecasting, anomaly detection, and predictive modeling directly on structured business data. These capabilities from SAP AI Core are now generally available in SAP HANA Cloud.&lt;/p&gt;
&lt;h4 id=&quot;model-context-protocol-support&quot;&gt;Model Context Protocol Support&lt;/h4&gt;
&lt;p&gt;Makes SAP HANA Cloud data accessible to Joule Agents and custom agents. MCP provides agents with direct access to the rich multi-model engines in SAP HANA Cloud.&lt;/p&gt;
&lt;p&gt;General availability planned Q1 2026.&lt;/p&gt;
&lt;h4 id=&quot;bidirectional-data-product-sharing&quot;&gt;Bidirectional Data Product Sharing&lt;/h4&gt;
&lt;p&gt;SAP is enabling bidirectional data product sharing between SAP Business Data Cloud and SAP HANA Cloud. Developers can use data across both transactional and analytical workloads while maintaining business logic, KPIs, and governance.&lt;/p&gt;
&lt;p&gt;Bharat Sandhu explained: &quot;This capability will allow customers to reuse their existing calculation views in SAP HANA Cloud directly in SAP Business Data Cloud, keeping the business logic, KPIs, and governance intact as data models are extended across the customer's data fabric.&quot;&lt;/p&gt;
&lt;p&gt;General availability planned Q1 2026.&lt;/p&gt;
&lt;h3 id=&quot;the-architecture-decision&quot;&gt;The Architecture Decision&lt;/h3&gt;
&lt;p&gt;This creates three legitimate architecture options:&lt;/p&gt;
&lt;h4 id=&quot;option-1-sap-native&quot;&gt;Option 1: SAP-Native&lt;/h4&gt;
&lt;p&gt;Use SAP HANA Cloud for everything. Best for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Applications requiring real-time data access&lt;/li&gt;
&lt;li&gt;Tight integration with SAP applications&lt;/li&gt;
&lt;li&gt;Workloads that need SAP's multi-model database capabilities (relational, graph, vector, spatial in one engine)&lt;/li&gt;
&lt;li&gt;Organizations wanting to minimize data platform complexity&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;option-2-hybrid-with-partner-compute&quot;&gt;Option 2: Hybrid with Partner Compute&lt;/h4&gt;
&lt;p&gt;SAP Business Data Cloud for semantics and governance, partner platform for compute-intensive analytics and AI workloads. Best for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Large-scale analytics requiring significant compute&lt;/li&gt;
&lt;li&gt;Organizations with existing platform investments&lt;/li&gt;
&lt;li&gt;Teams with deep expertise in a specific platform (Snowflake, Databricks, etc.)&lt;/li&gt;
&lt;li&gt;Workloads that benefit from partner-specific features&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;option-3-partner-native-with-sap-semantics&quot;&gt;Option 3: Partner-Native with SAP Semantics&lt;/h4&gt;
&lt;p&gt;Work primarily in partner platform, access SAP data products through Business Data Cloud Connect. Best for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Data teams standardized on a non-SAP platform&lt;/li&gt;
&lt;li&gt;Analytics and ML workloads that don't require real-time SAP data&lt;/li&gt;
&lt;li&gt;Organizations prioritizing analyst productivity in their chosen tool&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The technical requirement for all three: understanding SAP's data products and business semantics.&lt;/p&gt;
&lt;h3 id=&quot;the-critical-mistake-to-avoid&quot;&gt;The Critical Mistake to Avoid&lt;/h3&gt;
&lt;p&gt;Bharat Sandhu emphasized the most common integration mistake: &quot;Don't take data out without the semantic understanding.&quot;&lt;/p&gt;
&lt;p&gt;This is the core value SAP is protecting. Extracting data from SAP and loading it into any data warehouse is technically simple. But you lose:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Business relationships (how entities connect)&lt;/li&gt;
&lt;li&gt;Valid transformations (what calculations are meaningful)&lt;/li&gt;
&lt;li&gt;Governance rules (who can access what)&lt;/li&gt;
&lt;li&gt;Business context (what the data actually means)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One developer during the experience center tour described a failed implementation: &quot;We pulled all our SAP data into our data lake, built our analytics, and everything looked right. But the numbers were wrong because we didn't understand how SAP calculates certain KPIs. We had to rebuild everything with SAP's semantics.&quot;&lt;/p&gt;
&lt;p&gt;SAP Business Data Cloud Connect solves this by maintaining that semantic layer as data moves to partner platforms.&lt;/p&gt;
&lt;h3 id=&quot;what-sap-rpt-1-changes&quot;&gt;What SAP-RPT-1 Changes&lt;/h3&gt;
&lt;p&gt;SAP introduced its first enterprise relational foundation model at TechEd: SAP-RPT-1.&lt;/p&gt;
&lt;p&gt;Unlike large language models that predict the next word, RPT models predict business outcomes. They're trained on structured business data and can perform classification and regression on tabular data.&lt;/p&gt;
&lt;p&gt;Examples: predicting delivery delays, payment risk, sales order completion.&lt;/p&gt;
&lt;p&gt;The technical approach: in-context learning. Users provide example records in the API call. The model analyzes patterns and makes predictions without a training phase.&lt;/p&gt;
&lt;p&gt;Brenda Bown explained the positioning: RPT models &quot;has business context.&quot; They're designed for accurate predictions on business data, while LLMs handle natural language understanding and generation.&lt;/p&gt;
&lt;p&gt;SAP-RPT-1 will be generally available in Q4 2025 on the generative AI hub in SAP's AI Foundation. SAP also launched an interactive testing playground where users can experience the model without coding.&lt;/p&gt;
&lt;p&gt;This matters for the data strategy because RPT models need access to trusted, semantically rich business data. That's exactly what SAP Business Data Cloud provides.&lt;/p&gt;
&lt;h3 id=&quot;the-real-strategy&quot;&gt;The Real Strategy&lt;/h3&gt;
&lt;p&gt;SAP's data strategy isn't about forcing customers onto SAP infrastructure. It's about becoming essential at the semantic layer regardless of where compute happens.&lt;/p&gt;
&lt;p&gt;The bet: compute infrastructure will commoditize. AWS, Azure, Google Cloud, Snowflake, and Databricks will compete on price and performance for raw compute power.&lt;/p&gt;
&lt;p&gt;But business semantics won't commoditize. Understanding how SAP calculates revenue, inventory, or employee costs requires deep domain knowledge. That knowledge is encoded in SAP's data products.&lt;/p&gt;
&lt;p&gt;As Muhammad Alam said in the keynote: &quot;Innovations across SAP's unique flywheel of applications, data and AI put developers in the drivers' seat.&quot;&lt;/p&gt;
&lt;p&gt;The flywheel only works if the data layer maintains business context. That's what SAP is protecting with Business Data Cloud and its partner integrations.&lt;/p&gt;
&lt;h3 id=&quot;what-developers-need-to-understand&quot;&gt;What Developers Need to Understand&lt;/h3&gt;
&lt;p&gt;If you're building applications or analytics on SAP data:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Understand data products first:&lt;/strong&gt; Before choosing a compute platform, understand what data products SAP provides for your domain. These are the building blocks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Choose compute based on workload:&lt;/strong&gt; Real-time applications might need SAP HANA Cloud. Large-scale analytics might benefit from Snowflake or Databricks. There's no single right answer.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Maintain semantic understanding:&lt;/strong&gt; Whatever platform you choose, ensure you're working with SAP's data products and business semantics, not raw extracted data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Plan for bidirectionality:&lt;/strong&gt; Data products flow both ways. You can use SAP data in partner platforms and bring partner data into SAP applications. Design your architecture to take advantage of this.&lt;/p&gt;
&lt;p&gt;The flexibility is real. The semantic requirement is non-negotiable.&lt;/p&gt;
</description>
<category>Java</category>
<guid isPermaLink="true">https://coderlegion.com/7059/sap-partnered-with-its-competitors-customers-choose-their-data-platform-thats-weakness</guid>
<pubDate>Wed, 05 Nov 2025 22:59:30 +0000</pubDate>
</item>
</channel>
</rss>