Snowflake Cortex Code: What It Is, How It Works, and Why Context Matters

Emily Winks profile picture
Data Governance Expert
Updated:03/24/2026
|
Published:05/25/2024
11 min read

Key takeaways

  • Cortex Code generates SQL, Python, dbt models, and Airflow DAGs from natural language inside Snowflake.
  • Three-layer security model: RBAC permissions, OS-level sandboxing, and a three-tier approval system.
  • The Cortex Code CLI brings AI-assisted development to local terminals with dbt and Airflow support.
  • Enterprise context beyond Snowflake requires a cross-platform context layer for governed AI development.

What is Snowflake Cortex Code?

Cortex Code is Snowflake's AI coding agent that turns natural language instructions into production-ready SQL and Python. It operates in Snowsight and as a standalone CLI, with RBAC controls governing every action. Since its November 2025 launch, 4,400+ users have adopted it for daily data development.

Key capabilities:

  • Code generation and optimization for SQL and Python from natural language
  • Data pipeline development with dbt project scaffolding and Apache Airflow DAGs
  • Account administration including credit monitoring and permission management
  • Data discovery through natural language queries against your Snowflake environment

Want to skip the manual work?

See Atlan for Snowflake

Snowflake Cortex Code generates and optimizes SQL and Python, builds data pipelines with dbt and Apache Airflow, administers account settings, and discovers data through natural language. Available in Snowsight and as a standalone CLI, Cortex Code operates within Snowflake’s RBAC security model.

Since its November 2025 launch, 4,400+ users have adopted Cortex Code. The February 2026 CLI expansion with dbt and Airflow support signals Snowflake’s intent to make it a universal data development tool. Here is what it does and where its context boundaries matter.

Attribute Detail
Product Snowflake Cortex Code
Category AI coding agent
Launched November 2025
Users 4,400+
Interfaces Snowsight (web), CLI (local shell)
Languages SQL, Python
Pipeline support dbt, Apache Airflow (GA Feb 2026)
Security RBAC, OS-level sandboxing, three-tier approval
Pricing Credit-based + standalone monthly subscription

A data engineer describes a transformation in plain English. Cortex Code generates the SQL, suggests optimizations, and handles boilerplate — faster development cycles without sacrificing the governance controls that Snowflake’s permission model enforces.

Infographic showing four core capabilities of Snowflake Cortex Code: code generation, pipeline building, account administration, and data discovery.

Cortex Code handles SQL/Python development, pipeline orchestration, Snowflake administration, and natural language discovery. Source: Atlan.


How does Cortex Code compare to Cortex Analyst, Cortex Search, and Cortex Agents?

Permalink to “How does Cortex Code compare to Cortex Analyst, Cortex Search, and Cortex Agents?”

Cortex Code is the builder in Snowflake’s Cortex product family. Cortex Analyst translates natural language into SQL queries via semantic models. Cortex Search provides RAG-based search over unstructured data. Cortex Agents orchestrate multi-step reasoning. Cortex Code generates, optimizes, and deploys the code that powers all of them.

Product Function Input Output Use case
Cortex Code AI coding agent Natural language instructions SQL, Python, dbt models, Airflow DAGs Build and optimize data pipelines
Cortex Analyst NL-to-SQL query engine Natural language questions SQL queries via semantic models Self-service analytics
Cortex Search RAG search engine Search queries Relevant unstructured documents Document retrieval and Q&A
Cortex Agents Reasoning framework Multi-step tasks Orchestrated agent workflows Complex multi-tool automation

The simplest distinction: Cortex Code creates; Cortex Analyst retrieves. A data engineer uses Cortex Code to build a dbt model that transforms raw event data into a clean analytics table. A business analyst then uses Cortex Analyst to query that table in natural language without writing SQL.

Cortex Code also generates the artifacts that other Cortex products consume. The dbt models and Airflow DAGs it produces can be orchestrated by Cortex Agents, while the structured data it creates can be indexed by Cortex Search. For a deeper look at how these products work together, see Snowflake Cortex use cases, Snowflake Horizon and Atlan, and Snowflake Intelligence.


What can Cortex Code do? Key capabilities

Permalink to “What can Cortex Code do? Key capabilities”

Cortex Code handles four categories of data development work: code generation and optimization for SQL and Python, data pipeline building with dbt and Apache Airflow, Snowflake account administration including credit monitoring and permissions, and data discovery through natural language queries against your Snowflake environment.

Code generation and optimization: in practice

Permalink to “Code generation and optimization: in practice”

Cortex Code generates SQL queries and Python notebook cells from natural language descriptions. It also optimizes existing queries for performance and suggests fixes for failing code. A data engineer can paste a slow-running query, describe the intended outcome, and receive an optimized version with explanations for each change.

Data pipeline development: in practice

