Skip to content

Commit 112ef98

Browse files
committed
Changed URL to actual local RM URL, fixed some style typos
1 parent 94ad8e9 commit 112ef98

24 files changed

+44
-44
lines changed

docs/20-prerequisites/10-postgres.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,31 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
66

77
# 👐 PostgreSQL Database
88

9-
In this lab you will be migrating data from a PostgreSQL relational database. You have a few options to set up this database. __Choose one option for your PostgreSQL database__.
9+
In this lab you will be migrating data from a PostgreSQL relational database. You have a few options to set up this database. __Choose just one option for your PostgreSQL database__.
1010

1111
## 👐 Option 1: Use a pre-configured database
1212

1313
If you are participating in an instructor-led lab, they may have already set up this database for you. Ask your instructor for the connection URI and credentials.
1414

1515
:::info
16-
In an intructor-led lab you will use the provisioned PostgreSQL database, no need to do anything else
16+
In an intructor-led lab you will use the provisioned PostgreSQL database, no need to do anything else.
1717
:::
1818

1919
## 🦸 Option 2: Load the schema and data into your own PostgreSQL server
2020

2121
If you already have a PostgreSQL server set up, you can import the schema and data used in this lab. Download the file
2222
[1-library-schema-and-data.sql](https://github.com/mongodb-developer/relational-migrator-lab/blob/main/docker/sample-postgres-library/init/1-library-schema-and-data.sql)
23-
file and load it using psql or [pgAdmin](https://www.pgadmin.org/download/).
23+
and load it using [psql](https://www.postgresql.org/docs/10/app-psql.html) or [pgAdmin](https://www.pgadmin.org/download/).
2424

2525
## 🦸 Option 3: Run a PostgreSQL container using Docker
2626

2727
If you don't have an existing PostgreSQL server but have Docker installed, you can easily load a container pre-configured with
2828
PostgreSQL and the sample database:
2929

3030
1. Clone or download the code from this lab's [Github repo](https://github.com/mongodb-developer/relational-migrator-lab).
31-
2. Open a terminal window and navigate to the repo root
31+
2. Open a terminal window and navigate to the repo root.
3232
3. Build the Docker image by running the command:
33-
```
33+
```sh
3434
docker build -f ./docker/sample-postgres-library/Dockerfile -t sample-postgres-library .
3535
```
3636
4. Start the Docker container by running the command:
@@ -40,8 +40,8 @@ docker run -p 5432:5432 sample-postgres-library
4040
The PostgreSQL server can be accessed at localhost:5432 with a username of `postgres` and a password of `postgres`.
4141

4242
## 🦸 Option 4: Load an SQL file
43-
Choose this option if you just want a quick hands-on experience and you don't need to run actual migration.
43+
Choose this option if you just want a quick hands-on experience and you don't need to run an actual migration.
4444
Download the file [library-schema.sql](https://github.com/mongodb-developer/relational-migrator-lab/blob/main/resource/library-schema.sql)
45-
and upload this file to the Relational Migrator later, at the **create a project** step.
45+
and upload this file to the Relational Migrator later, at the [create a project](/docs/category/-create-a-project) step.
4646

4747
This is just the schema of the database, without actual data, so, you will not be able to perform an actual migration since you do not have a source database. But you can model the schema and play around with the Relational Migrator.

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@ import Screenshot from "@site/src/components/Screenshot";
44

55
- At the top, switch to Data Migration tab
66

7-
<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/210-image-001.png" alt="Screenshot of the connect modal" />
7+
<Screenshot url="http://127.0.0.1:8278" src="img/210-image-001.png" alt="Screenshot of the connect modal" />
88

99
- Click create sync job
1010
- Specify source DB connection details
1111
- The details will be populated from when you created the project.
1212

13-
<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/210-image-002.png" alt="Screenshot of the connect modal" />
13+
<Screenshot url="http://127.0.0.1:8278" src="img/210-image-002.png" alt="Screenshot of the connect modal" />
1414

1515
- Specify MongoDB connection details
1616
- Enter the URI, database, username and password for your MongoDB cluster
1717
- If you are using Atlas, you can retrieve the details from the [Atlas portal](https://cloud.mongodb.com)
1818

19-
<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/210-image-003.png" alt="Screenshot of the connect modal" />
19+
<Screenshot url="http://127.0.0.1:8278" src="img/210-image-003.png" alt="Screenshot of the connect modal" />
2020

2121
- Specify migration options
2222
- Choose the `Drop destination collections before migration` option
2323

24-
<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/210-image-004.png" alt="Screenshot of the connect modal" />
24+
<Screenshot url="http://127.0.0.1:8278" src="img/210-image-004.png" alt="Screenshot of the connect modal" />
2525

2626
- Read migration summary to confirm details
2727
- Run Start
2828
- Monitor the progress of the job
2929

30-
<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/210-image-005.png" alt="Screenshot of the connect modal" />
30+
<Screenshot url="http://127.0.0.1:8278" src="img/210-image-005.png" alt="Screenshot of the connect modal" />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ MongoDB Compass, or MongoDB Atlas. This topic assumes you have migrated your dat
1111
- Select the database you migrated data to
1212
- Select each of the collections and view the documents, confirming they conform to the schema you created.
1313

14-
<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/view-migrated-data-atlas.png" alt="Screenshot of the connect modal" />
14+
<Screenshot url="http://127.0.0.1:8278" src="img/view-migrated-data-atlas.png" alt="Screenshot of the connect modal" />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ While this code is not production-ready, it can save developers significant time
1313
- Under Template, select `Sample Documents`. Notice how you can view examples of how data in each collection will be structured.
1414
- Under Template, select `JSON Schema (MongoDB)`. Notice how you can view and download JSON Schema validators which could be used to enforce schema compliance.
1515

16-
<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/generate-app-code.png" alt="Screenshot of the connect modal" />
16+
<Screenshot url="http://127.0.0.1:8278" src="img/generate-app-code.png" alt="Screenshot of the connect modal" />
1717

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ in your choice of programming langauge. This feature uses Artifical Intelligence
1515

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

18-
<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/convert-sql-queries.png" alt="Screenshot of the connect modal" />
18+
<Screenshot url="http://127.0.0.1:8278" src="img/convert-sql-queries.png" alt="Screenshot of the connect modal" />
1919

docs/220-Generate code/30-convert-sprocs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ in your choice of programming langauge. This feature uses Artifical Intelligence
1414

1515
After a while, the equivalent MongoDB query will be shown at the right of the page. Try some other queries and langauges!
1616

17-
<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/convert-sprocs.png" alt="Screenshot of the connect modal" />
17+
<Screenshot url="http://127.0.0.1:8278" src="img/convert-sprocs.png" alt="Screenshot of the connect modal" />
1818

docs/220-Generate code/40-testing-queries.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,26 @@ Relation Migrator allows you to go a step further, and verify the converted quer
1313
2. If you source data resides in the `public` schema in your PostgreSQL database, you may skip this step. Otherwise, you will need to add your source data schema into PostgreSQL's search path in order for the queries execute properly.
1414

1515
Go to **Manage Connections**:
16-
<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/testing-queries-001.png" alt="Screenshot to manage connection" />
16+
<Screenshot url="http://127.0.0.1:8278" src="img/testing-queries-001.png" alt="Screenshot to manage connection" />
1717

1818
Edit your **JDBC URI** to include the search path. For example, if your source schema is `library`, add `options=-c%20search_path%3Dlibrary` as a query parameter to your URI:
1919

20-
<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/testing-queries-002.png" alt="Screenshot to add search path" />
20+
<Screenshot url="http://127.0.0.1:8278" src="img/testing-queries-002.png" alt="Screenshot to add search path" />
2121

2222
Click **Save** and you can use the browser's **back button** to navigate back to the Query Converter page.
2323

2424
3. After which, you may expand the test query panel to begin executing your source query or converted query.
2525

26-
<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/testing-queries-003.png" alt="Screenshot to expand query test panel" />
26+
<Screenshot url="http://127.0.0.1:8278" src="img/testing-queries-003.png" alt="Screenshot to expand query test panel" />
2727

2828
## Executing queries for comparison
2929

3030
1. Select the source query you want to test on the left pane. As an example, we will select the `get_books_by_genre` stored procedure.
3131
2. Convert the query to a MongoDB query if you have not done so, but note that the converted query may not always be correct.
3232
3. If it is a stored procedure, you will need to replace the placeholder parameter with a test value. In this example, we will replace it with `'Literature'`.
33-
<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/testing-queries-004.png" alt="Screenshot to show placeholder replacement" />
33+
<Screenshot url="http://127.0.0.1:8278" src="img/testing-queries-004.png" alt="Screenshot to show placeholder replacement" />
3434
4. Click **RUN SOURCE QUERY** and **RUN CONVERTED QUERY** to execute the queries and compare the results.
35-
<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/testing-queries-005.png" alt="Screenshot to show result comparison" />
35+
<Screenshot url="http://127.0.0.1:8278" src="img/testing-queries-005.png" alt="Screenshot to show result comparison" />
3636
5. If the query results are different, check your MongoDB query. In this example, your MongoDB query should look like:
3737
```js
3838
async function get_books_by_genre(db, genre_param) {

docs/40-desired-schema-mongodb.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ that data that is frequently accessed together is stored together by using embed
88

99
The following screenshot shows the MongoDB schema we will be creating in this lab.
1010

11-
<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/40-image-001.png" alt="Screenshot of the connect modal" />
11+
<Screenshot url="http://127.0.0.1:8278" src="img/40-image-001.png" alt="Screenshot of the connect modal" />
1212

1313
A few key points:
1414
- Books will contain an array of authors with author id and name for fast retrieval. This is using the [Extended Reference pattern](https://www.mongodb.com/blog/post/building-with-patterns-the-extended-reference-pattern) to reference a separate collection (Authors) but having in books enough information aubout the author.

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

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

33
# 👐 Creating a New Project
44

5-
Ensure Relational Migrator is installed and running (usually at http://127.0.0.1:8278/).
5+
Ensure the Relational Migrator is installed and running (usually at http://127.0.0.1:8278/).
66

77

88

@@ -12,8 +12,8 @@ Ensure Relational Migrator is installed and running (usually at http://127.0.0.1
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** if you are running the origin DB in the cloud, Docker or using your own hardware.
16-
- Click **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).
17-
- Click **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.
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.
16+
- 🦸‍♂️ 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).
17+
- 🦸‍♂️ 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

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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ We can store the credentials of our database so in the next session we can conne
1010

1111
Then we'll select PostgreSQL as our source database.
1212

13-
<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/60-image-000.png" alt="Selecting PostgreSQL as Database" />
13+
<Screenshot url="http://127.0.0.1:8278" src="img/60-image-000.png" alt="Selecting PostgreSQL as Database" />
1414

1515
## Enter connection details
1616

@@ -23,7 +23,7 @@ Enter the details for the PostgreSQL database you will be migrating from.
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
2525

26-
<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/60-image-001.png" alt="Screenshot of the connect modal" />
26+
<Screenshot url="http://127.0.0.1:8278" src="img/60-image-001.png" alt="Screenshot of the connect modal" />
2727

2828
:::info
2929
🦸‍♂️ If you have followed the steps to configure PostgreSQL in a docker container, the hostname will be `localhost`, username `postgres` and password `postgres`.

0 commit comments

Comments
 (0)