Skip to main content

Creating a CSV from SQL statements with GitHub Copilot

· One min read

During one of my test I had to create some CSV files, and needed some data. I could have used Copilot directly to generate random data, but I wanted to test something else.

In my SpringBoot PetClinic application, I have a SQL file that contains some data, and I wanted to use this data to create a CSV file, directly from the insert statements without any code.

The Copilot then effortlessly executed the specified tasks, as demonstrated in the accompanying video:

Note, I could have also use Copilot to do it directly from the database, but just wanted to see if Copilot could extract the data from the SQL file, and it did it!..