iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
❄️

Evolving the SQL Analysis Experience with Snowflake Copilot Inline

に公開

Introduction

I recently returned from Snowflake Summit 2025 held in San Francisco! At the Summit, many notable updates were announced, including the acquisition of Crunchy Data, Snowflake Openflow for highly flexible data ingestion, and the advanced evolution of the AI platform. I also had the opportunity for meaningful discussions with many customers and partners.

Among these, an update particularly related to improving the developer experience was the release of Snowflake Workspaces, and within that, "Snowflake Copilot Inline" was announced! This feature makes the SQL-based analysis experience more intuitive and efficient.

While the traditional Snowflake Copilot required interacting in a chat format on a dedicated screen, Copilot Inline now allows you to ask the AI assistant directly within your SQL code. This feels almost like pair programming with a veteran analyst, making it a groundbreaking feature where the AI supports your code creation.

In this article, I will introduce the value I felt while actually using Snowflake Copilot Inline, its specific usage, and tips for leveraging it. If you are interested in improving productivity in SQL development, please read until the end!

What is Snowflake Copilot Inline?

Snowflake Copilot Inline is an AI assistant feature that can be used directly embedded within SQL code inside Snowflake Workspaces. Positioned as an extension of the traditional Snowflake Copilot, it has the following characteristics:

Main Features

Feature Description
Inline Operation Call the AI assistant using the CMD+I (Mac) or Ctrl+I (Windows) shortcut within a SQL file
Context Awareness Automatically understands current file content and database/schema information
Real-time Suggestions Provides immediate improvement or correction suggestions for SQL queries based on the code content
Diff View Displays suggested changes in an easy-to-read diff format
One-click Application Instantly reflects suggestions into the code using the Accept button

Supported Regions

Snowflake Copilot Inline is natively supported in the following regions:

  • AWS US West 2 (Oregon)
  • AWS US East 1 (N. Virginia)

It can also be used in other regions by configuring the cross-region inference parameter CORTEX_ENABLED_CROSS_REGION.

What is Snowflake Workspaces?

Before understanding Snowflake Copilot Inline, I will briefly introduce Snowflake Workspaces, which serves as its foundation.

Snowflake Workspaces is an integrated development environment (IDE) for creating, organizing, and managing code across multiple file types, accessible immediately after logging into Snowsight. Unlike traditional Worksheets, it has the following features:

Key Features of Workspaces

Item Traditional Worksheet Workspaces
File Management Managed as individual worksheets Hierarchical management based on files and folders
Development Environment Focused on single query execution IDE-like integrated development environment
Git Integration Not supported Supports synchronization with Git repositories
Parallel Execution Executes one query at a time Two queries can be executed simultaneously from the same SQL file
Version Control Basic history only Full-fledged version control via Git

Access Control and Permission Settings

To use Snowflake Copilot Inline, the following permissions are required:

Required Permissions

  1. COPILOT_USER database role

    • A role within the SNOWFLAKE database
    • Granted to the PUBLIC role by default
  2. CORTEX_USER database role

    • A role within the SNOWFLAKE database
    • Required for using Snowflake AISQL features
    • Granted to the PUBLIC role by default
  3. Access to the claude-3.5-sonnet model

    • Must be included in the model allowlist
    • No restrictions by RBAC should be in place

Checking and Setting Permissions

Basically, all users can use it with default settings, but if you cannot access it, please check the following:

-- Check current permissions
SHOW GRANTS TO ROLE PUBLIC;

-- Grant permissions if necessary (ACCOUNTADMIN privilege required)
USE ROLE ACCOUNTADMIN;
GRANT DATABASE ROLE SNOWFLAKE.COPILOT_USER TO ROLE PUBLIC;
GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO ROLE PUBLIC;

Supported Use Cases and Scenarios

Snowflake Copilot Inline is powerful in the following scenarios:

1. Data Exploration

You can deepen your understanding of unfamiliar datasets by asking the AI questions:

  • "What tables are in this schema?"
  • "Tell me about the structure of the customer table."

2. SQL Query Generation

You can have natural language requests converted into SQL:

  • "I want to get the monthly sales trend for the past year."
  • "Display the purchase frequency by customer in a ranking format."
  • "Create a sales analysis query that excludes outliers."

3. Query Improvement and Optimization

You can receive improvement suggestions for existing queries:

  • "Improve the performance of this query."
  • "Rewrite this to be more readable."
  • "Suggest ways to make this SQL more efficient."

4. Syntax Error Correction

You can quickly fix SQL syntax errors:

  • "Fix the syntax error."
  • "Tell me why this query isn't working."
  • "Correct this to use the proper JOIN syntax."

How to Use

Operating Snowflake Copilot Inline is very simple:

