Create a script which can generate CSV from a database table

Registered by Lucas Jones

This should be relatively easy - just use the parameter framework in place, and use csv.writer() and db.execute2() to put out a CSV file.

The script should be named "sql2csv". It should take similar parameters to the standard "csv2sql" tool, and the user should be allowed to specify various database options, including username, password, etc. The database and table names should be required.

The script should copy the column header from the table, then proceed to take the data from the database. It should ensure that the data is properly escaped (according to the CSV standard -- this may be provided by the Python csv module).

This could probably be based on a modified version of "csv2sql".

Blueprint information

Status:
Complete
Approver:
Lucas Jones
Priority:
Medium
Drafter:
Lucas Jones
Direction:
Approved
Assignee:
Lucas Jones
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Lucas Jones
Completed by
Lucas Jones

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.