Python read validate and import CSV JSON file to MySQL

preview_player
Показать описание
Code and details:

Python read and import CSV or JSON file to MYSQL:

In this video:
Python with Pandas and MySQL
- read CSV file with pandas
- Connect to MySQL DB with sqlalchemy
- create new MySQL table from the CSV data
Read, parse and load JSON file into MySQL table
- Read and parse JSON with module json
- validate data
- Connect and insert to MySQL with PyMySQL

---------------------------------------------------------------------------------------------------------------------------------------------------------------
If you really find this channel useful and enjoy the content, you're welcome to support me and this channel with a small donation via PayPal and Bitcoin.

Bitcoin: 1DBZu6N9JTpRDdc9QChLZnX3v2iVRaQ4ym
Рекомендации по теме
Комментарии
Автор

I spent over 18 hours so far in this project, and I finally got it to work right.

davidrivard
Автор

What happens to the database if it gets a new json dictionary with new values, can you archive the old one?

davidbeiler
Автор

Some things I want to say are, something you should do if you're getting a decode error or something is add lowercase r before quotation marks that contane file directory, and theres some other stuff that you'll figure out. if you want me to upload the script to github I'll gladly do so, I also did .txt format script. ps- you also have to install a lot of libraries even ones you won't import.

davidrivard
Автор

can i read text file and send, insert (or any term you use) it to mysql?
or read from terminal then send it to mysql?
and how?

abdallah.alammar
Автор

can you share this things for importing CSV files in mysql from a directory by using python while using load infile command ?

s.m.ehsanulamin