Fixed width data files are probably the most annoying data to import into database.
This utility allows user to insert user-defined column separators into user-defided positions of flat file table given in fixed-width format.
I am using this utility to import astronomical catalogs provided as flat tables at CDS ftp-server into postgresql;

Build:
$ make all [cc={icc|gcc}]

Install:
$ make install [prefix=/path/to/your/bin/directory]

Example of usage:
$ gzip -dc table.dat.gz | fw2csv --stops=4,10,11,20,30,36 -d '|' -header 1 | psql wsdb -c "copy mytable from stdin with csv delimiter '|'"

For the list of available options call
$ fw2csv --help

Project Activity

See All Activity >

License

Public Domain

Follow fw2csv

fw2csv Web Site

Other Useful Business Software

Compare Cell Phone Plans at Wirefly Compare Cell Phone Plans at Wirefly Icon
Compare Cell Phone Plans at Wirefly Icon

You’re probably paying too much for cell phone service. Wirefly compares hundreds of plans to help you save.

You’re probably paying too much for cell phone service. Wirefly compares hundreds of plans to help you save. Enter what you need (minutes, data, texts) into Wirefly’s innovative plan comparison tools and see your savings instantly.

Rate This Project

Login To Rate This Project

User Reviews

Be the first to post a review of fw2csv!

Additional Project Details

User Interface

Console/Terminal, Command-line

Programming Language

C

Registered

2012-08-24