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
License
Public DomainFollow fw2csv
Other Useful Business Software
InEight is a leader in construction project controls software
Minimize risks, gain operational efficiency, control project costs, and make confident, informed decisions. InEight software has your back during every stage of construction, from accurate pre-planning to predictable execution and completion. When project teams collaborate effectively, every decision is backed by precise, authoritative insights.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of fw2csv!