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 for the AI Data Cloud. You can think of it as a Snowflake-native co‑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.
Snowflake delivers Cortex Code through two main experiences:
-
Cortex Code in Snowsight: an in-product assistant panel that appears inside Workspaces, Worksheets, and other parts of the Snowsight UI. You can ask it questions in natural language (
Explain this query,
Optimize this pipeline,
List tables that contain PII
) and it responds with SQL, explanations, or actions directly against your Snowflake environment. - Cortex Code CLI: a command-line interface that runs in your local shell or terminal (including VS Code and Cursor). The CLI connects to your Snowflake account and can also reach into your broader data stack, including dbt projects and Apache Airflow DAGs.
Under the hood, Cortex Code is more than just code completion. It follows an agentic workflow: it interprets your intent, creates a plan, calls Snowflake- and project-specific tools (for example, SQL execution, schema inspection, dbt commands), and then iterates based on 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):
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 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 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:
Ensure your Snowflake role has the required database roles:
SNOWFLAKE.COPILOT_USERfor basic access.Either
SNOWFLAKE.CORTEX_USERorSNOWFLAKE.CORTEX_AGENT_USERfor full agentic workflows.
Open Snowsight, navigate to a Workspace or SQL Worksheet, and click the Cortex Code icon in the lower-right corner.
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:
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).
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.
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:
- Data engineers and analytics engineers – Cortex Code is a natural fit for people building and maintaining ELT pipelines, dbt projects, and SQL-heavy transformations. It shines when you’re juggling many tables, schemas, and tests across environments and need help keeping the big picture straight.
- Platform and FinOps teams – For teams responsible for Snowflake governance, security, and cost, Cortex Code can quickly surface role hierarchies, PII locations, warehouse usage patterns, and long-running queries, compressing what used to be days of manual investigation into minutes.
- Data Scientists, AI and ML practitioners – When you’re building AI agents, notebooks, or semantic layers on Snowflake, Cortex Code becomes a glue layer across Cortex Functions, Cortex Analyst, semantic views, and your training data. It’s particularly good at generating scaffolding for notebooks and semantic models that you can then refine
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:
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, and heavily inspired by it. Under the hood, it frequently uses Claude models to execute tasks. But despite the similarities, our experience using Cortex Code over Claude Code has led us to draw two key distinctions:
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.
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. Genie Code is similar to Cortex Code in that it is a powerful coding assistant built right into Databricks, just as Cortex Code is embedded in Snowsight. 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 Code | Genie Code | |
|---|---|---|
CLI | ✅ Yes | ❌ No |
In-platform UI | ✅ Snowsight | ✅ Notebooks, SQL editor, etc. |
Data Context | Snowflake catalog (Polaris) + RBAC + Semantic Views | Unity Catalog + lineage |
Integration with other platforms through skills and CLI connectivity | ✅ dbt | ✅ Databricks |
Why is Cortex Code Exciting to Us?
From a phData perspective, Cortex Code hits a lot of themes we care about:
- It compresses time‑to‑value for data and AI projects by turning natural language descriptions into working code, tests, and documentation.
- It reinforces good platform hygiene by making it easier to do the right thing (e.g., using tags, semantic models, and governance features) instead of cutting corners.
- It fits naturally into the “intelligence platform” pattern we’re seeing across enterprises: a consolidated data and AI stack where the same core platform powers analytics, applications, and agents.
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.
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.