Permalink to “Data pipeline development: in practice”

As of February 2026, Cortex Code CLI supports dbt project scaffolding, model generation, and test creation from natural language. It also generates Apache Airflow DAGs with proper task dependencies and scheduling logic. Engineers can iterate on pipeline logic through conversational refinement rather than manual editing.

Account administration: in practice

Permalink to “Account administration: in practice”

Cortex Code monitors credit consumption and query performance across your Snowflake account. It reviews governance settings, surfaces permission structures, and recommends configuration changes — letting engineers handle account housekeeping through natural language instead of navigating Snowsight menus.

Data discovery: in practice

Permalink to “Data discovery: in practice”

Cortex Code finds relevant tables, views, and columns through natural language. It surfaces schema details and usage patterns, then connects discovery directly to code generation. A single conversation can move from “find all tables with customer email data” to a working SQL query against those tables. For organizations tracking data assets across systems, column-level lineage adds cross-platform visibility to this discovery workflow.


How does Cortex Code handle security?

Permalink to “How does Cortex Code handle security?”

Cortex Code enforces security through three layers: Snowflake’s native RBAC permissions, OS-level sandboxing that isolates code execution, and a three-tier approval system that classifies actions by risk level. Every operation respects the user’s existing Snowflake role and access grants.

Layer 1: Role-based access control. Cortex Code inherits the user’s Snowflake role. It cannot access data, tables, or operations that the user’s current role does not permit. If a data engineer’s role lacks access to production schemas, Cortex Code cannot generate queries against those schemas.

Layer 2: OS-level sandboxing. All code that Cortex Code generates and executes runs in isolated OS-level containers. The execution environment has no access to external systems, network resources, or local files unless explicitly granted. This prevents generated code from reaching beyond its intended scope.

Layer 3: Three-tier approval system. Cortex Code uses a three-tier approval system, where low-risk actions (such as reading metadata) can execute automatically, while more sensitive operations (like running queries or applying DDL/DML changes) may require explicit user or administrator approval, depending on your configuration. This tiered model balances developer velocity with AI governance requirements.

Infographic showing three security layers: RBAC permissions at top, OS-level sandboxing in middle, and three-tier approval system at bottom

Three-layer security model protecting code execution in Snowflake Cortex Code. Source: Atlan.


Beyond Snowsight: The Cortex Code CLI expansion

Permalink to “Beyond Snowsight: The Cortex Code CLI expansion”

The Cortex Code CLI, which reached general availability in February 2026, extends Cortex Code beyond Snowsight into local development environments. It supports dbt project scaffolding and Apache Airflow DAG generation from the terminal. A standalone monthly subscription makes Cortex Code CLI accessible even if you don’t run workloads on Snowflake today. Snowflake still bills any warehouse and storage usage separately, but your CLI usage is metered within the subscription rather than per individual query.

The CLI addresses a specific gap: data engineers who work in terminal-first workflows. Before the CLI, Cortex Code was only available inside the Snowsight web interface. Engineers who live in VS Code, iTerm, or Vim had to context-switch into a browser to use it. The CLI eliminates that friction.

The dbt integration matters most here. Engineers describe a transformation in natural language, and Cortex Code generates the dbt model, schema tests, and documentation. Airflow support works the same way for DAG creation with task dependencies and scheduling. Snowflake released Cortex Code as a standalone tool beyond Snowsight, extending AI assistance across the full data development lifecycle. Teams that pair CLI-driven development with a data catalog gain visibility into how AI-generated assets connect to the rest of the stack.


Where Cortex Code’s context ends, and why enterprise context matters

Permalink to “Where Cortex Code’s context ends, and why enterprise context matters”

Cortex Code understands Snowflake-native context: your tables, roles, query history, and account settings. Most enterprise data questions cross system boundaries. When a data engineer asks Cortex Code to build a pipeline, the lineage, business definitions, quality rules, and ownership for upstream sources often live outside Snowflake in tools like dbt, Airflow, Looker, or Tableau.

Consider common questions that arise during data development: Why was this table deprecated? Who owns this metric? What downstream dashboards break if this column changes? These questions require context that spans CRM systems, data quality platforms, BI tools, and governance policies. Cortex Code’s Snowflake-scoped context handles the “how” of code generation well. The “why” behind data decisions lives elsewhere.

An enterprise context layer fills that gap. It connects metadata, lineage, and business definitions across every system in the data stack, not just Snowflake. Atlan, Snowflake’s Data Governance Partner of the Year 2025, provides this cross-platform context through its context layer for Snowflake.

In practice, context maintenance follows an agent-human split. AI agents like Cortex Code can generate roughly 80% of context documentation by reading schemas, inferring relationships, and proposing descriptions. Human data stewards review and refine the remaining 20%. Cortex Code can be the agent that reads, proposes, and updates context. A governed context layer is the memory where that context lives and is trusted.

