March 19, 2026

What is Cortex Code and Why Does it Matter?

By Dominick Rocco

A phData Perspective

You’ve probably heard a lot of buzz about Snowflake Cortex AI over the past year. Between Cortex Functions, Cortex Analyst, and Cortex Agents, Snowflake has been steadily turning the AI Data Cloud into a place where you can both store data and build intelligent applications on top of it.

Cortex Code is the natural next step in that journey. It’s an AI coding agent that lives alongside your data, understands your Snowflake environment, and helps you actually build and maintain the pipelines, models, semantic layers, and applications that make all that data useful.

As one of Snowflake’s close partners, phData has been hands-on with Cortex Code since the early days. We’ve used it at some of our largest, most strategic customers, and we’ve seen firsthand how it changes the developer workflow. In this blog, we’ll explore what Cortex Code is, why it matters, how to get started, and what we’re doing with it in the field.

What is Cortex Code?

Cortex Code is Snowflake’s AI coding agent – not just an assistant – for the AI Data Cloud. You can think of it as a Snowflake-native agentic developer that understands your schemas, roles, SQL dialect, and overall account configuration, and uses that context to help you write, debug, and build applications more effectively. Cortex Code can act autonomously and use a full set of tools and privileges that make it fundamentally more capable than basic coding assistants.

Snowflake delivers Cortex Code through two main experiences:

Cortex Code is more than just code completion – it’s a coding agent that can accomplish complete tasks. It uses an agentic pattern to interpret your intent, create a plan, call Snowflake- and project-specific tools (for example, SQL execution, schema inspection, dbt commands), and then iterate based on the results. Because it’s Snowflake-aware, it can reason about things like:

  • Which databases, schemas, and tables you can actually see.

  • How your roles and privileges are configured.

  • How to apply Snowflake best practices for performance, cost, and security when generating code.

The result is an assistant that feels much closer to a teammate sitting in your Snowflake account than a generic coding chatbot in a vacuum.

Why Does Cortex Code Matter?

Snowflake has had strong AI and ML stories for a while, but Cortex Code is where AI really starts to touch the day‑to‑day developer workflow. A few reasons this matters to us (and to our customers):

Cortex Code Autonomously Uses Tools and Skills

Cortex Code doesn’t just autocomplete snippets; it behaves like an autonomous agent that interprets your request, plans a multi-step approach, reasons about options, and then implements code using an agentic pattern. Behind the scenes, it orchestrates Snowflake-native tools and specialized skills that are tailored for data engineering work, everything from schema inspection and SQL execution to dbt and Airflow workflows.

Those skills are also extensible. Snowflake ships a strong base set of skills, and our teams have layered in the phData toolkit on top as an additional set of skills for migration, validation, and operations.  We were able to do this in just a few days based on the simplicity of Cortex Code’s custom skill integrations. 

Just as importantly, Cortex Code only takes actions it knows it’s allowed to take: it understands your role and privileges within Snowflake RBAC and limits its behavior to what your current role can see and do, rather than reaching beyond your governance model.

It Sees Inside Your Snowflake Environment (Context Awareness)

Generic coding assistants are great at writing syntactically correct code, but they’re blind to your actual environment: the tables you’ve created, the roles your users have, and the governance rules you live under. Cortex Code is explicitly designed to close that gap.

Because it’s wired into Snowflake’s catalog, documentation, and Horizon metadata, Cortex Code can:

  • Discover objects and relationships using natural language (“Show me tables related to customer churn in ANALYTICS_DB”).

  • Understand tags, masking policies, and lineage so you’re not accidentally pointing a new workload at the wrong data set.

  • Respect your RBAC model by operating only within the permissions of the current role.

  • Use internal tools to query account usage, credit consumption, and security-related metadata when answering questions.

When you ask it to “optimize this query,” it isn’t optimizing some theoretical SQL sample; it’s looking at your actual warehouse, your actual query plan, and your actual data model in Snowflake. That context-awareness is also what makes it so effective for things like:

  • Explaining and refactoring long, legacy stored procedures.

  • Surfacing PII-tagged tables across large environments.

  • Debugging schema mismatches or broken joins across complex pipelines.

