When using mongoimport, you can use the --jsonArray parameter to import an array of JSON documents.
Database Tools
How to Prettify Exported MongoDB Documents in mongoexport
When you use mongoexport to export documents in MongoDB, you have the option of “prettifying” them.
By this I mean, instead of the document being presented on one long line, it instead includes line breaks, indents, etc to make it easier to read.
To do this in mongoexport, use the --pretty parameter.
What is psql?
psql is a terminal based interface for PostgreSQL.
psql enables you to administer PostgreSQL from the command line interface (CLI) as an alternative to using a graphical user interface (GUI), such as pgAdmin, Postico, Azure Data Studio, etc.
Import CSV Data as an Array in MongoDB using mongoimport
MongoDB’s import utility – mongoimport – introduced a new parameter that allows you to import CSV data as an array.
The --useArrayIndexFields parameter interprets natural numbers in fields as array indexes when importing CSV or TSV files.
How to Delete a SQL Server Agent Job in Azure Data Studio
If you’ve installed the SQL Server Agent extension in Azure Data Studio, you will be able to see a list of SQL Server Agent jobs, as well as create, edit, view history, etc.
But you may be wondering how to delete a job.
If so, read on.
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.
Import a CSV File into MongoDB with mongoimport
When using MongoDB, you can use mongoimport to import documents into a collection. mongoimport is a command line utility that imports content from an Extended JSON, CSV, or TSV file. The import file could have been created by mongoexport or some other export utility.
This article presents examples of importing a CSV file into MongoDB.
Import a JSON File into MongoDB with mongoimport
When using MongoDB, you can use mongoimport to import documents into a collection. mongoimport is a command line utility that imports content from an Extended JSON, CSV, or TSV file. The import file could have been created by mongoexport or some other export utility.
This article presents examples of importing a JSON file into MongoDB.