MongoDB Data Modeling
When Adobe Commerce Intelligence pulls in MongoDB data, that data is translated into a relational model.
The bad news: While most data patterns do not pose an issue, there are a few that are not supported by Commerce Intelligence, because of the translation to a relational model.
The good news: All these patterns can be avoided.
Subnested Arrays subnested
If your collection looks like the example below, Commerce Intelligence only replicates the data in the items array. Data from the subitems array are not pulled.
{
_id: 0000000000000001
items: [
{
_id: 0000000000000002
subItems: [
{
_id: 0000000000000003
name: "Donut"
description: "glazed"
}
]
}
]
}
Variable Object Keys varobjectkeys
Collections that include objects with variable object keys are not replicated in Commerce Intelligence. For example:
{
_id: 0000000000000001
friends: {
0000000000000002: "Jimmy",
0000000000000004: "Roger",
0000000000000005: "Susan"
},
}
This usually occurs where an object is being used and an array would be more appropriate. Now, rework the above example:
{
_id: 0000000000000001
friends: [
{ friend_id: 0000000000000002, name: "Jimmy" },
{ friend_id: 0000000000000004, name: "Roger" },
{ friend_id: 0000000000000005, name: "Susan"}
]
}
recommendation-more-help
e1f8a7e8-8cc7-4c99-9697-b1daa1d66dbc