Get startedGet started for free

Snowflake CoCo vs. Other Coding Assistants

1. Snowflake CoCo vs. Other Coding Assistants

You might be wondering: If I already have an AI coding assistant, why should I switch to Snowflake CoCo? Couldn't I just use what I'm used to to generate SQL prompts? Well, let's give it a try. Let's see what could happen with this pretty straightforward prompt. The SQL query that was generated looks pretty good. It seems to select the customer name from the CUSTOMERS table, sort it by the created date, and show just the top five. That looks just like what we asked for. Let's try to run it in our Snowflake account. Uh-oh. The query didn't work because the CUSTOMERS table does not exist. The problem is that the other coding assistant is not context aware. It had no idea what exists within our Snowflake environment. And oftentimes when LLMs don't have an answer, they just make something up. The table and column names in this SQL query look plausible. But they are wrong. The other coding assistant just invented plausible sounding names for them. But maybe this isn't too much of a problem. We can just fix the table name and try again. Well that's strange. This is definitely the correct table name. Turns out there is another problem. Our current role is not authorized to view the CUSTOMER table. Once again, the other coding assistant had no awareness of the Snowflake environment so it did not know what we do and do not have permission to access. And this is only the beginning of the issues. If we look at the columns of the CUSTOMER table, these column names are wrong. Also the date that the customer joined is not stored in a simple date column. It is in a variant column holding JSON data. Not only was the other coding assistant unaware of this, it probably does not know how to access semi-structured data in a variant column. It might know SQL, but it does not know the extended SQL syntax that is only available to Snowflake. At this point, it's becoming pretty clear that our other coding assistant is not capable of this task. Let's try using Snowflake CoCo instead. We'll use the same prompt and see how CoCo compares. Much better! Since Snowflake CoCo is aware of the tables in our account, it was able to generate SQL with the correct table and column names. It did not try to access tables that we do not have permissions to. And, since CoCo is specifically trained on Snowflake, it was able to use Snowflake specific syntax to access data buried within a semi-structured variant column. In addition, you may have noticed that CoCo is built directly within Snowflake. We did not have to switch tools, or configure any sort of connection. Snowflake CoCo naturally resides within your environment.

2. Let's practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.