It’s Readily Available to Any Snowflake User

One of the biggest advantages of Cortex Code is simple: you don’t have to go through a complex install or a new procurement motion to try it.

In Snowsight, Cortex Code is exposed as an icon in the lower-right corner of the UI. If your account team has enabled the feature and your role has the right database roles, you can just click, type a question, and start using it. There’s nothing to deploy, no browser extensions to manage, and no requirement to convince your security team to approve yet another SaaS tool.

For teams that want to go deeper, the Cortex Code CLI brings the same agent into a local shell. That means you can embed it into the tools you already use, like VS Code or Cursor, and let it run SQL, inspect schemas, and orchestrate workflows from your terminal. Snowflake has even introduced a standalone subscription for the CLI, so teams that aren’t fully on Snowflake yet can still adopt Cortex Code as part of their developer toolkit.

It Supports the Broader Snowflake Ecosystem (and Software/Data Engineering as a Whole)

Cortex Code is not limited to simple write me a SELECT query tasks. It’s evolving into an AI companion for the full lifecycle of data and software engineering.  Further, it supports agent skills (like Claude Code) so that it can be extended beyond its core Snowflake capabilities.

Inside Snowsight and Workspaces, Cortex Code can:

  • Generate and refactor SQL in files and notebooks.

  • Build and edit dbt projects that run directly on Snowflake.

  • Create, explain, and optimize notebooks for machine learning workflows.

  • Help manage and debug semantic models used by Cortex Analyst and other AI experiences.

Through the Cortex Code CLI, Snowflake is now explicitly extending that assistance into the broader ecosystem:

  • dbt workflows: helping with model scaffolding, dependency graphs, tests, and incremental logic.

  • Apache Airflow: supporting DAG development, debugging, and optimization for production pipelines.

  • Git-centric workflows: working alongside version control, code review, and CI/CD rather than replacing them.

In other words, Cortex Code isn’t trying to force everyone into a single Snowflake-only experience. It’s meeting engineers where they already work and bringing Snowflake’s context, governance, and AI capabilities along for the ride.

How to Get Started with Cortex Code

From what we’ve seen with customers, there are really two on-ramps: one for teams that mostly live in Snowsight, and another for developers who live in terminals and editors.

This section assumes that Cortex Code is enabled in your Snowflake account. Some conditions may require you to reach out to your Snowflake account team or internal support teams. For instance, customers who previously disabled Cortex Copilot will also have Cortex Code disabled.

Start in Snowsight

For most Snowflake users, the easiest way to get going is inside Snowsight:

  1. Ensure your Snowflake role has the required database roles:

    • SNOWFLAKE.COPILOT_USER for basic access.

    • Either SNOWFLAKE.CORTEX_USER or SNOWFLAKE.CORTEX_AGENT_USER for full agentic workflows.

  2. Open Snowsight, navigate to a Workspace or SQL Worksheet, and click the Cortex Code icon in the lower-right corner.

  3. Start with simple prompts:

    • Explain what this SQL script does.

    • Optimize this query for cost.

    • List tables tagged PII = TRUE in ANALYTICS_DB.

    • Generate a notebook that trains a churn model on this table.

This path is especially good for analysts, data engineers, and admins who want help interpreting queries, exploring metadata, or answering what’s going on in my account? type questions.

Bring it Into Your Terminal and Editor with the CLI

If your team already has a strong local development workflow, the Cortex Code CLI is where things get interesting:

  1. Install the Cortex Code CLI and authenticate it against your Snowflake account (Snowflake’s documentation walks through the steps for your OS and auth method).

  2. Point the CLI at your Snowflake account and, optionally, at your dbt or Airflow projects so it can reason about both your code and your data.

  3. Use natural language to drive tasks you’d normally script by hand:

    • Create a dbt model that builds a daily revenue mart from RAW.ORDERS.

    • Debug why this Airflow DAG is failing on the final task.

    • Refactor this stored procedure into maintainable SQL + dbt models.

