Mapping Rule Options
On this page
Mapping rule options are important options that help define the state of your MongoDB collection after a migration.
These options are defined when creating or editing a mapping rule.
Mapping Rule Concepts
Every mapping rule joins a source table to a destination collection. You can create mapping rules from either a table or a collection. When creating a mapping rule you must select the other entity. For example:
If you select a table and choose to create a mapping rule you must choose the destination collection.
If you select a collection and choose to create a mapping rule, you must select the source table.
For Embedded array and Embedded document mapping rules, you must also configure where you want the embedded data inserted into your document.
The table below provides a summary of the concepts associated with mapping rule options and the mapping rules they apply to.
Concept | Description | Applies To |
---|---|---|
Collection Name | The destination collection where the relational rows of data are migrated. | New documents |
Parent collection | The destination collection where the relational rows of data are migrated. | Embedded documents Embedded array |
Prefix | A drop-down where you can specify your rule hierarchy. | Embedded documents Embedded array |
Field name | Indicates the field containing the array or document. | Embedded documents Embedded array |
Create an array of primitive values | Creates a single field array in the parent collection. | Embedded array |
Merge fields into the parent | Merges the table rows as fields at the parent collection level. | Embedded documents |
Explicitly include rows where an expression returns true. | New documents Embedded documents Embedded array | |
Array conditions | Sort, limit, and order an embedded array. | Embedded array |
Note
Relational Migratory primary key id field migration is defined at the project level.
For details on how these project setting affect your migration, see Key Handling Options.
Get Started
Details
To conceptualize the examples of each mapping rule, the following
Mongo Enterprise
relational schema is used to help explain each
mapping rule option.