Need a small script in python that copies data from a csv file to mysql database
Project detail
Need a small script in python that copies data from a csv file to mysql database. And it should be able to do the following.
• If duplicate is found in-terms of productid and price, it should do nothing else insert.
• Because the columns in the csv will be moving around it should not be inserted by row index, rather by column name of the csv. Will provide a match pair of column name in csv to mysql table column name.
• If possible, make the insert process fast by dumping multiple rows at once. I should be able to set batch size.
Question, comments or suggestions are welcomed.