A mapping model contains the information that defines the relationships
between the source and target schemas that you specified, including transformations,
join conditions, filters, sort conditions, and annotations.
Before you begin
Prerequisites:- You must have one or more data design projects that includes data models
that you want to map.
- If you want to use remote databases in a federated scenario then you must
enable access to those databases by using the InfoSphere Information Server
federated functions that are part of the Data Source Explorer view.
About this task
You can use the mapping model to find or document relationships,
and to generate statements that query or manipulate your data sources by using
these relationships. You can create a mapping model with the mapping editor
wizard and modify the model with the mapping editor. You can specify source
and targets when you create the mapping model using the mapping editor wizard,
or you can add sources and targets to the existing mapping model with the
mapping editor.
To create a mapping model:
- Open the Mapping Editor wizard.
- In the File name field, specify a name for
the new mapping model. The file name must be unique within the project.
- In the Enter or select the parent folder field,
select the project name. The parent folder is the name of the current project.
Click Next or Finish.
- Optional: On the Specify the Mapping Source page,
click Add to open the file browser. The .dbm files
in the current workspace are displayed.
Select the source .dbm
files that contain the schemas that you want to use as sources for the mapping
model. You can add .dbm files to the list or remove files. The source selection
is limited to the models that are in data design projects in your current
workspace. A file that was previously selected is not displayed.
- Optional: Click OK.
- Optional: Click Next.
- Optional: In the Specify the Mapping Source page,
select the schemas that you want to use. Click Next.
All of the available schemas that are contained in the selected source
.dbm files are displayed. All schemas are selected by default. To exclude
a schema from the mapping model, clear the check box next to the schema name.
All selected schemas are used as sources in the mapping model. You can select
schemas from more than one .dbm file.
Tip: If the mapping model
contains multiple source databases, you can only generate scripts from that
mapping model in a federated environment.
- Optional: In the Specify the Mapping Target page,
click the Browse push button to select a target file.
The .dbm and .xsd files in the current workspace are displayed. You
can select only one target file.
- Click OK.
- Optional: In the Specify the Mapping Target page,
clear the check box of any schemas that you do not want to include in the
.msl file.
The schema tree displays with all schemas pre-selected.
You can select multiple schemas.
- Click Next.
- Optional: In the New Mapping Model Summary page,
review your selections in the summary window. You can change your selections
by selecting the Back button.
- Click Finish to save your selections and
open a mapping editor session with your new mapping model. Configuring
source and target schemas is always optional. You can add source and target
schemas to an existing model at any time.
Results
The mapping editor displays the source data models that you selected
on the left side of the editor. The source can contain one or more source
files that can contain multiple schemas. The mapping editor displays the single
target file that you selected on the right side of the editor. The target
file can contain multiple schemas.
The mapping models that you create
are stored under the current data design project. The contents of the data
design project are physically stored on a file system folder on your client
machine. The mapping model is stored in the .msl file. You can save or open
an .msl file in any data design project. When you open an .msl file it opens
inside the mapping editor. You can have multiple mapping editors open at the
same time but only one editor is visible at a time. When you exit the application,
you are asked to save any uncommitted changes.
The advantage of saving
objects on the local workspace is that you can work with your .msl mapping
model in a disconnected mode. Save the .msl file in the active mapping editor
by clicking . You can save to any data design project within the Database
Project Explorer view by clicking . The name of an msl file must
be unique within the data design project.