I'd like to import a json file containing an array of jsons into a mysql table.
Using the LOAD DATA LOCAL INFILE '/var/lib/mysql-files/big_json.json' INTO TABLE test(json);
give the error messageInvalid JSON text: "Invalid value." at position 1 in value for column
My json looks like the following:
[
{
"id": "6defd952",
"title": "foo"
},
{
"id": "98ee3d8b",
"title": "bar"
}
]
How can I parameterize the load command to iterate through the array?