Docs Menu
Docs Home
/
Relational Migrator
/

Create Mapping Rules

On this page

  • Steps
  • Learn More

You can create mapping rules to translate your relational tables into MongoDB collections. You can create mapping rules from either the Relational or MongoDB headers of the schema model pane.

Complete the following steps to create a mapping rule.

1
2

You can do this from the Schema model pane by clicking on a collection under the Relational or MongoDB headers.

3

If you opened this pane from the Relational header, this button is next to Mappings to MongoDB Model. If you opened the pane from the MongoDB header, this button is next to Mappings from relational tables.

4

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:

  • New Documents

  • Embedded Array

  • Embedded Documents

5

If you opened this pane from the Relational header, input the name of the target collection. If you opened the pane from the MongoDB header, select the name of the source table from the drop-down menu.

6

When you define 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 migration job by clicking the icon next to the field name.

7
  1. Click the icon next to the field you want to customize.

  2. Select a BSON type.

  3. 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 more details on field customization and data type conversions, see field customizations.

8

To learn more about managing mapping rules, see:

Back

Schema Mapping

On this page