8000 GitHub - realproger/DS_Babel: Translate from one format to another. Work with two popular formats: SQL and CSV.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Translate from one format to another. Work with two popular formats: SQL and CSV.

Notifications You must be signed in to change notification settings

realproger/DS_Babel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Part I SQL to CSV.

We will start with the SQL format to CSV

Your function will receives a connection (an sqlite3 object from import sqlite3 which will be already connected), table_name. Your function will transform the content of table_name to CSV format and return it. (Columns separated by comma and rows separated by \n)_


Part II CSV to SQL

Your function will transform the content to SQL format by creating the table_name and adding each row._


Part III

a) You will use your function to convert the list of all volcanos from CSV to SQL.

b) You will use your function to convert the list of all fault lines from SQL to CSV. Data are inside the table named: fault_lines.


Technical Specifications

1# sql_to_csv will receive two strings as parameters and return a string. the database is a filename where sql_to_csv will fetch the information. table_name is the table from the database file to fetch the information. your return value will be a CSV formatted string: "ColA,ColB,ColC\n1,2,3\n4,5,6\n"

2# csv_to_sql will receive three strings as parameters and return nothing. csv_content is a StringIO following the CSV format. the database is a filename where csv_to_sql will push the information. table_name is the table from the database file to insert the data.

About

Translate from one format to another. Work with two popular formats: SQL and CSV.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0