[僅限PaaS]{class="badge informative" title="僅適用於雲端專案(Adobe管理的PaaS基礎結構)和內部部署專案的Adobe Commerce 。"}

MongoDB資料模式

當Adobe Commerce Intelligence提取MongoDB資料時,該資料會轉換為關聯式模型。

壞消息:雖然大部分的資料模式不會造成問題,但有一些是Commerce Intelligence不支援的,因為轉換為關聯模型。

好消息:可以避免所有這些模式。

子巢狀陣列 subnested

如果您的集合如下列範例所示,Commerce Intelligence只會複製專案陣列中的資料。 不會提取子專案陣列中的資料。

    {
        _id: 0000000000000001
        items: [
            {
                _id: 0000000000000002
               subItems: [
                   {
                       _id: 0000000000000003
                      name: "Donut"
                      description: "glazed"
                   }
               ]
            }
        ]
    }

變數物件索引鍵 varobjectkeys

包含具有變數物件金鑰之物件的集合不會在Commerce Intelligence中復寫。 例如:

    {
        _id: 0000000000000001
        friends: {
            0000000000000002: "Jimmy",
            0000000000000004: "Roger",
            0000000000000005: "Susan"
        },
    }

這通常發生在使用物件且陣列更合適的地方。 現在,請重製上述範例:

    {
        _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