Appendix A. DataStage: operational process metadata configuration and DataStage job example 647
At a minimum, you will change the variable MetaStageDirectory in
runimport.cfg. You must enter here the value you chose or created in
Figure A-5.
Now we have configured both the client and the server in our environment to be
able to produce and consume process metadata. We can move on to creating
the DataStage Server jobs that will produce our process metadata.
Creating DataStage Server jobs
The different steps are:
1. Configure the PMB, Listener and RunImport
a. Install the ActivityCommand and Process MetaBroker
b. Stop and start DataStage Server
2. Import ERwin MetaData (use lowercase server name to match DataStage
server)
3. Export metadata to DataStage
4. Create DataStage jobs
5. Import DataStage jobs
6. Create the Locator table
7. Insert the locator record
8. Run the jobs
9. RunImport
10.Do data lineage (Show transformer derivation and rows processed)
11.Do process analysis
In this example we will discuss a sample DataStage job that will be used to load
our consumer sales model data warehouse. To build our DataStage job we will
need source and target metadata. We will get the source and target metadata
from the ERwin consumer sales model shown in Figure 8-6 on page 282 and
Figure 8-22 on page 296.
Schema <enter schema/owner
name here>
Schema is the name of the
Schema/Owner required to
access the MetaStage directory. If
the owner/schema of the
MetaStage Directory tables is
different to the value entered for
User, the Schema value must
specify the correct
owner/schema.
648 DB2 Cube Views: A Primer
We will now obtain the source and target metadata. To do this we will use
MetaStage as the metadata integration hub and Directory. We will first import the
ERwin consumer sales model into MetaStage and then export the metadata for
sources and targets to DataStage so that we can used the metadata definitions
to build a DataStage job to load our data warehouse:
1. Start MetaStage Explorer.
In the Attach dialog shown in Figure A-6, make sure that you choose the
Directory name created or selected Figure A-5. In the case of the example it
is
msrepos. Click Current to open the current version of the Directory.
MetaStage allows you to connect to different versions of the Directory, but
since this is a new directory and no imports have been done, simply choose
Current.
Figure A-6 MetaStage attach
2. When you open MetaStage you will see the screen shown in Figure A-7, but
you will not have an ERwin Import Category yet.
Figure A-7 ERwin import category
Appendix A. DataStage: operational process metadata configuration and DataStage job example 649
To create a new ERwin Import Category into which the source and target
metadata will be imported, right-click
Import Categories. A context menu will
be shown. Click
New Import Category as shown in Figure A-8 and enter a
name for the Category. In our example, the category is named
ERwin_SalesModel.
Figure A-8 New import category
3. Now we have a container for our ERwin metadata, we can import the
metadata objects into MetaStage. Right-click the Import Category
ERwin_SalesModel and choose
Import->New as shown in Figure A-9.
Figure A-9 New import
650 DB2 Cube Views: A Primer
4. After choosing to perform a new import, you will be asked to make an Import
Selection as shown in Figure A-10. Choose CA ERwin v4.0 from the Source
MetaBroker drop down list.
Figure A-10 Import selection
Note: The CA ERwin v4.0 MetaBroker is forward compatible with ERwin
v4.1.
Appendix A. DataStage: operational process metadata configuration and DataStage job example 651
5. Click OK. The ERwin MetaBroker Parameters dialog will be shown as in
Figure A-11.
Figure A-11 ERwin import parameters
For our example it is important to make note of three parameters in
Figure A-11.
XML File: The input XML file is the consumer sales model shown in
Figure 8-6 on page 282 and Figure 8-22 on page 296. To produce the
ERwin XML file we need to export the consumer sales model using ERwin
Data Modeler shown in Figure A-12.

Get DB2 Cube Views: A Primer now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.