Forum Kurallarını Okumak İçin Lütfen Tıklayınız .

Converting Sql To Json/Csv Questions 

Questions Converting Sql To Json/Csv
Joined
Nov 26, 2023
Messages
1
Reaction score
0
#CR
3
Has anyone found a reliable software or script to do bulk conversion of different SQL dump formats to JSON or CSV? So MySQL, MS SQL, etc. Pythons ast.literal_eval function can work quite well sometimes after small changes to the SQL file but still very often has trouble with complicated fields.
 
I don't understand how ast.literal_eval is related?

please share if you found a solution.
if you already load the DB and can query it, I think it should be simple to query the data and save it as JSON.
Also, SQL columns must have predefined data types so you can prepare the JSON conversion pretty easily.
you can make a script that:
1. query the database information (tables)
2. for each table:
2a. query the table information
2b. query select * from table
2c. using the column data types from 2a, build your JSON and save it
 

Users who are viewing this thread

Home Register
Top Bottom