Create Rules to MongoDB
On this page
Creating mapping rules is how you translate your relational tables into MongoDB collections. You can create mapping rules from either the Relational or MongoDB headers of the schema model pane.
About this Task
Options available on the Add mapping pane depend on the type of mapping rule you are adding. For a full overview of each mapping rule option see:
You can configure options for time-series collections. For details, see Time series.
You can also create mapping rules based on a destination MongoDB model. For more information, see Create Rule from Relational.
Steps
Open a project.
In the left Schema model pane, click on a collection under the MongoDB header.
This prompts the Mappings pane to open on the right of the screen.
On the Mappings pane, click + Add to create a new mapping rule.
Select the name of the source table from the drop-down.
Define the options for the new mapping rule. When defining the mapping rule, you can:
Change the collection name.
To change the collection name, click the Name text box and enter the new name. Click outside of the text box to save the change. If the name is already in use, you receive a validation error.
Change field names.
Include or exclude a field from your sync job by clicking the icon next to the field name.
Optionally, if you want to select a BSON type or set null handling rules for your mapping rule:
Click the icon next to the field you want to customize.
Select a BSON type.
Select a Null handling option.
Insert as null: preserves null values, and nulls are inserted into your destination collection.
Omit: skips any null values, and nulls are not inserted into the destination collection.
You can view a field's Original name and Original type in the expanded customized field menu.
Note
For additional details on field customization and data type conversions, see field customizations.
Click Save and close.
Learn More
To learn more about managing mapping rules, see: