Reputation: 1505
I need to un-nest a large array stored as part of a JSON document.
In Oracle and MYSQL I can use JSON_TABLE for this
In SQL Server I can use OPENJSON
In Postgres I can use JSON(B)_array_elements
But I'm hitting a wall in MariaDB....
I've scoured the documentation and can't see how do to do.. I might need to un-nest several thousand rows, and all of the aforementioned database have been able to complete the un-nesting in a scaleable and performant manner....
Here's a very simplified subset of the data
{ "data": {
"EMPLOYEES": [
[100, "Steven", "King", "SKING", "515.123.4567", "2003-06-17T00:00:00", "AD_PRES", 24000, null, null, 90 ],
[101, "Neena", "Kochhar", "NKOCHHAR", "515.123.4568", "2005-09-21T00:00:00", "AD_VP", 17000, null, 100, 90 ]
],
"DEPARTMENTS": [
[10, "Administration", 200, 1700],
[20, "Marketing", 201, 1800]
]
}
}
Upvotes: 2
Views: 969