Create a Project by Using a Sample Schema
On this page
You can create a project using a pre-defined sample schema. The sample schema allows you to try Relational Migrator even if you don't have a relational database to connect to. If you want to run a sync job for your sample project you can deploy a Docker image containing the schema and data.
(Optional) Host a Docker PostgreSQL instance or load data to the
Northwind
database.Create a project with the
Use a sample schema
project option.Select the database, schema, and tables that are part of the migration.
About this Task
Creating a project with a sample schema is the quickest and easiest way to test drive Relational Migrator.
Before finalizing the creation of your project, you have the choice to select the initial mappings. These options include starting with a recommended MongoDB schema, which is automatically suggested by Relational Migrator based on your relational database.
Before you Begin
Before you can run sync jobs from the sample schema you must either:
Download Docker to pull and host a provided PostgreSQL database container. This container comes preloaded with the sample schema presented in Relational Migrator.
Download and execute the Northwind.sql database setup script on an existing PostgreSQL instance. This script loads the sample schema.
Steps
The following steps guide you through the process of connecting to a Docker container with the intent of migrating data with sync jobs. This is not a requirement, you can create a project without running sync jobs. If you do not plan on running sync jobs, skip step one.
(Optional) From a terminal window, run the following Docker command to launch a PostgreSQL relational database instance:
docker run -p 5432:5432 public.ecr.aws/v4d7k6c9/relational-migrator-sample-database The connection credentials for this database instance are:
Username:
postgres
Password:
postgres
Port:
5432
Warning
The PostgreSQL database is for demo uses only and should not be used for production purposes.
In Relational Migrator, click New Project at the top-right of the Relational Migrator home screen.
Click the Create sample button.
From the Select tables screen, indicate the tables you want to migrate, and click Next.
The following table explains the different ways you can select tables to migrate:
TargetActionAll tables within a databaseClick the check mark for the target database.All tables within a schemaExpand the target database and click the check mark for the target schema.Specific tables within a schemaExpand the target database and schema. Select the target tables individually.Specific table namesUse the Filter bar above the Relational Schema list.Choose a Global casing option for collection names.
This option affects the names of your collections created from the tables in your relational database:
Keep Original: Keep the original casing used in your relational database table name.
Override with Global Casing: Override the original table name with a global casing convention.
camelCase
TitleCase
kebab-case
snake_case
UPPER_SNAKE_CASE
Choose an Initial mappings option for your MongoDB schema.
- Start with a MongoDB schema that matches your relational schema
- Creates your initial project with a new document mapping rule for each table.
- Start with a recommended MongoDB schema
- Relational Migrator creates mapping rules for a suggested MongoDB schema. When you choose this option, a table appears showing the imported relational tables. Relational Migrator suggests which tables should be represented as top-level or embedded collections. You can use the checkboxes to modify which tables are mapped into collections or embedded.
- Start with an empty MongoDB schema
- Creates your initial project with no mapping rules.
Note
Regardless of the option you choose when starting your project, you have the flexibility to manually add, remove, or modify mapping rules at any time. This allows you to customize the MongoDB schema according to the specific requirements of your workload.
Enter a name for your project.
Click Done.