Snowflake's Cortex Code Tames dbt

Snowflake's Cortex Code streamlines dbt project development by automating model creation, testing, and optimization with an AI agent.

2 min read
Demonstration of Snowflake's Cortex Code interface in action.
Cortex Code integrates AI assistance into dbt workflows on Snowflake.· Snowflake

Data engineers often juggle disparate tools for transformation logic, documentation, and pipeline monitoring. Snowflake aims to streamline this with its new AI coding agent, Cortex Code, designed to accelerate development within its platform. This tool is built to understand the nuances of the dbt Snowflake environment.

Unlike general AI assistants, Cortex Code leverages metadata from your Snowflake instance and dbt project. It can generate staging models, automatically apply transformations like casting timestamps and renaming columns to snake_case, and incorporates dbt conventions such as Jinja macros.

Context-Aware Code Generation

Users can prompt Cortex Code to create models from scratch, with the agent generating not just SQL but also integrating necessary configuration and references.

The agent also assists in rapid editing and optimization. It analyzes project run results to identify slow or unused models, offering specific optimization advice.

Automated Documentation and Testing

Adding new calculations, like profit margin, can trigger simultaneous updates to YAML files for column descriptions and relevant tests, such as `not_null` or `accepted_values`.

Smart Troubleshooting and Optimization

For complex issues, such as intricate window functions or Snowflake-specific joins, Cortex Code provides context-aware, syntactically correct suggestions, shortening the debugging cycle.

Flexible Workflow Integration

Cortex Code supports various dbt implementations, including Snowflake's native offering, dbt Core, and dbt Platform. It bridges local development environments with Snowflake, offering a unified AI experience.

Access is provided through the Snowsight interface for native dbt projects on Snowflake, allowing users to create projects, query deployed ones, and inspect files. Alternatively, the Snowflake Cortex Code CLI brings this AI agent directly to your terminal for tasks like documentation generation or test writing.

© 2026 StartupHub.ai. All rights reserved. Do not enter, scrape, copy, reproduce, or republish this article in whole or in part. Use as input to AI training, fine-tuning, retrieval-augmented generation, or any machine-learning system is prohibited without written license. Substantially-similar derivative works will be pursued to the fullest extent of applicable copyright, database, and computer-misuse laws. See our terms.