In MariaDB, JSON_OBJECTAGG() is a built-in function that returns a JSON object containing key-value pairs, based on its two arguments.
json
MariaDB JSON_ARRAY_APPEND() Explained
In MariaDB, JSON_ARRAY_APPEND() is a built-in function that appends values to the end of the specified array/s within a JSON document, and returns the result.
MariaDB JSON_OBJECT() Explained
In MariaDB, JSON_OBJECT() is a built-in function that returns a JSON object containing the key/value pairs provided as arguments.
MariaDB JSON_ARRAYAGG() Explained
In MariaDB, JSON_ARRAYAGG() is a built-in function that returns a JSON array containing an element for each value in a given set of JSON or SQL values.
The function acts on a column or an expression that evaluates to a single value. It enables you to aggregate a result set as a single JSON array. Each row of the result set ends up as a single element in the array.
MariaDB JSON_ARRAY() Explained
In MariaDB, JSON_ARRAY() is a built-in function that returns a JSON array containing the specified values, provided as arguments.
MariaDB JSON_TABLE() Explained
In MariaDB, JSON_TABLE() is a built-in function that converts JSON data into a relational form.
In other words, it lets you return a JSON document as a table.
The JSON_TABLE() function was introduced in MariaDB 10.6.0.
How to Reference JSON Keys that Contain Special Characters when using OPENJSON, JSON_QUERY, and JSON_VALUE (SQL Server)
If you’re using a T-SQL function such as OPENJSON(), JSON_QUERY(), or JSON_VALUE(), you might be wary of any non-alphanumeric characters that might be in the JSON document that you’re working with. Especially if those special characters are in the key names, and you need to reference those key names.
Import Documents into MongoDB from an Array of JSON Documents
When using mongoimport, you can use the --jsonArray parameter to import an array of JSON documents.
How to Merge Documents when Importing a File into MongoDB
When you use mongoimport to import files into MongoDB, you have the option of merging existing documents with the ones that you’re importing.
In this case, if an imported document has the same _id value as an existing one in the collection that you’re importing into, the existing document will be merged with the one being imported.
You can also specify another field (other than the _id field) to be the matching field if required.
How to Replace Existing Documents when Importing a File into MongoDB
When you use mongoimport to import files into MongoDB, you have the option of replacing existing documents that match the ones you’re importing.
By this I mean, if an imported document has the same _id value as an existing one in the collection you’re importing into, the existing document will be replaced with the one being imported.
You can also specify another field (other than the _id field) to be the matching field if required.
The way to replace existing documents when using mongoimport is to use upsert mode.