Snowflake Copilot
One of the public preview features that was recently launched: Snowflake Copilot. Introduced in April 2024, so Snowflake is a bit late to…
One of the public preview features that was recently launched: Snowflake Copilot. Introduced in April 2024, so Snowflake is a bit late to the party it seems, available only in select Snowflake regions: AWS us-east-1 & AWS us-west-2. So, how can we access this?
Very simple, launch a 30 day trial (as described here), with one difference, choose region US East (Northern Virginia). After going through the rest of the trial-launch questions, click + to open new worksheet. You will find a button in the bottom right corner:
Set the context for the worksheet: database & warehouse. Then, start asking your questions:

When you start your first Copilot session, you might not be able to see answers to your queries. Two different replies can be visible:


“Delay in detecting new databases, schemas, and tables: It may take up to 3–4 hours for Snowflake Copilot to recognize newly created databases, schemas, and tables”. For this trial, i checked the next day, to find the database indexed, and I could use Copilot.
This is ok for now, but I am assuming this will be fixed by Snowflake in the future. Let’s say you’re working on some scenario’s where you create new tables and have to wait for 3–4 hours, that will be a major disadvantage.
In one of the previous printscreens, some example questions were given by Snowflake. Let’s try some. For this example, I am using the shared databased containing Github data:

Show me a sample:

When Copilot builds a query, two options are shown: add to worksheet (without executing the query) and run (where the query is also added to the worksheet):

Now, the final test for this article, let’s see how we can make Copilot build a query with some SQL constructs like PARTITION and ROW_NUMBER. First, an explanation is shown so we can validate.

This is the SQL we get:
WITH recent_ids AS (
SELECT
actor_display_login,
id,
ROW_NUMBER() OVER (
PARTITION BY actor_display_login
ORDER BY
id DESC
) AS row_num
FROM
github_events
)
SELECT
actor_display_login,
id
FROM
recent_ids
WHERE
row_num = 1;The result:

Before jumping to conclusions (will digg into Copilot in more detail in future posts), I see some nice things:
- Copilot uses the metadata of your database
- The text-to-SQL examples are quite nice and well done from Copilot
- So far English and SQL supported
- The explanation before actually generating the SQL is a nice first indication if Copilot understands your request
Interesting things to find out in the future:
- will the 3–4 hours indexing be improved
- wat will the pricing model (currently it seems for free)
- will the governance part (only see data you are allowed to see) work as expected
- will Copilot be able to help with performance improvements
- etc etc