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?


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

  • It doesn't seem to behave well with line breaks, encoding and escaping the commas. Any other way that I could dump this data in a consumable format?
    – jpmonette
    Jan 26 '16 at 16:27
  • @jpmonette As far as I know there is no common agreed format for linebreaks in CSV. You might want to search for a tool that supports JDBC and exports to CSV. Jan 28 '16 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.