Snowflake has also introduced a self-service subscription for Cortex Code CLI that’s decoupled from Snowflake compute, which lowers the barrier for teams who want to standardize on Cortex Code even before every workload has moved into Snowflake.

Who Should Use Cortex Code?

Like Snowpark before it, Cortex Code is powerful, but it’s not for absolutely every persona or every task. We see a few groups getting outsized value right away:

What is phData Doing with Cortex Code?

Because we sit at the intersection of Snowflake, AI, and real customer workloads, we’ve been early adopters of Cortex Code across a range of industries. A few examples that illustrate how we’re using it today:

  • Ochsner Health: Accelerating Legacy Migrations with Reusable Informatica and SSIS Skills

    At Ochsner, our team used the Informatica and SSIS estate as a proving ground for Cortex Code skills that now generalize across migrations. Our team turned a standardized Informatica mapping-XML prompt into an Informatica-to-dbt skill that lets Cortex Code parse mappings and emit clean, Snowflake-native dbt models, cutting translation and conversion time by 96% and allowing a single engineer to manage most of the migration. 


    In parallel, we applied the same pattern to SQL Server and SSIS using the phData Toolkit and Cortex Code together, and on one representative environment (751 stored procedures, 241 functions, 1,991 views, 131 SSIS packages) reduced migration engineering hours from 15,263 to 5,301 (65.2% reduction) and achieved roughly 87% functionally equivalent automation before engineers stepped in for the hardest 13%

  • Chipotle: Accelerating a “talk‑to‑your‑data” AI Sales Assistant At Chipotle, phData developed a “talk-to-your-data” experience for sales and finance users so they can ask natural-language questions about performance — by store, region, product mix, promotions, and more — and get trustworthy answers grounded in a rich semantic model originally built for Power BI. A key challenge was translating that semantic model (20+ tables and 200+ measures) into a Snowflake Semantic View that Cortex Analyst and Cortex Agents could use reliably. Cortex Code helped us debug naming mismatches, refine semantic view definitions, and add new measures much faster than a manual approach. The team estimates a 2–3x speedup in semantic model development, which allowed us to deliver more capability within an 8‑week PoC window. Read the Full Story

  • Biopharma Data Platform: Streamlining Tagging with Cortex Code and Streamlit A growing life sciences company runs a large, multi-account Snowflake platform where each business unit must tag Snowflake objects with attributes like Data Classification Category and Business Approver — work that had devolved into slow, error‑prone exports, spreadsheets, and ad hoc SQL. phData built a Streamlit app that lets technical owners search and filter the databases and roles they manage, then update tags in real time, but it needed stronger access controls, better filtering, and UI polish. With Cortex Code, the team implemented those enhancements in hours instead of weeks, generating context-aware Streamlit and SQL changes and even surfacing flaws in the original search logic. What was expected to take another three-week sprint was reduced to about two hours of focused work, and the client is now exploring a broader “Data Engineer Copilot” chatbot that uses Cortex Code as a core building block.

  • Kiewit: Untangling Legacy Stored Procedures Kiewit has a long history of complex, stored procedure–driven data movement into Snowflake, with large, intricate routines that were difficult to reason about and modernize. Our team has been using Cortex Code to summarize those procedures in plain language, validate our understanding against live data, and generate targeted SQL to test specific hypotheses about how data flows through the logic. That combination has dramatically reduced the time required to get oriented to a legacy codebase and propose safe refactors, without sacrificing careful engineering judgment.

How Does Cortex Code Compare to Claude Code?

