DBA

Deleting Records in Nested BSON Array from MongoDB

When you are trying to manipulate data within nested BSON array in MongoDB, things get complex. Luckily, MongoDB has the ability to pass a JavaScript-like function to forEach to manipulate or query data. Let’s take a look at the data below. Sample Data { “_id”: ObjectId(“5a2f38458bcodgerce87vds”), “customerId”: “45632”, “cart”: { …

Sitecore

Sitecore PowerShell Extensions Installation Hangs on Spinning Wheel – Sitecore 8.2

Sitecore PowerShell Extensions is a powerful Sitecore development tool to manage Sitecore contents, create automation jobs and do a tons of cool stuff. It brings the PowerShell scripting capabilities to deliver Sitecore solutions faster. It also has a lot of out of box tools that doesn’t require PowerShell scripting skills. …

Data Engineering

How to Ingest Data Into MongoDB with Node.js

Now that we got data from MongoDB and loaded into Postgres with some transformation, let’s put the data back into MongoDB. This post is the continuation of the previous post about ingesting data from MongoDB. You should totally start from How to Ingest Data From MongoDB with Node.js. The aim …

Data Engineering

How to Ingest Data From MongoDB with Node.js

Data ingestion from a NoSQL database often involves the denormalisation of their schema-less data before loading into a relational database. In this post, we will try to grab the restaurant data from MongoDB, denormalise the collection into a parent and a child table, and load them into Postgres. This exercise …

Node.js

MongoDB CRUD Operation with Node.js

Once you get your head around MongoDB CRUD operations with Mongo Shell, getting Node.js to do them becomes easy. If you are still not confident with MongoDB, check out MongoDB skills essentials exercise to brush up your MongoDB skills. We will create a collection called, students. Then, we will insert …

DBA

How to Prevent Creating Duplicate Keys in MongoDB

In MongoDB, the primary key is reserved for the _id field. This is a system field and gets created by default when inserting new records. When you want to enforce the uniqueness in other fields, you can use unique index. Here is how to create unique index with Mongo Shell. …

DBA

MongoDB Skills Essential Exercise

MongoDB is probably the most prevalent NoSQL database choice for the backend of web applications. It is an open source and relatively easy to use. It works well with the modern web applications written in Node.js or Python Django. Enterprise-level web application platforms like Sitecore (works on .NET) also use …

DBA

User Management with MongoDB

MongoDB does not have authentication out of box. When you install it, the first thing you have to do is to create an admin user in the admin database and enable authentication. After installation, you can get into MongoDB with the mongo command from the Mongo Shell. mongo Let’s create …

Data Engineering

New JSON Data Ingestion Strategy by Using the Power of Postgres

Postgres always had a JSON support with somehow limited capability before the 9.2 version added the native JSON support. The release of version 9.3 has really taken the JSON feature to the next level with additional constructor and extractor methods. The capability of querying and transforming the JSON data type …