GitHub Copilot is definitely helping me speed up software development and system admin support. Using VS Code, I can now use chatbot (as I call it) to get terminal window help.

For example, I need to move a set of device location data from a production server to a development server. How do I dump the data from the existing database (sqlite3) to CSV for import at the new database.

Ask chatbot and you quickly get a basic CLI script to get the job done. It even warns about the lack of headers then tells you how to get the headers from the sqlite3 database as well.

# connect to the DB file
sqlite3 db.sqlite3.20231114

# describe table to an output file
sqlite> .output device_bucketdevice_fields.txt
sqlite> PRAGMA table_info(device_bucketdevice);

# export the desired data as csv (no headers)
sqlite> .mode csv
sqlite> .output device_bucketdevice.csv
sqlite> SELECT * FROM device_bucketdevice;

Voila, you now have your data in files.