Export to JSON from MySQL All Ready for MongoDB (opens in new tab)
This post walks through how to export data from MySQL® into JSON format, ready to ingest into MongoDB®. Starting from MySQL 5.7+, there is native support for JSON. MySQL provides functions that actually create JSON values, so I will be using these functions in this article to export to JSON from MySQL: JSON_OBJECT JSON_ARRAY These functions make it easy to convert MySQL data to JSON e.g. Copy Copied! mysql> SELECT json_object('employee_id', emp_no, 'first_name', first_name ) AS 'JSON' FROM em...
Read the original article