Firebird to CSV – Data Migration on OSX

csvexportfirebirdmac os x

I have a .gdb Firebird database file that I would like to partially transform to .csv. From the CLI tool, I'm able to do the following:


CONNECT "/Users/jpmonette/Desktop/file.gdb";
OUTPUT /Users/jpmonette/Desktop/output.csv;
SELECT EMAIL,FIRSTNAME FROM ACCOUNT;

This seems to be working as expected – outputting stdout to a file. However, I would like to know if there is a way to output the data in a easy to consume format (JSON? CSV? SQL dump?). I had a look at fbexport and fbcopy, but they both seem to be not available for OSX.

Any clue on how I could get around that?

Best Answer

You can concatenate output to CSV, like select email || ',' || firstname from account with column header turned off using set heading