Cortex Code is similar to Claude Code, but is designed specifically for analytics and data engineering. Under the hood, it frequently uses Claude models to execute tasks, but Cortex Code’s enterprise data context, built-in security, and governance make it ideal for analytics and data engineering work.  This is notably evidenced by its state-of-the-art performance on the ADE bench.  Cortex Code also provides the ability to select an LLM of the customer’s choice, which provides levers for cost optimization in the long term.

  • Focus: Cortex Code is tailored for data stacks, SQL-native operations, and database interactions, offering built-in hooks for Snowflake. Claude Code is a more general-purpose AI agent designed to interact with codebases via the terminal.

  • Environment: Cortex Code operates within the Snowflake ecosystem but also supports external Git repositories and data sources. Having Cortex Code embedded right inside the Snowsight makes it easy for anyone to get started, but it can also be extended to your own stack beyond Snowflake. Running within the Snowflake perimeter also provides security and governance advantages for those concerned with data context leaking to external providers. 

  • State-of-the-art for Analytics & Data Engineering:  Based on Snowflake’s testing – Cortex Code and Claude Code against the set of ADE-Bench tasks using dbt + Snowflake with the same underlying model – Claude Opus 4.6. Cortex Code successfully completed 28 of 43 tasks (65%), compared to 25 of 43 (58%) for Claude Code. Cortex Code required nearly 50% fewer total calls to reach the correct solution, including 2x fewer file reads and 4x fewer bash commands. This efficiency is driven by a SQL-native approach using snowflake_sql_execute tool, which enables native execution within Snowflake, resulting in more target exploration.

  • Extensibility: Ability to bring over existing workflows from other agents, such as Claude Code or Cursor, using the open agents.md framework.

  • Expanded model choice: Choose from Claude Opus 4.6, Sonnet 4.6, and OpenAI GPT 5.2 models to match workload requirements

How Does Cortex Code Compare to Databricks Genie Code?

While Cortex Code has been gaining popularity, Databricks just released its new Genie Code assistant right within the Databricks platform. Both Cortex Code and Genie Code are integrated into the web UI of their respective platforms. But as of now, Genie Code does not have a command-line interface (CLI), which is significant – one of the major points of praise from Cortex Code users is the CLI functionality for power users.  The CLI also allows Cortex Code to help data engineers get work done across other tools and platforms.  Snowflake has extended Cortex Code by adding dedicated skills for dbt and Airflow. With these integrations, it’s quite practical to use Cortex Code to develop and deploy a dbt+Airflow pipeline that executes transformations on either Databricks or Snowflake – a possibility that really speaks to the power and extensibility of Cortex Code CLI as the one-stop tool for data engineers. 

 Cortex CodeGenie Code

CLI

✅ Yes

❌ No

In-platform UI

Snowsight

Notebooks, SQL editor, etc.

Data Context

Snowflake catalog (Horizon) + RBAC + Semantic Views

Unity Catalog + lineage

Integration with other platforms through skills and CLI connectivity

dbt
Apache Airflow
Databricks

Databricks

Why is Cortex Code Exciting to Us?

From a phData perspective, Cortex Code hits a lot of themes we care about:

We’re also excited that Snowflake is leaning into an ecosystem-first posture with Cortex Code — making the CLI work well with dbt and Airflow, rather than pretending those tools don’t exist. That’s exactly the kind of pragmatic approach that makes AI coding agents sustainable in real enterprise environments.

Conclusion

Cortex Code is still early, but it already feels like an important part of how teams will build on Snowflake in the AI era. By making an AI coding agent available directly inside Snowsight, extending it into the CLI and popular tools like dbt and Airflow, and grounding everything in Snowflake’s catalog and governance, Snowflake has given developers a powerful way to go from ideas to working systems much faster.

At phData, we see Cortex Code as a natural complement to the work we’ve been doing for years with Snowpark, Snowpark Container Services, and now Cortex AI. It doesn’t replace good engineering, but it does remove a lot of friction — and in a world where everyone is trying to build intelligence platforms and AI products at the same time, that friction matters.

We’ll keep sharing what we learn as we use Cortex Code with more customers and more use cases. In the meantime, if you’re a Snowflake customer, the bar to experimentation has never been lower: open Snowsight, click the Cortex Code icon, and see how far you can get in a single afternoon.

phData Blue Shield

Ready to turn Cortex Code experiments into production results?

Our team can help you get there with a fixed‑fee migration offering tailored to your Snowflake environment. Enroll today to get started quickly and confidently.

Data Coach is our premium analytics training program with one-on-one coaching from renowned experts.

Accelerate and automate your data projects with the phData Toolkit