File tree 12 files changed +68
-65
lines changed
12 files changed +68
-65
lines changed Original file line number Diff line number Diff line change 2
2
3
3
This is the Relational Migrator Lab used during Developer Days that covers using the Relational Migrator to import a PostgreSQL Database into MongoDB.
4
4
5
- You can access the online version on the Search Lab [ here] ( https://mongodb-developer.github.io/relational-migrator-lab/ )
5
+ You can access the online version on the Relational Migrator Lab [ here] ( https://mongodb-developer.github.io/relational-migrator-lab/ )
6
6
7
7
## Contributing
8
8
Original file line number Diff line number Diff line change @@ -3,12 +3,12 @@ import Screenshot from "@site/src/components/Screenshot";
3
3
# Edit mapping to authors collection (author_alias)
4
4
5
5
6
- - On the ERD, click authors
7
- - On the relational mappings list on the right, click on the edit icon of author_alias
8
- - Rename Field name to alias
9
- - In the list of fields, uncheck authorId
10
- - Check create array of primitive values
11
- - Click Save and close
6
+ - On the ERD, click ` authors `
7
+ - On the relational mappings list on the right, click on the edit icon of ` author_alias `
8
+ - Rename Field name to ` alias `
9
+ - In the list of fields, uncheck ` authorId `
10
+ - Check ` create array of primitive values `
11
+ - Click ` Save and close `
12
12
13
13
<Screenshot url = " https://www.mongodb.com/products/tools/relational-migrator" src = " img/110-image-001.png" alt = " Screenshot of the connect modal" />
14
14
Original file line number Diff line number Diff line change @@ -3,12 +3,12 @@ import Screenshot from "@site/src/components/Screenshot";
3
3
# Edit mapping to authors collection (author_book)
4
4
5
5
6
- - On the ERD, click authors
7
- - On the relational mappings list on the right, click on the edit icon of author_book
8
- - Rename Field name to alias
9
- - In the list of fields, uncheck authorId
10
- - Check create array of primitive values
11
- - Click Save and close
6
+ - On the ERD, click ` authors `
7
+ - On the relational mappings list on the right, click on the edit icon of ` author_book `
8
+ - Rename Field name to ` alias `
9
+ - In the list of fields, uncheck ` authorId `
10
+ - Check ` create array of primitive values `
11
+ - Click ` Save and close `
12
12
13
13
14
14
<Screenshot url = " https://www.mongodb.com/products/tools/relational-migrator" src = " img/120-image-001.png" alt = " Screenshot of the connect modal" />
Original file line number Diff line number Diff line change @@ -2,15 +2,15 @@ import Screenshot from "@site/src/components/Screenshot";
2
2
3
3
# Edit mapping to books collection (authors)
4
4
5
- - On the ERD, click books
6
- - On the relational mappings list on the right, click +Add
7
- - Select Embedded documents
8
- - Select authors as Source table
9
- - Check Merge fields into the parent
10
- - Rename id field to _ id
11
- - Check name field and uncheck the rest
12
- - Click Save and close
13
- - We have embedded authors in the authorBooks field
5
+ - On the ERD, click ` books `
6
+ - On the relational mappings list on the right, click ` +Add `
7
+ - Select ` Embedded documents `
8
+ - Select ` authors ` as Source table
9
+ - Check ` Merge fields into the parent `
10
+ - Rename ` id ` field to ` _id `
11
+ - Check ` name ` field and uncheck the rest
12
+ - Click ` Save and close `
13
+ - We have embedded ` authors ` in the ` authorBooks ` field
14
14
15
15
16
16
<Screenshot url = " https://www.mongodb.com/products/tools/relational-migrator" src = " img/130-image-001.png" alt = " Screenshot of the connect modal" />
Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ import Screenshot from "@site/src/components/Screenshot";
3
3
# Edit mapping to books collection (book_attribute)
4
4
5
5
6
- - On the ERD, click books
7
- - On the relational mappings list on the right, click on the edit icon of book_attribute
8
- - Rename Field name to attributes
9
- - Uncheck bookId
10
- - Click Save and close
6
+ - On the ERD, click ` books `
7
+ - On the relational mappings list on the right, click on the edit icon of ` book_attribute `
8
+ - Rename ` Field name ` to ` attributes `
9
+ - Uncheck ` bookId `
10
+ - Click ` Save and close `
11
11
12
12
13
13
<Screenshot url = " https://www.mongodb.com/products/tools/relational-migrator" src = " img/150-image-001.png" alt = " Screenshot of the connect modal" />
Original file line number Diff line number Diff line change @@ -3,12 +3,12 @@ import Screenshot from "@site/src/components/Screenshot";
3
3
# Edit mapping to books collection (book_genre)
4
4
5
5
6
- - On the ERD, click books
7
- - On the relational mappings list on the right, click on the edit icon of book_genre
8
- - Rename Field name to genres
9
- - Check create array of primitive values
10
- - Uncheck bookId
11
- - Click Save and close
6
+ - On the ERD, click ` books `
7
+ - On the relational mappings list on the right, click on the edit icon of ` book_genre `
8
+ - Rename ` Field name ` to ` genres `
9
+ - Check ` create array of primitive values `
10
+ - Uncheck ` bookId `
11
+ - Click ` Save and close `
12
12
13
13
14
14
Original file line number Diff line number Diff line change @@ -4,14 +4,14 @@ import Screenshot from "@site/src/components/Screenshot";
4
4
5
5
6
6
7
- - On the ERD, click issueDetails
8
- - On the relational mappings list on the right, click +Add
9
- - Select Embedded documents
10
- - Select books as Source table
11
- - Rename id field to _ id
12
- - Check title field and uncheck the rest
13
- - Click Save and close
14
- - We have embedded a book document in the book field
7
+ - On the ERD, click ` issueDetails `
8
+ - On the relational mappings list on the right, click ` +Add `
9
+ - Select ` Embedded documents `
10
+ - Select ` books ` as Source table
11
+ - Rename ` id ` field to ` _id `
12
+ - Check ` title ` field and uncheck the rest
13
+ - Click ` Save and close `
14
+ - We have embedded a book document in the ` book ` field
15
15
16
16
<Screenshot url = " https://www.mongodb.com/products/tools/relational-migrator" src = " img/170-image-001.png" alt = " Screenshot of the connect modal" />
17
17
Original file line number Diff line number Diff line change @@ -4,13 +4,13 @@ import Screenshot from "@site/src/components/Screenshot";
4
4
5
5
6
6
7
- - On the ERD, click issueDetails
8
- - On the relational mappings list on the right, click +Add
9
- - Select Embedded documents
10
- - Select users as Source table
11
- - Rename id field to _ id
12
- - Check name field and uncheck the rest
13
- - Click Save and close
7
+ - On the ERD, click ` issueDetails `
8
+ - On the relational mappings list on the right, click ` +Add `
9
+ - Select ` Embedded documents `
10
+ - Select ` users ` as Source table
11
+ - Rename ` id ` field to ` _id `
12
+ - Check ` name ` field and uncheck the rest
13
+ - Click ` Save and close `
14
14
- We have embedded a user document in the user field
15
15
16
16
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ import Screenshot from "@site/src/components/Screenshot";
5
5
6
6
7
7
8
- - On the ERD, click books
9
- - On the relational mappings list on the right, click on the edit icon of issue_details
10
- - Check all fields except bookId and userId
11
- - Click Save and close
8
+ - On the ERD, click ` books `
9
+ - On the relational mappings list on the right, click on the edit icon of ` issue_details `
10
+ - Check all fields except ` bookId ` and ` userId `
11
+ - Click ` Save and close `
12
12
13
13
14
14
Original file line number Diff line number Diff line change @@ -2,14 +2,14 @@ import Screenshot from "@site/src/components/Screenshot";
2
2
3
3
# Edit mapping to reviews collection (users)
4
4
5
- - On the ERD, click reviews
6
- - On the relational mappings list on the right, click +Add
7
- - Select Embedded documents
8
- - Select users as Source table
9
- - Check Merge fields into the parent with root as the Prefix
10
- - Rename id field to _ id
11
- - Only check name field
12
- - Click Save and close
5
+ - On the ERD, click ` reviews `
6
+ - On the relational mappings list on the right, click ` +Add `
7
+ - Select ` Embedded documents `
8
+ - Select ` users ` as Source table
9
+ - Check ` Merge fields into the parent with root as the Prefix `
10
+ - Rename ` id ` field to ` _id `
11
+ - Only check ` name ` field
12
+ - Click ` Save and close `
13
13
- We have embedded a user document at the root level
14
14
15
15
Original file line number Diff line number Diff line change @@ -3,15 +3,18 @@ import Screenshot from "@site/src/components/Screenshot";
3
3
# Migration
4
4
5
5
- At the top, switch to Data Migration tab
6
- - Click create sync job
7
- - Add source DB connection details
8
- - Add MongoDB connection details
9
- - Run Start
10
6
11
7
<Screenshot url = " https://www.mongodb.com/products/tools/relational-migrator" src = " img/210-image-001.png" alt = " Screenshot of the connect modal" />
12
8
9
+ - Click create sync job
10
+ - Add source DB connection details
11
+
13
12
<Screenshot url = " https://www.mongodb.com/products/tools/relational-migrator" src = " img/210-image-002.png" alt = " Screenshot of the connect modal" />
14
13
14
+ - Add MongoDB connection details
15
+
15
16
<Screenshot url = " https://www.mongodb.com/products/tools/relational-migrator" src = " img/210-image-003.png" alt = " Screenshot of the connect modal" />
16
17
18
+ - Run Start
19
+
17
20
<Screenshot url = " https://www.mongodb.com/products/tools/relational-migrator" src = " img/210-image-004.png" alt = " Screenshot of the connect modal" />
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import Screenshot from "@site/src/components/Screenshot";
4
4
5
5
6
6
- On the top left, click settings icon
7
- - Select single inherited primary key. This detects the primary key from the relational schema and sets them as the _ id in MongoDB
7
+ - Select single inherited primary key. This detects the primary key from the relational schema and sets them as the ` _id ` in MongoDB
8
8
- Optionally, toggle Suggested Mappings on and off.
9
9
10
10
You can’t perform that action at this time.
0 commit comments