Basic Workflow

  1. Open Workspaces
    • Navigate to the Workspaces section in Snowsight.
    • Create a new file or open an existing SQL file.

  1. Invoke Copilot Inline
    • Place your cursor at the desired position.
    • Press CMD+I (Mac) or Ctrl+I (Windows).

  1. Enter Your Question or Request
    • Type your request in natural language in the message dialog.
    • Click the send icon to submit it to the AI.

  1. Review the Suggestions

    • Check the changes generated by the AI in diff format.
    • Red: Lines to be removed, Green: Lines to be added.
  2. Apply the Changes

    • Accept: Accept the suggestion and reflect it in the code.
    • Reject: Decline the suggestion.
    • Close: End the session.

  1. Execute the Suggested Query
    • Run the suggested query.

Limitations and Considerations

Snowflake Copilot Inline has the following limitations:

Technical Limitations

Item Details
Data Access Cannot reference actual data values within tables (metadata only)
Response Time Complex requests may require several seconds of processing time
New Object Recognition Recognition of newly created tables/schemas takes 3-4 hours
Search Scope Limitation Only the top 10 most relevant tables and 10 columns are considered

Language Support

The supported languages are as follows (Japanese is supported!):

Supported Languages

Quality of SQL Suggestions

  • Not Perfect: It may occasionally suggest invalid syntax or non-existent objects.
  • Verification is Key: It is recommended to review the suggested query before execution.
  • No Feedback Mechanism: Currently, Copilot Inline does not have a feature for improvement through feedback.

Snowflake Copilot itself is a feature intended for data analysts and developers. While it is easy to use without perfectly prepared database metadata, it still requires a certain level of knowledge regarding your company's data and SQL.

Business Value and ROI

Expected effects of adopting Snowflake Copilot Inline:

Improved Development Efficiency

  • Reduced SQL Creation Time: Automated generation from natural language shortens the time required for analysis and development.
  • Reduced Debugging Time: AI-driven syntax error detection and correction suggestions.
  • Lowered Learning Costs: Even less experienced developers can create high-quality queries.

Promotion of Data Utilization

  • Accelerated Exploratory Analysis: Faster understanding of new datasets.
  • Spread of Best Practices: AI suggests optimized query patterns.
  • Elimination of Knowledge Silos: A development structure that does not rely solely on individual SQL skills.

Cost Reduction Effects

  • Optimization of Development Resources: Freedom from repetitive query creation tasks.
  • Reduction in Training Costs: Shortening of OJT and training time.
  • Quality Improvement: Prevention of rework by reducing human errors.

Conclusion

I feel that Snowflake Copilot Inline is a groundbreaking feature that fundamentally changes the SQL analysis experience. In particular, it provides significant value in the following areas:

  • Enhanced Developer Experience: Code creation feels like pair programming.
  • Accelerated Learning Efficiency: Naturally acquire best practices through suggestions from the AI.
  • Significant Productivity Boost: Focusing on more creative analytical work by being freed from simple tasks.

I also frequently find myself wondering, "Wait, how do I write this query again?" and it is extremely useful because I can quickly fix the syntax without switching screens.

I highly recommend this feature to everyone involved in SQL analysis and development. Please give it a try!

Promotions

Delivered a Virtual Hands-on at SNOWFLAKE DISCOVER!

In the large-scale webinar for Snowflake engineers, SNOWFLAKE DISCOVER Part 2, held on July 8-9, 2025, I delivered a practical virtual hands-on session titled "Next-Generation VoC (Voice of Customer) Analysis Powered by Snowflake Cortex AI." This session allows you to experience how to analyze customer feedback—a relevant topic across many industries—using Snowflake's latest features. If you are looking for hints on analyzing unstructured data, I hope you'll check it out!

You can watch it immediately on-demand by registering through the link below.

Spoke at SNOWFLAKE DISCOVER!

In the SNOWFLAKE DISCOVER webinar for engineers held on April 24-25, 2025, I presented the very first session titled "Starting Snowflake from Scratch: Building a Modern Data & AI Platform." I explained everything from an overview of Snowflake to its latest status as clearly as possible, so I would be happy if you could use it to catch up!

You can watch it immediately on-demand by registering through the link below.

Spoke at the Generative AI Conf Webinar!

In a webinar themed "Platforms Supporting the Generative AI Era," I gave a Lightning Talk (LT) as a Snowflake employee on the theme of Data * AI, alongside speakers from NVIDIA and my former employer, AWS! You can watch the archived video here:

https://www.youtube.com/live/no9WYeLFNaI?si=2r0TVWLkv1F5d4Gs

Delivering Snowflake "What's New" Updates on X

I post Snowflake "What's New" update information on X. Please feel free to follow!

Japanese Version

Snowflake What's New Bot (Japanese Version)
https://x.com/snow_new_jp

English Version

Snowflake What's New Bot (English Version)
https://x.com/snow_new_en

Revision History

(2025/06/10) New post
(2025/06/29) Updated promotion section
(2025/09/27) Updated promotion section

Discussion