Showing posts with label sql to csv. Show all posts
Showing posts with label sql to csv. Show all posts

Tuesday, 30 August 2016

sql2csv converter python

This script converts .sql files to .csv files so they’re easily readable . It also has the ability to simply list tables from .sql file and can also list columns from the specified table .  so without further ado lets see some screenshots of the script in action .

  • TL;DR

We’ll change this

 sql2csv_python_virkid_5

into this

sql2csv_python_virkid_4

Cool eh ?

  • Screenshots

 

sql2csv_python_virkid

obligatory help screen

sql2csv_python_virkid_1

listing tables of the database

sql2csv_python_virkid_2

listing columns of the specified table  (courses in this case)

sql2csv_python_virkid_6

Dumped records from the the specified table

 

u should now have a file called Db_table.csv like

sql2csv_python_virkid_3

and it can be opened using any CSV file viewer .

  • Code