Atlan’s MCP server gives AI agents programmatic access to this governed context. Column-level lineage across Snowflake and connected systems means Cortex Code can build with full awareness of cross-platform impact.

AI governance policies define what agents can and cannot do. The metadata lakehouse stores the unified metadata that powers this context across all connected systems.



Snowflake Cortex Code: Why Enterprise Context Matters

Permalink to “Snowflake Cortex Code: Why Enterprise Context Matters”

Cortex Code accelerates Snowflake-native data development through AI-generated SQL, Python, dbt models, and Airflow DAGs, all within RBAC and sandboxed security. For enterprise teams, complementing Snowflake-scoped AI agents with cross-platform governed context ensures that AI-generated code is trustworthy across the full data stack.

Cortex Code changes how data engineers interact with Snowflake. Describe what you need; get working code. The CLI expansion, dbt integration, and standalone subscription show that Snowflake treats AI-assisted development as a core capability, not an experiment.

Enterprise teams adopting AI coding agents need to ensure the code they produce is trustworthy across the full data stack, not just within Snowflake. Gartner reports that 85% of AI initiatives do not progress beyond the pilot phase, often because governance and data quality foundations are insufficient. Cortex Code addresses the Snowflake-scoped portion of that challenge. Cross-platform governance (lineage, business context, quality rules, and access policies that span every tool) requires a complementary layer. Snowflake data governance covers the Snowflake-native portion; enterprise governance extends that across every connected system.

Atlan, a Gartner Magic Quadrant Leader for Metadata Management 2025, works alongside Snowflake to provide that complementary layer. For data engineering and AI/ML leaders evaluating Cortex Code, the combination of Snowflake-native AI agents with enterprise-wide governed context provides both the speed of AI-assisted development and the auditability that production data systems require.

The business definitions, lineage, quality rules, and ownership data that live across your full data stack determine whether AI-generated code is trustworthy in production. Cortex Code generates the code; an enterprise context layer provides the cross-platform metadata that makes that code safe to deploy.


FAQs about Snowflake Cortex Code

Permalink to “FAQs about Snowflake Cortex Code”

What is Snowflake Cortex Code?

Permalink to “What is Snowflake Cortex Code?”

Cortex Code is Snowflake’s AI coding agent that generates and optimizes SQL and Python code from natural language. It supports data pipeline development with dbt and Apache Airflow, account administration, and data discovery. It runs in Snowsight or the standalone CLI.

How does Cortex Code differ from Cortex Analyst?

Permalink to “How does Cortex Code differ from Cortex Analyst?”

Cortex Code is a builder that generates code artifacts like SQL queries, Python scripts, and dbt models. Cortex Analyst is a querier that translates natural language questions into SQL via semantic models for business users. Code creates; Analyst retrieves.

Is Cortex Code free to use?

Permalink to “Is Cortex Code free to use?”

Cortex Code CLI is billed either through a self-service monthly subscription (with a free trial) or pay-as-you-go token consumption for existing Snowflake customers. Any Snowflake compute and storage used by the code still follows your normal Snowflake credit pricing. Cortex Code in Snowsight is currently free of charge; Snowflake has said they’ll notify customers before introducing any Snowsight-specific billing.

What programming languages does Cortex Code support?

Permalink to “What programming languages does Cortex Code support?”

Cortex Code generates SQL and Python code. For pipeline development, it also creates dbt models (SQL-based) and Apache Airflow DAGs (Python-based). It does not currently support other languages like Java or Scala.

Can Cortex Code build dbt models?

Permalink to “Can Cortex Code build dbt models?”

Yes. As of February 2026, Cortex Code CLI supports dbt project scaffolding, model generation, and test creation from natural language instructions. You can describe a transformation in plain English and Cortex Code generates the corresponding dbt model and schema tests.

Does Cortex Code have access controls?

Permalink to “Does Cortex Code have access controls?”

Cortex Code inherits Snowflake’s native RBAC permissions. It can only access data and perform actions that the user’s current role allows. Additional security includes OS-level sandboxing for code execution and a three-tier approval system that classifies actions by risk level.

What is the Cortex Code CLI?

Permalink to “What is the Cortex Code CLI?”

The Cortex Code CLI is a command-line interface that brings Cortex Code capabilities to local development environments. It reached general availability in February 2026 with support for dbt and Apache Airflow workflows. It runs outside Snowsight as a standalone tool.

Share this article

signoff-panel-logo

Atlan is the next-generation platform for data and AI governance. It is a control plane that stitches together a business's disparate data infrastructure, cataloging and enriching data with business context and security.

 

Everyone's talking about the context layer. We're the first to build one, live. April 29, 11 AM ET · Save Your Spot →

Bridge the context gap.
Ship AI that works.

[Website env: production]