Skip to content

Commit afdcf02

Browse files
committed
Austin Feedback fixes
1 parent d52799d commit afdcf02

23 files changed

+67
-23
lines changed

docs/10-intro.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import TabItem from '@theme/TabItem';
1414
||- Map the relational schema to a MongoDB schema|
1515
||- Migrate the data to MongoDB|
1616
|Prerequisites| See [Prerequisites](/docs/category/-prerequisites/)|
17-
|Time to complete|1 hour|
17+
|Time to complete|1.5 hour|
1818

1919
These labs are meant to be presented by one of our amazing instructors, but you can also do them on your own.
2020

docs/210-Generate code/10-generate-app-code.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ import Screenshot from "@site/src/components/Screenshot";
55
The Relational Migrator allows you to generate application code in a variety of languages, derived from your MongoDB schema definition.
66
While this code is not a full-blown app, it can save developers significant time compared to creating entity classes by hand.
77

8+
## Generate model classes for your collections
9+
810
- At the top, switch to Code Generation tab
911
- Under Language, select `C#` (or your preferred language)
1012
- Under Template, select `Persistence Layer`
1113
- Click each of the collections in the list. Notice the tabs containing entity classes and CRUD helpers for each collection or embedded object.
14+
15+
## Generate JSON Schema files
16+
1217
- Under Language, select `JSON'
1318
- Under Template, select `Sample Documents`. Notice how you can view examples of how data in each collection will be structured.
1419
- Under Template, select `JSON Schema (MongoDB)`. Notice how you can view and download JSON [Schema validators](https://mongodb-developer.github.io/intro-lab/docs/category/schema-validation) which could be used to enforce schema compliance.

docs/210-Generate code/20-convert-queries.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ in your choice of programming langauge. This feature uses Artifical Intelligence
1010
- Sign into your MongoDB Atlas account
1111
- Accept the Query Converter licence terms
1212
- Click `Paste SQL query`
13-
- In the empty query, type `SELECT * FROM books WHERE "bookOfTheMonth" = true AND pages > 500`
13+
- In the empty query, type
14+
```sql
15+
SELECT * FROM library.books WHERE "bookOfTheMonth" = true AND pages > 500
16+
```
1417
- Leave the language as JavaScript and click Convert.
1518

1619
After a while, the equivalent MongoDB query will be shown at the right of the page.

docs/220-Migrate Data/10-migration.mdx

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,46 @@ import Screenshot from "@site/src/components/Screenshot";
22

33
# 👐 Run a Snapshot Migration Job
44

5-
- At the top, switch to Data Migration tab
5+
## Data migration tab
66

7-
<Screenshot url="http://127.0.0.1:8278" src="img/210-image-001.png" alt="Screenshot of the connect modal" />
7+
- At the top, switch to Data Migration tab.
88

9-
- Click create sync job
10-
- Specify source DB connection details
11-
- The details will be populated from when you created the project.
9+
<Screenshot url="http://127.0.0.1:8278" src="img/210-image-001.png" alt="Screenshot of the migration screen" />
10+
11+
- Click `Create migration job`.
12+
13+
## Source database (PostgreSQL) connection details
14+
15+
- By default your current connection details are shown under `Use a saved connection` or you can enter the connection details manually.
16+
- `Test connection`.
17+
- Click on `Connect`.
1218

1319
<Screenshot url="http://127.0.0.1:8278" src="img/210-image-002.png" alt="Screenshot of the connect modal" />
1420

21+
## Target database (MongoDB) connection details
22+
1523
- Specify MongoDB connection details
16-
- Enter the URI, database, username and password for your MongoDB cluster
17-
- If you are using Atlas, you can retrieve the details from the [Atlas portal](https://cloud.mongodb.com)
24+
- Enter the URI, database, username and password for your MongoDB cluster.
25+
- If you are using Atlas, you can retrieve the details from the [Atlas portal](https://cloud.mongodb.com).
26+
- `Test connection`.
27+
- Click on `Connect`.
28+
1829

1930
<Screenshot url="http://127.0.0.1:8278" src="img/210-image-003.png" alt="Screenshot of the connect modal" />
2031

21-
- Specify migration options
22-
- Choose the `Drop destination collections before migration` option
32+
## Specify migration options
33+
34+
- We will select `Snapshot` as our migration type.
35+
- Choose the `Drop destination collections before migration` option.
36+
- Click on `Review summary`.
2337

2438
<Screenshot url="http://127.0.0.1:8278" src="img/210-image-004.png" alt="Screenshot of the connect modal" />
2539

40+
41+
## Start the migration
42+
2643
- Read migration summary to confirm details
27-
- Run Start
44+
- Click `Start`
2845
- Monitor the progress of the job
2946

3047
<Screenshot url="http://127.0.0.1:8278" src="img/210-image-005.png" alt="Screenshot of the connect modal" />

docs/220-Migrate Data/20-view-migrated-data.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Screenshot from "@site/src/components/Screenshot";
22

33
# 👐 View Migrated Data
44

5-
Once the job has finished, you can view it in MongoDB. You can perform this task using the `mongosh` command line tool,
5+
Once the job has finished, you can view your data in MongoDB. You can perform this task using the `mongosh` command line tool,
66
MongoDB Compass, or MongoDB Atlas. This topic assumes you have migrated your data to MongoDB Atlas.
77

88
- In a web browser, navigate to the [MongoDB Atlas portal](https://cloud.mongodb.com) and sign in with your account

docs/50-create-project/50-create-new-project.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Ensure the Relational Migrator is installed and running (usually at http://127.0
1212
<Screenshot url="http://127.0.0.1:8278" src="img/50-image-001.png" alt="Screenshot of the connect modal" />
1313

1414
## Select one of the three options
15-
- 👐 Click **Connect database** under "Connect to live database" if you are running the source database in the cloud, Docker or using your own hardware.
15+
- 👐 Click **Connect database** under "Connect to live database" if you are running the source database in the cloud, Docker or using your own hardware. This is what we will use during an instructor-led hands-on lab.
1616
- 🦸‍♂️ Click **Import .SQL file** under "Load schema from a file" if you don't have access to a source database and just want to work with the schema (you won't have any data to import though).
1717
- 🦸‍♂️ Click **Create sample** under "Use a sample schema" to play around with a test schema, without any data. This does not require connecting to a real DB. We won't use this one in this Lab.
1818

docs/50-create-project/60-connect-database.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Enter the details for the PostgreSQL database you will be migrating from.
1818

1919
- It's important to click on the `SSL` tab and activate SSL (SSL mode Prefer is fine), otherwise we won't be able to connect to cloud hosted databases.
2020
- If your instructors have configured a server for you to use, ask them for the host name, username and password.
21-
- Database name should be "library"
21+
- Click back on the `General` tab and enter the database name as `library`.
2222
- Click `Test Connection` to ensure your details are correct.
2323
- Click `Connect` to proceed to the next step.
2424
- You can give your connection a name and a tag to make it simpler to remember later

docs/60-project-settings.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import Screenshot from "@site/src/components/Screenshot";
33
# 👐 Project Settings
44

55

6-
- On the top left, click the settings icon.
6+
- On the top left, next to the three dots, click the settings ⚙️ icon.
77
- Select single inherited primary key. This detects the primary key from the relational schema and sets them as the `_id` in MongoDB.
8-
- Optionally, toggle Suggested Mappings on and off.
8+
- Optionally, toggle Suggested Mappings on and off.
99

1010

1111
:::info
12-
If we don't do this we'll have both an autogenerated `_id` field of type `ObjectId` and a `id` field copied from the relational DB.
12+
If we don't do this we'll have both an autogenerated `_id` field of type `ObjectId` and a `id` field copied from the relational DB. Inheriting the id we copy the existing ids over to MongoDB from our relational DB.
1313
:::
1414

1515
<Screenshot url="http://127.0.0.1:8278" src="img/90-image-001.png" alt="Screenshot of the connect modal" />

docs/70-toggle-view.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ At the bottom left, toggle between different views. We should be looking at the
66

77
<Screenshot url="http://127.0.0.1:8278" src="img/100-image-000.png" alt="We can toggle between MDB, relational or both views" />
88

9-
<Screenshot url="http://127.0.0.1:8278" src="img/100-image-001.png" alt="Screenshot of the connect modal" />
10-
9+
[![Screenshot of the MongoDB ERD](/img/100-image-001.png)](/img/100-image-001.png)
10+
_Click to enlarge in a new tab / window_

docs/80-edit-mapping-rules/20-edit-mapping-books-book-genre.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ genres: [
3434
- Click on the edit icon of the `book_genre` embedded array.
3535
- Change the field name from `bookGenres` to `genres`.
3636
- Uncheck `bookId` and `genreId`.
37-
- Change the fieldname from `genre` to `name`
3837
- Click `Save and close`.
3938

4039

0 commit comments

Comments
 (0)