Creating the customer and product dimensions
In this recipe, we will guide you through creating degenerate customer and product dimensions. A degenerate dimension consists of a dimension that doesn't have its own physical table, and the data lives in the fact table. In other words, the customer and product json are sub-documents within the Order
documents of the Orders MongoDB collection.
Getting ready
Before you start this recipe, you need to make sure you have the MongoDB databases created in previous chapters. Also, the Data Integration server should be running, and you will need the schema that you created in the previous recipe.
How to do it…
Proceed with the following steps:
Let's add the Customer dimension to the Orders cube:
Right-click on the Orders cube and select Add Dimension.
Expand the new dimension object, and in the default hierarchy created, remove the text for the name field. For the primaryKey field, select the customerNumber option.
Right-click on the hierarchy and select Add...