PC 861 MappingAnalyst
PC 861 MappingAnalyst
Guide
Informatica PowerCenter
(Version 8.6.1)
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Informatica Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Informatica Customer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Informatica Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Informatica Web Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Informatica How-To Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Informatica Knowledge Base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Informatica Global Customer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Table of Contents
Appendix B: Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Mapping Analyst for Excel Glossary of Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Table of Contents
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
vi
Table of Contents
Preface
The PowerCenter Mapping Analyst for Excel Guide is written for business analysts who want to use Microsoft
Excel to develop PowerCenter mappings. It is also written for PowerCenter developers who want to use the
Microsoft Excel files to begin developing PowerCenter mappings. This book assumes you have a working
knowledge of Microsoft Excel.
Informatica Resources
Informatica Customer Portal
As an Informatica customer, you can access the Informatica Customer Portal site at http://my.informatica.com.
The site contains product information, user group information, newsletters, access to the Informatica customer
support case management system (ATLAS), the Informatica How-To Library, the Informatica Knowledge Base,
Informatica Documentation Center, and access to the Informatica user community.
Informatica Documentation
The Informatica Documentation team takes every effort to create accurate, usable documentation. If you have
questions, comments, or ideas about this documentation, contact the Informatica Documentation team
through email at [email protected]. We will use your feedback to improve our
documentation. Let us know if we can contact you regarding your comments.
The Documentation team updates documentation as needed. To get the latest documentation for your product,
navigate to the Informatica Documentation Center from http://my.informatica.com.
vii
WebSupport requires a user name and password. You can request a user name and password at http://
my.informatica.com.
Use the following telephone numbers to contact Informatica Global Customer Support:
viii
Preface
Asia / Australia
Informatica Corporation
Headquarters
100 Cardinal Way
Redwood City, California
94063
United States
Informatica Business
Solutions Pvt. Ltd.
Diamond District
Tower B, 3rd Floor
150 Airport Road
Bangalore 560 008
India
Toll Free
+1 877 463 2435
Toll Free
00 800 4632 4357
Toll Free
Australia: 1 800 151 830
Singapore: 001 800 4632
4357
Standard Rate
Brazil: +55 11 3523 7761
Mexico: +52 55 1168 9763
United States: +1 650 385 5800
Standard Rate
Belgium: +32 15 281 702
France: +33 1 41 38 92 26
Germany: +49 1805 702 702
Netherlands: +31 306 022 797
Spain and Portugal: +34 93 480 3760
United Kingdom: +44 1628 511 445
Standard Rate
India: +91 80 4112 5738
CHAPTER 1
Overview, 1
Architecture, 1
Overview
Use Mapping Analyst for Excel to configure PowerCenter mappings in Microsoft Office Excel. The following
individuals can collaborate when creating PowerCenter mappings:
Business analyst. Creates a mapping specification in Microsoft Office Excel to define a mapping that can
include sources, targets, and transformations. A business analyst is familiar with project requirements and
source and target data, but is not a PowerCenter user.
PowerCenter developer. Imports the mapping specification using the Repository Manager to create the
corresponding PowerCenter objects. The PowerCenter developer can edit the objects, implement additional
functionality that might be required, and run a workflow generated from the mapping. The PowerCenter
developer can use the Repository Manager to export any valid mapping to a mapping specification for a
business analyst to review in Microsoft Excel.
For example, a business analyst wants to merge employee data from multiple sources into a single data
warehouse but is not familiar enough with the PowerCenter Client to create the required mapping. The
business analyst can use the templates included with the PowerCenter Client to create a mapping specification
that describes the required sources, transformations, and targets. A PowerCenter developer can then import the
mapping specification into a PowerCenter repository, continue development of the mapping in the
PowerCenter Client, and export the completed mapping for review by the business analyst.
Architecture
Mapping Analyst for Excel includes mapping specifications and metamaps.
Mapping Specifications
A mapping specification is a Microsoft Excel file that includes metadata to import into the PowerCenter
repository. Use a mapping specification to define sources or targets or to define a mapping by describing the
Overview
sources and targets and the transformations between sources and targets. Mapping Analyst for Excel includes
templates for mapping specifications. Use the mapping specification templates as a starting point to develop
mapping specifications in Excel. You can also create a custom mapping specification template.
When you create a mapping specification, you do not have to define all objects. For example, if you do not
define transformations, the Repository Service imports only sources and targets.
Metamaps
A metamap is a hierarchical representation of the metadata in a mapping specification. A metamap determines
how the Repository Service reads the metadata. Each mapping specification has an associated metamap. You
must use the same metamap for each mapping specification you create from a template.
The metamap contains multiple worksheets that define import and export options and the cell location of
metadata in a mapping specification.
Mapping Analyst for Excel includes metamaps in XML and Excel formats. Use the XML version of the
metamap when you import mapping specifications or export mappings. Use the Excel version of the metamap
to modify metamap properties when you create a custom mapping specification template.
Note: If you create a mapping specification from a template included with Mapping Analyst for Excel, you do
2.
Mapping
Specification
PowerCenter Repository
Repository
Manager
Mapping
Metamap
Sources
Targets
5.
Transformations
4.
PowerCenter
Designer
To work with Mapping Analyst for Excel, use the following process:
1.
Create a mapping specification based on a Mapping Analyst for Excel template or on a custom mapping
specification template.
2.
If you create a custom mapping specification template, modify the associated metamap to read the custom
template.
3.
Use the Repository Manager to import the mapping specification. The Repository Service creates the
PowerCenter objects.
4.
5.
Use the Repository Manager to export PowerCenter metadata to a mapping specification for review by a
business analyst.
Template File
Associated Metamap
Mapping template
(with validation)
MappingTemplate.xls
MappingTemplate-MetaMap.xls
MappingTemplate-MetaMap.xml
Mapping template
(without validation)
MappingTemplate_NoValidation.xls
MappingTemplate-MetaMap.xls
MappingTemplate-MetaMap.xml
Source-TargetMatrix template
source-target-matrix.xls
source-target-matrix-metamap.xls
source-target-matrix-metamap.xml
The mapping specification templates and metamaps are located in the following directory:
<PowerCenter_Client_installation_directory>\bin\Sample Specifications
Mapping Template
The Mapping template contains separate worksheets for overview information, sources, targets, and functions.
Use this template to create a mapping specification for a single mapping. Mapping specifications based on the
Mapping template can contain sources and targets and Joiner, Filter, Expression, Lookup, and Aggregator
transformations.
The Mapping template includes a template with validation and a template without validation. Use the template
with validation to validate metadata values in the mapping specification. Use the template without validation if
you want to avoid enabling macros on your machine.
Source-Target-Matrix Template
The Source-Target-Matrix template includes a separate worksheet for each mapping in the mapping
specification. Use this template to create multiple mappings in a single mapping specification. Mapping
specifications based on the Source-Target-Matrix template can contain sources, targets, and Expression
transformations.
The Source-Target-Matrix repeating sheet file, source-target-matrix-mirrepeatingsheet.xls, defines the common
structure for multiple mappings defined in a mapping specification that is based on the Source-Target-Matrix
template. The metamap for the Source-Target-Matrix template reads from the repeating sheet file to define the
cell location of metadata in the template.
CHAPTER 2
Overview, 5
Main Worksheet, 6
Functions, 9
Transformations, 9
Overview
A business analyst uses the Mapping template to create a mapping specification for a single mapping. The
Mapping template contains separate worksheets for overview information, sources, targets, and functions.
Mapping specifications based on the Mapping template can contain sources and targets and Joiner, Filter,
Expression, Lookup, and Aggregator transformations. A PowerCenter developer imports the mapping
specification using the Repository Manager to create the corresponding PowerCenter objects. During import,
the Repository Service names each mapping Mapping. The PowerCenter developer can change the mapping
name in the Designer.
Before you create a mapping specification based on the Mapping template, choose whether to use a template
with or without validation. The structure of the template without validation is the same as the template with
validation.
To create a mapping specification based on the Mapping template, a business analyst completes the following
steps:
1.
2.
3.
4.
5.
Configure transformations.
6.
Based on the mapping specification template type, click Validate to validate the transformations.
Overview
Main Worksheet
Use the Main worksheet to enter general information for the mapping, such as the name of the source or target
database or file system. The Main worksheet includes the following sections:
Data Store. Contains the source and target database name and type.
In general, when you configure a mapping specification, you do not need to enter all requested metadata.
However, certain metadata is required to import the mapping specification into the repository.
Enter the following properties in the Model section:
Property
Required/
Optional
Model Name
Required
Model Description
Optional
Description for the model. The Repository Service does not import
this value.
Optional
Time the model was created. The Repository Service does not
import this value.
Description
Enter the following properties in the Source Data Store and Target Data Store sections:
Property
Required/
Optional
Name
Required
Name of the source or target data store. Source and target data
stores must have different names. During import, the Repository
Service concatenates the Source Data Store Name and the Source
Schema Name using the format
<SourceDataStoreName>_<SourceSchemaName>. It assigns the
concatenated name to the database name for the source definition.
Description
Optional
System Type
Required
Schema Names
Required
Description
Optional
Description
Transformations. Transformations to include in the mapping. The worksheet you configure determines the
type of transformations you can configure. For more information, see Transformations on page 9.
Classes/Entities/Tables/Records Section
The Classes/Entities/Tables/Records section includes source or target table and file information.
Enter the following information for each source and target in the mapping:
Column Name
Required/
Optional
Physical Name
Required
Business Name
Optional
Business name for the table or file name. The Repository Service
assigns this value to the business name of the source or target
definition. If you do not enter a value, the Repository Service uses
the physical name for the business name.
Description
Optional
Description
Attributes/Columns/Fields Section
The Attributes/Columns/Fields section contains source or target column and field details.
Enter the following information for each source and target in the mapping:
Column Name
Required/
Optional
Physical Name
Required
Business Name
Optional
Description
Optional
Description
Types Section
The Types section contains the datatype for each column or field.
Enter the following information for each source and target in the mapping:
Column Name
Required/
Optional
Datatype
Required
Length
Required
Length of the column. The Repository Service assigns this value to the
precision of the port.
Scale
Required
Scale of the column. The Repository Service assigns this value to the
scale of the port.
Description
Formula/Expression
Example
INVENTORY.ItemName
REVENUE.MonthlyRecognized
Revenue
Formula/Expression
Example
Aggregate expression
AVG (INVENTORY.Cost)
Non-aggregate
expression
INVENTORY.Price
INVENTORY.Cost
Functions
The Functions worksheet lists the PowerCenter functions that you can use to configure transformation
expressions. Functions that you can use in aggregate expressions are labeled Aggregation. You can add custom
functions to the Functions worksheet.
The validation macros compare functions used in expressions with the list on the Functions worksheet.
To add functions:
1.
On the Functions worksheet, add the custom function name to the list.
2.
If the function is an aggregate function, label the function Aggregation in the Type column.
Transformations
You add transformations to a mapping specification on the following worksheets:
Joiner Transformation
You can join source data from two related heterogeneous sources residing in different locations or file systems.
You join source data by matching one or more pairs of columns between the two sources. You configure a join
on the Source worksheet of the mapping specification. A join in the mapping specification becomes a Joiner
transformation in a PowerCenter mapping.
On the Source worksheet, enter the join information for the appropriate port in the left or master table. For
example, if you are joining two sources by a column named StoreID, enter the join information in the row that
describes the StoreID port of the left or master table.
The following table describes the information you configure for a Joiner transformation:
Column Name
Description
Right Table
Name of the right or detail table to join with the left or master table. The table must be
configured on the Source worksheet.
Functions
Column Name
Description
Right Column
Column name in the right or detail table to match with the column in the left or master
table. The Repository Service uses these columns to define the join condition.
Type
Type of join for the Joiner transformation. Enter one of the following types:
- LEFT. Left outer join. The Repository Service creates a Joiner transformation with a
Master Outer join.
- RIGHT. Right outer join. The Repository Service creates a Joiner transformation with a
Detail Outer join.
- INNER. Inner join. The Repository Service creates a Joiner transformation with a Normal
join.
- OUTER. Outer join. The Repository Service creates a Joiner transformation with a Full
Outer join.
The following figure shows a left or master table named SALES joined with a right or detail table named
REVENUE by the StoreID column with an Outer join:
Lookup Transformation
You can configure a lookup to find data outside of the mapping pipeline. You configure a lookup on the Source
worksheet of the mapping specification. A lookup in the mapping specification becomes a connected Lookup
transformation in a PowerCenter mapping.
You can perform a lookup on any source defined in the mapping specification. To perform a lookup on a table
that is not used as a mapping source, you can include the lookup table in the file as a source table without
connecting it to mapping targets.
To create a lookup, define the following information:
Lookup condition
Return values
Lookup Condition
The Integration Service finds data in the lookup source with a lookup condition. The lookup condition is
similar to the WHERE clause in an SQL query.
Define the condition for the appropriate column in the lookup table. For example, to return values from a
REVENUE lookup table for matching store IDs, enter the following lookup condition in the Lookups column
for the row that describes the StoreID port of the REVENUE table:
REVENUE.StoreID=SALES.StoreID
Return Values
Return values are the values from the lookup table that the Integration Service returns when the lookup
condition is met.
10
Define return values by entering the name of a lookup table column as an expression for a target column on the
Target worksheet. For example, to include monthly revenue data from the lookup table in the mapping, define
REVENUE.MonthlyRecognizedRevenue as the expression for the MonthlyRecognizedRevenue target column
on the Target worksheet.
Filter Transformation
You can configure a filter to remove source data from the mapping pipeline. You configure a filter on the Source
worksheet of the mapping specification. A filter defined in the mapping specification becomes a Filter
transformation in a PowerCenter mapping.
Configure a filter by defining a filter condition. The filter condition is an expression that returns TRUE or
FALSE. For example, use the following expression to filter out transactions with negative values, such as
returns:
TransactionAmount > 0
You can also specify multiple components for a condition using the AND and OR logical operators.
Define a filter condition for the appropriate port in the source table. For example, enter the TransactionAmount
condition in the Filters column for the row that describes the TransactionAmount port.
Aggregator Transformation
You can configure an aggregate expression to perform calculations on multiple values in a port. You configure
an aggregate expression on the Target worksheet. An aggregate expression defined in the mapping specification
becomes an Aggregator transformation in a PowerCenter mapping.
Use aggregate functions to perform calculations on multiple values in a port. For example, the following
aggregate expression evaluates all values in the Quantity port of the SALES table and returns the highest value:
MAX(SALES.Quantity)
You can use an aggregate function, conditional clauses, and non-aggregate functions in an aggregate expression.
You can also nest one aggregate function within another aggregate function, for example:
MAX( COUNT( SALES.Quantity))
In the Mapping template, aggregate functions are marked Aggregation in the list of functions on the
Functions worksheet.
Define an aggregate expression in the Formula/Expression column for the row where you want return values to
be written.
When you validate the Target worksheet in the mapping specification, Microsoft Excel defines the expression
type in the Transformations Type column.
The following figure shows an aggregate expression configured for the StoreSales port of the T_SALES target
table:
Transformations
11
Grouping Values
In PowerCenter, you use group by ports in the Aggregator transformation to group values for aggregate
calculations. The result of an aggregate expression varies depending on the group by ports you configure.
For example, when the Integration Service calculates the following aggregate expression with no group by ports
defined, it finds the total sales from all transactions:
SUM( SALES.TransactionAmount )
However, if you use the same expression, and you group by the StoreID port, the Integration Service returns the
total sales for each store ID.
When a PowerCenter developer imports a mapping specification, the Repository Service creates a single
Aggregator transformation for all aggregate expressions defined for the target. Any port in the Aggregator
transformation without an aggregate expression becomes a group by port.
Use the Transformations Description column to indicate which group by ports you want to use. After
importing the mapping specification, the PowerCenter developer can view that information in the Aggregator
transformation and configure group by ports appropriately.
Expression Transformation
You can configure an expression to calculate values in a single row for each row in a port. You configure an
expression on the Target worksheet of the mapping specification. An expression defined in the mapping
specification becomes an Expression transformation in a PowerCenter mapping.
Use an expression to calculate values in a single row for each row in a port. For example, the following
expression increases the cost of each item by five percent:
INVENTORY.Cost + (INVENTORY.Cost * .05)
You can use conditional clauses and non-aggregate functions in non-aggregate expressions. You can also nest
non-aggregate functions.
When you validate the Target worksheet in the mapping specification, Microsoft Excel defines the expression
type in the Transformations Type column.
Expressions contain columns that are defined on the Source or Target worksheet.
Function types are defined in the Type column in the Target worksheet based on the definitions on the
Functions worksheet.
To perform validation:
1.
2.
3.
4.
12
5.
13
14
CHAPTER 3
Overview, 15
Overview
This example uses the Mapping template with validation to configure a mapping that aggregates sales and
revenue data into a data warehouse for analysis. In addition, the example mapping performs the following tasks:
The mapping reads from the following source tables located in an Oracle schema named Sales:
Sales. Stores the current month's sales data for each store.
Revenue. Stores the revenue recognized in the current month from sales that have been occurring at each
store.
The mapping writes the aggregated data to a target table named T_Sales located in an Oracle schema named
DM.
To create this example mapping, the business analyst and PowerCenter developer complete the following steps:
1.
Establish the PowerCenter environment (Developer). The PowerCenter developer configures the database
connectivity, designates a repository folder to store the imported objects, and creates the source and target
tables.
2.
Configure the mapping specification in Microsoft Excel (Business Analyst). The business analyst creates a
mapping specification from the Mapping template and configures the Main, Source, and Target
worksheets.
3.
Overview
15
4.
5.
6.
Configure database connections. Use the Workflow Manager to configure connection objects so that the
Integration Service can connect to the source and target databases.
Designate a repository folder to store the imported objects. Use the Repository Manager to select an
existing folder or to create a folder for the PowerCenter objects that are imported from the mapping
specification.
Create source and target tables. Use Oracle SQL Plus to run SQL statements to use the sample data in this
example.
To use the source tables included in this example, use Oracle SQL Plus to run the following SQL statements to
create the Sales and Revenue source tables in an Oracle schema named Sales:
Connect sales/sales
CREATE TABLE sales.sales (StoreID NUMBER, OldTransactionNumber NUMBER, TransactionDate
DATE, TransactionAmount NUMBER);
Insert
Insert
Insert
Insert
Insert
Insert
Insert
Insert
into
into
into
into
into
into
into
into
sales.sales
sales.sales
sales.sales
sales.sales
sales.sales
sales.sales
sales.sales
sales.sales
values
values
values
values
values
values
values
values
(1,100,'1-JAN-2008',1000);
(1,101,'1-JAN-2008',2000);
(1,102,'3-JAN-2008',3000);
(1,103,'3-JAN-2008',4000);
(2,104,'2-JAN-2008',1000);
(2,105,'2-JAN-2008',2000);
(2,106,'4-JAN-2008',2000);
(2,107,'4-JAN-2008',3000);
To use the target table included in this example, use Oracle SQL Plus to run the following SQL statements to
create the T_Sales target table in an Oracle schema named DM:
Connect DM/DM
CREATE TABLE DM.T_Sales (StoreID NUMBER, TransactionDate DATE, StoreSales NUMBER,
MonthlyRecognizedRevenue NUMBER);
16
The Functions worksheet lists a set of functions that you can use to configure transformation expressions. In
this example, you do not need to configure the Functions worksheet.
Description
Model Name
Name of the source data store that contains the mapping sources.
Name of the target data store that contains the mapping targets.
Cannot be identical to the Source Data Store Name.
Optionally, you can enter a model description and creation time as well as descriptions for the source, source
schemas, target, and target schemas.
Source tables named SALES and REVENUE. A source defined in the mapping specification is imported as
a source definition and Source Qualifier transformation in a PowerCenter mapping.
Lookup condition. You can configure a lookup condition to find data in a source defined in the mapping
specification. A lookup in the mapping specification becomes a connected Lookup transformation in a
PowerCenter mapping. Define the lookup condition in the appropriate column in the source table. This
example uses the following lookup condition to return values from the REVENUE source table for matching
store IDs:
REVENUE.StoreID=SALES.StoreID
Filter condition. You can configure a filter to remove source data from the mapping pipeline. A filter defined
in the mapping specification becomes a Filter transformation in a PowerCenter mapping. Define the filter
condition in the appropriate column in the source table. This example uses the following filter condition to
remove transactions with negative values, such as returns:
TransactionAmount > 0
17
Attributes/Columns/
Fields Physical Name
Datatype
Length
SALES
StoreID
SQL_NUMERIC
10
OldTransactionNumber
SQL_NUMERIC
20
TransactionDate
SQL_DATE
20
TransactionAmount
SQL_NUMERIC
20
StoreID
SQL_NUMERIC
10
MonthlyRecognizedRevenue
SQL_NUMERIC
20
REVENUE
Scale
To configure a filter that removes negative transactions, such as returns, enter the following expression in
the Filters column for the SALES.TransactionAmount row:
TransactionAmount > 0
3.
To configure a lookup condition, enter the following expression in the Lookups column for the
REVENUE.StoreID row:
REVENUE.StoreID=SALES.StoreID
4.
Target table named T_SALES. A target defined in the mapping specification becomes a target definition in
a PowerCenter mapping. To configure a target port in the mapping specification, enter an expression in the
Formula/Expression column for the target port. The expression can be the name of a source port or an
aggregate or non-aggregate expression. Unconfigured target ports appear in a PowerCenter target definition
but are not connected to the PowerCenter mapping pipeline. When defining target ports, use the target table
name and column name as follows:
<TableName>.<ColumnName>
Aggregate expression. Use aggregate expressions to perform calculations on multiple values in a port. An
aggregate expression defined in a mapping specification becomes an Aggregator transformation in a
PowerCenter mapping. Define an aggregate expression in the row where you want return values to be
written. This example uses the following aggregate expression to find the total sales from all transactions
grouped by store ID:
SUM( SALES.TransactionAmount )
When you import a mapping specification, any port in the Aggregator transformation without an aggregate
expression becomes a group by port. Use the Transformations Description column in the Target worksheet
to indicate the group by ports you want to use. After importing the mapping specification, the PowerCenter
18
developer can view that information in the Aggregator transformation and configure the group by ports
appropriately.
To configure the Target worksheet:
1.
Attributes/Columns/
Fields Physical Name
Datatype
Length
T_SALES
StoreID
SQL_NUMERIC
10
TransactionDate
SQL_DATE
20
StoreSales
SQL_NUMERIC
20
MonthlyRecognizedRevenue
SQL_NUMERIC
20
10
Scale
To configure an aggregate expression that calculates total sales by store, enter the following expression in
the Transformation Formula/Expression column for the T_SALES.StoreSales row:
SUM(SALES.TransactionAmount)
3.
In the Description column, enter the following information for the PowerCenter developer:
group by StoreID
4.
To define the return value of the lookup condition of the REVENUE table, enter the following expression
in the Transformation Formula/Expression column for the T_SALES.MonthlyRecognizedRevenue row:
REVENUE.MonthlyRecognizedRevenue
5.
6.
Transformations
Formula/Expression
StoreID
SALES.StoreID
TransactionDate
SALES.TransactionDate
19
2.
3.
4.
5.
Copy the mapping specification named AggregateMapping.xls from the shared location to the following
directory on your local machine:
<PowerCenter Client installation directory>\bin\Sample Specifications
2.
In the Repository Manager, open the folder that you selected to store the imported PowerCenter objects.
3.
4.
For Source Tool, select Microsoft Office Excel and click Next.
The Microsoft Office Excel Options page appears.
5.
Description
File
File name for the mapping specification. Click the Value field to
locate and select the mapping specification that you created. For
example, select AggregateMapping.xls.
Metamap associated with the template used to create the file. Click
the Value field to locate and select the XML version of the
associated metamap, MappingTemplate-MetaMap.xml.
Click Next.
The PowerCenter Options page appears.
7.
20
For export objects, select Sources, Targets, and Mappings to import the entire mapping.
8.
For Code Page, enter the name of the PowerCenter Repository Service code page.
For example, if the PowerCenter Repository Service uses the MS Windows Latin 1 (ANSI), superset of
Latin1 code page, enter the corresponding code page name MS1252. For a list of supported code page
names, see the PowerCenter Administrator Guide.
9.
10.
Click Next.
In the Import Results dialog box, a message appears if the export from the mapping specification is
successful. Error messages display when the export is not successful.
11.
Click Show Details to view log events. You can also click Save Log to save the log events to a file.
12.
Click Next.
The Selection dialog box displays the sources or targets in the mapping specification with all objects
selected by default.
13.
2.
To rename the mapping, click Mapping > Edit, enter a name, and click OK.
For example, enter AggregateMappingExample.
3.
4.
5.
Select the GroupBy option for the StoreID port, and clear the option for all other ports.
Step 6. Edit the PowerCenter Mapping and Generate a Workflow
21
6.
Click OK.
7.
22
CHAPTER 4
Overview, 23
Mapping Names, 24
Sources, 24
Expression Transformations, 25
Targets, 25
Overview
A business analyst uses the Source-Target-Matrix template to create a mapping specification for multiple
mappings. The Source-Target-Matrix template contains a separate worksheet for each mapping in the mapping
specification. Mapping specifications based on the Source-Target-Matrix template can contain sources, targets,
and Expression transformations. A PowerCenter developer imports the mapping specification using the
Repository Manager to create the corresponding PowerCenter objects.
To create a mapping specification based on the Source-Target-Matrix template, a business analyst completes the
following steps:
1.
2.
3.
Configure sources.
4.
5.
Configure targets.
Note: You can use the Source-Target-Matrix template to create a mapping specification with a single mapping.
23
Mapping Names
The Source-Target-Matrix template contains three worksheets named mapping1, mapping2, and mapping3.
When a PowerCenter developer imports a mapping specification created from the Source-Target-Matrix
template, the Repository Service performs the following actions:
Names each mapping and target in the mapping specification with the worksheet name. Rename each
worksheet with an appropriate mapping and target name.
Creates a new mapping for every worksheet in the file. To avoid importing unused worksheets, delete all
unused worksheets from the file.
Sources
Use the Source section on each worksheet to enter source information for the mapping.
Enter the following properties in the Source section:
Property
Required/
Optional
File/table
Required
Field/column
Required
Field/column Datatype
Required
Field/column
Description
Optional
Description for the field or column. The Repository Service uses this
description for the port in the source definition.
Description
To specify a database type for the source, the PowerCenter developer can complete one of the following tasks:
Select a database type when importing the mapping specification. On the PowerCenter Options page of
the Import Wizard, select a database type for the Database type option. During import, the Repository
Service assigns this database type to all sources and targets for each mapping configured in the mapping
specification. For more information, see Importing Mapping Specifications on page 34.
Edit the database type for the source definition in the Designer. After importing the mapping specification,
open the source definition in the Source Analyzer. In the Table tab, select the database type.
To specify a database name for the source, the PowerCenter developer can enter the database name when
importing the mapping specification. On the PowerCenter Options page of the Import Wizard, enter a name
for the Database name option. All sources for each mapping configured in the mapping specification will have
the same database name. For more information, see Importing Mapping Specifications on page 34.
24
Expression Transformations
Mapping specifications based on the Source-Target-Matrix template can contain non-aggregate expressions. Use
an expression to calculate values in a single row for each row in a port. For example, the following expression
increases the salary of each employee by seven percent:
Salary + (Salary * .07)
You can use conditional clauses and non-aggregate functions in non-aggregate expressions. You can also nest
non-aggregate functions.
You configure an expression in the Transformation column for the source row on each worksheet of the
mapping specification. An expression defined in the mapping specification becomes an Expression
transformation in a PowerCenter mapping.
The following figure shows an expression defined for a source row named Salary:
Targets
Use the Target section on each worksheet to enter target information for the mapping.
When a PowerCenter developer imports the mapping specification, the Repository Service uses the worksheet
name to define the target definition name.
Enter the following properties in the Target section:
Property
Required/
Optional
Field/column
Required
Field/column Datatype
Native Name
-orField/column Datatype
Required
Length
Required
Scale
Required
Description
Expression Transformations
25
Property
Required/
Optional
Description
Optional
Description for the field or column. The Repository Service uses this
description for the port in the target definition.
Notes
Optional
Description for the field or column. The Repository Service uses this
description for the port in the target definition. When you enter
values for both the Description and Notes properties, the Repository
Service uses the Notes property.
Description
To specify a database type for the target, the PowerCenter developer can complete one of the following tasks:
26
Select a database type when importing the mapping specification. On the PowerCenter Options page of
the Import Wizard, select a database type for the Database type option. During import, the Repository
Service assigns this database type to all sources and targets for each mapping configured in the mapping
specification. For more information, see Importing Mapping Specifications on page 34.
Edit the database type for the target definition in the Designer. After importing the mapping specification,
open the target definition in the Target Designer. In the Table tab, select the database type.
CHAPTER 5
Overview, 27
Overview
This example uses the Source-Target-Matrix mapping specification template to configure mappings that read
human resources data from a flat file and write the data to an Oracle database. The mapping specification in
this example configures the following mappings:
Employee_Info. Reads a delimited flat file containing employee information and writes the data to a target
table named Employee_Info located in an Oracle schema named DM.
Emp_Raises. Reads the same delimited flat file, includes an Expression transformation that calculates a
salary increase for each employee, and writes the data to a target table named Emp_Raises located in an
Oracle schema named DM.
To create these example mappings, the business analyst and PowerCenter developer complete the following
steps:
1.
Establish the PowerCenter environment (Developer). The PowerCenter developer configures the database
connectivity, designates a repository folder to store the imported objects, and creates the sample flat file
source and the target tables.
2.
Configure the mapping specification in Microsoft Excel (Business Analyst). The business analyst creates a
mapping specification from the Source-Target-Matrix template and configures the Employee_Info and
Emp_Raises mappings on separate worksheets.
3.
4.
5.
Overview
27
Configure database connections. Use the Workflow Manager to configure connection objects so that the
Integration Service can connect to the source and target databases.
Designate a repository folder to store the imported objects. Use the Repository Manager to select an
existing folder or to create a folder for the PowerCenter objects that are imported from the mapping
specification.
Create the source flat file. Create a flat file that contains the sample data used in this example.
Create target tables. Use Oracle SQL Plus to run SQL statements to use the sample data in this example.
EmployeeID
FirstName
LastName
Salary
StartDate
EndDate
For example, create a file named HR.txt that contains the following sample data:
1,John,Baer,100000,1/1/2005 00:00:00,1/1/2006 00:00:00
2,Bobbi,Apperley,120000,1/1/2005 00:00:00,1/1/2007 00:00:00
Save the file to the source file directory for the Integration Service process. The directory is defined in the
$PMSourceFileDir service process variable. By default, the variable is set to the following directory:
<PowerCenter installation directory>\server\infa_shared\SrcFiles
28
Open HR_Data_Load.xls.
2.
3.
In the Source section of the Employee_Info worksheet, enter the following information:
4.
File/Table
Field/Column
Field/Column Datatype
HR
EmployeeID
Number
FirstName
String
LastName
String
Salary
Decimal
StartDate
Date
EndDate
Date
In the Target section of the Employee_Info worksheet, enter the following information:
Field/Column
Emp_ID
SQL_INTEGER
First_Name
SQL_CHAR
Last_Name
SQL_CHAR
Salary
SQL_DECIMAL
ST_Date
SQL_DATE
End_Date
SQL_DATE
5.
6.
To create the second mapping, copy rows 3 through 8 from the Employee_Info worksheet to the second
worksheet.
7.
8.
In the Salary row, enter the following expression in the Transformation column to define a seven percent
increase in salary for all employees:
Salary + (Salary * .07)
9.
10.
29
11.
Validate that you have correctly entered all metadata in both worksheets.
Copy the mapping specification named HR_Data_Load.xls from the shared location to the following
directory on your local machine:
<PowerCenter Client installation directory>\bin\Sample Specifications
2.
In the Repository Manager, open the folder that you selected to store the imported PowerCenter objects.
3.
4.
For Source Tool, select Microsoft Office Excel and click Next.
The Microsoft Office Excel Options page appears.
5.
Description
File
File name for the mapping specification. Click the Value field to
locate and select the mapping specification that you created. For
example, select HR_Data_Load.xls.
Metamap associated with the template used to create the file. Click
the Value field to locate and select the XML version of the
associated metamap, source-target-matrix-metamap.xml.
Click Next.
The PowerCenter Options page appears.
7.
For export objects, select Sources, Targets, and Mappings to import the entire mapping.
8.
For Code Page, enter the name of the PowerCenter Repository Service code page.
For example, if the PowerCenter Repository Service uses the MS Windows Latin 1 (ANSI), superset of
Latin1 code page, enter the corresponding code page name MS1252. For a list of supported code page
names, see the PowerCenter Administrator Guide.
Use the default values of the remaining options.
30
9.
Click Next.
In the Import Results dialog box, a message appears if the export from the mapping specification is
successful. Error messages display when the export is not successful.
10.
Click Show Details to view log events. You can also click Save Log to save the log events to a file.
11.
Click Next.
The Selection dialog box displays the sources or targets in the mapping specification with all objects
selected by default.
12.
2.
3.
Click OK.
Step 5. Edit the PowerCenter Mappings and Generate Workflows
31
4.
Compare the Salary column in both tables to review the salary increases.
32
CHAPTER 6
Overview, 33
Exporting Mappings, 36
Troubleshooting, 37
Overview
You can use the PowerCenter Repository Manager to import the following information from a mapping
specification:
Source definitions
Target definitions
A single mapping
For example, a business analyst creates a mapping specification in Microsoft Excel to define a mapping that
includes sources, targets, and transformations. A PowerCenter developer imports the mapping specification to
create the PowerCenter objects.
You can use the PowerCenter Repository Manager to export the following information from a PowerCenter
repository to a mapping specification:
Source definitions
Target definitions
You might want to export PowerCenter objects to Microsoft Excel for the following reasons:
Several workflows are running in production. However, no documentation about these workflows or
mappings exists. A PowerCenter developer can export the mappings to mapping specifications for
documentation and business analyst review.
You are using Mapping Analyst for Excel to configure PowerCenter mappings, and the business analyst needs
to review the implementation of their mapping specifications. A PowerCenter developer can export the
mapping for a business analyst to review at any point in the development process.
Overview
33
Template
Source information.
Mapping
Source-Target-Matrix
Source definitions.
Mapping
Filter transformation.
Mapping
Joiner transformation.
Mapping
Mapping
Aggregator transformation.
Mapping
Source-Target-Matrix
Expression transformation.
Target information.
Mapping
Source-Target-Matrix
Target definitions.
Mapping
Source-Target-Matrix
After you import a mapping specification, review the imported objects. Most mappings imported from a
mapping specification require editing before validation.
To import a mapping specification:
1.
In the Repository Manager, open a folder and click Repository > Import Metadata.
The Tool Selection page appears.
2.
In the Source Tool field, select Microsoft Office Excel and click Next.
The Microsoft Office Excel Options page appears.
3.
34
Description
File
File name for the mapping specification. Click the Value field to locate
and select the mapping specification to import.
Option
Description
4.
5.
Click Next.
The PowerCenter Options page appears.
6.
Description
Export Objects
Objects you want to import into the PowerCenter repository. Select one
of the following options:
- Sources, targets, and mappings. Imports an entire mapping from the
mapping specification. Use for mapping specifications that describe
an entire mapping.
- Tables as sources. Imports all tables or files as sources.
- Tables as targets. Imports all tables or files as targets.
Default is Tables as sources.
Database type
Database name
Code page
Export metadata
extensions
7.
8.
Click Next.
In the Import Results dialog box, a message appears if the export from the mapping specification is
successful. Error messages appear when the export is not successful.
Click Show Details to view log events. You can also click Save Log to save the log events to a file.
9.
Click Next.
The Source Selection dialog box displays the sources or targets in the mapping specification with all objects
selected by default.
10.
Select the objects that you want to import and click Finish.
The Repository Service imports the metadata from the mapping specification.
If the import folder contains objects of the same name as those you are importing, the Conflict Resolution
Wizard displays. For more information about the conflict, click Compare Conflict.
Otherwise for each conflicting object, select the object and choose one of the following resolutions:
Rename. Change the object name when importing it to the target folder.
35
You can also apply the same resolution to all sources or to all conflicts.
11.
Click Next, and then click Close to close the Conflict Resolution Wizard.
Exporting Mappings
Use the Repository Manager to export objects from the PowerCenter repository to a mapping specification. You
can export sources and targets, or you can export a valid mapping.
Informatica provides mapping specification templates that organize the mapping metadata in different ways.
When you export a mapping to Microsoft Excel, use one of the following mapping specification templates:
Mapping template (with validation). Contains a single mapping configured on multiple worksheets for
overview information, sources, targets, and functions. Mapping specifications based on this template can
contain source and target data and Joiner, Lookup, Filter, Expression, and Aggregator transformations. This
template performs some validation of the metadata.
Mapping template (without validation). Is the same as the Mapping template (with validation). However,
this template does not perform validation of the metadata. Use this template if you want to avoid enabling
macros on your machine.
Source-Target-Matrix template. Can contain multiple mappings, each configured on a separate worksheet.
Mapping specifications based on this template can contain source and target data and Expression
transformations. If the mapping being exported contains additional transformations, use the Mapping
template.
Custom template. Contains a custom format. You can create a custom mapping specification template if you
want to use a format different from the Mapping Analyst for Excel templates.
The Repository Service exports only supported transformations. When you export a mapping that includes
other transformations, target definitions in the same pipeline might not contain all ports in the mapping
specification.
You can export a Lookup transformation that performs a lookup on a source definition. The Repository Service
does not export a Lookup transformation based on a lookup source that is not defined in the mapping.
To export PowerCenter repository objects to a mapping specification:
1.
In the Repository Manager, open a folder that contains the repository objects that you want to export.
2.
In the Navigator, select the mapping or set of sources or targets that you want to export.
3.
4.
For Target Tool, select Microsoft Office Excel and click Next.
The Microsoft Office Excel Options page appears.
36
5.
Description
File
Metamap associated with the mapping specification template you want to use.
Click the Value field to locate and select one of the following metamaps:
- MappingTemplate-MetaMap.xml. Select if using the Mapping template with or
without validation. Exports the mapping to a Microsoft Excel file with multiple
worksheets for overview information, sources, targets, and functions.
- source-target-matrix-metamap.xml. Select if using the Source-Target-Matrix
template. Exports the mapping to a Microsoft Excel file on a single worksheet.
- <custom-metamap>.xml. If using a custom mapping specification template,
select the name of the associated custom metamap.
Mapping specification template. Click the Value field to locate and select one of
the following mapping specification template files:
- MappingTemplate.xls. Select if using the Mapping template and you want to
validate the metadata.
- MappingTemplate_NoValidation.xls. Select if using the Mapping template and
you do not want to enable macros to validate the metadata.
- source-target-matrix-mirrepeatingsheet.xls. Select if using the Source-TargetMatrix template.
- <custom-template>.xls. If using a custom mapping specification template,
select the name of the custom template.
6.
7.
Click Export.
In the Export Results dialog box, a message appears if the export is successful. Error messages display when
the export is not successful.
Click Show Details to view log events. You can also click Save Log to save the log events to a log file.
8.
Click Finish.
Troubleshooting
I have several mappings in a single file. Each mapping uses the same template and is on a single worksheet. However,
I cannot import the mapping specification.
Verify that the Source-Target-Matrix repeating sheet file and metamap are configured correctly. The metamap
must reference fields in the Source-Target-Matrix repeating sheet file.
I receive the following error when I import a mapping specification:
This workbook contains links to other data sources....
The metamap references an unrelated mapping specification template. Update the metamap and import the
mapping specification again.
The following error message appears in the log when I import a mapping specification:
To avoid potential complications with metadata mapping, it is strongly recommended to use
metadata mapping file in XML format.
Troubleshooting
37
When you imported the mapping specification, you selected a metamap in Microsoft Excel format. Save the
metamap as an XML file and import the mapping specification again.
I used the Mapping template to export a mapping that contains an Aggregator transformation. However, the exported
mapping specification does not include the aggregate expression on the Target worksheet.
In the Designer, verify that the expression port in the Aggregator transformation is connected to a mapping
target. To export an aggregate expression to a mapping specification, the expression port in the Aggregator
transformation must be connected to a mapping target.
38
CHAPTER 7
Overview, 39
Associating the Metamap with the Custom Template or Repeating Sheet File, 42
Overview
Create a custom mapping specification template and associated metamap if you want to use a format different
from the Mapping Analyst for Excel templates. After you configure a custom mapping specification template
and the associated metamap, you can use the custom mapping specification template to configure a mapping
specification.
To create a custom mapping specification template and associated metamap, complete the following steps:
1.
2.
3.
Associate the metamap with the custom mapping specification template or repeating sheet file.
4.
Configure the Model, Source, Target, and Mapping worksheets in the metamap.
5.
6.
Metamap Hierarchy
The metamap divides the mapping specification metadata into a hierarchy for sources, targets, transformations,
and mappings. The metamap contains a worksheet for each object in the hierarchy. When you import the
mapping specification, the Repository Service imports the metadata in the file starting at the top of the
hierarchy.
Overview
39
The following figure shows the Mapping Analyst for Excel metadata hierarchy:
Model
Target Data
Packages
Source Data
Packages
Source
Schemas
Target
Target
Schemas
Schemas
Mapping Design
Packages
Transformation
Tasks
Target
Classes
Source
Classes
Filters
Target
Target
Attributes
Attributes
Source
Attributes
Source
DataTypes
Lookups
Target
DataTypes
Joins
Feature Maps
The metamap hierarchy contains parent and child objects. If you configure a child object, you must also
configure the parent object on its corresponding worksheet. For example, a source schema is a child object of a
source data package and a model. If you configure a source schema, you also must configure a data package and
a model.
Each metamap worksheet describes metadata for objects at that level and identifies all parent objects. For
example, the SourceSchemas worksheet describes the source schema and identifies its parent source data
package and parent model.
When you modify the associated metamap to reflect the changes made to a custom mapping specification
template, you edit the metamap worksheets for the metadata type that you modified. For example, if you
modify the source metadata in a custom version of the Mapping template, you modify the source and mapping
worksheets in the metamap. You do not modify the target worksheets.
Mapping Analyst for Excel requires you to create some objects that are part of the metadata hierarchy that
PowerCenter does not import. For example, the Repository Service does not import the Model and Data
Package name. You can enter constant values for these objects in the metamap if the mapping specification does
not contain values.
The following table describes the metamap worksheet types and how the Repository Service reads each
worksheet type:
40
Worksheet Type
Worksheet Names
Description
Overview
Overview
Model
Models
Source
SourceDataPackages
SourceSchemas
SourceClasses
SourceAttributes
SourceDatatypes
Worksheet Type
Worksheet Names
Description
Target
TargetDataPackages
TargetSchemas
TargetClasses
TargetAttributes
TargetDatatypes
Mapping
MappingDesignPackages
TransformationTasks
Filters
Lookups
Joins
FeatureMaps
System Types
MITI_SystemTypes
Data Types
MITI_DataTypes
Decide on a mapping structure before you design the template. One or two templates and associated
metamaps are more efficient than multiple templates and associated metamaps for each mapping.
Create separate fields for different types of metadata. This allows you to match each field to different parts of
the metamap.
Configure names for the mapping, sources, targets, or transformations in the mapping specification or as
constants in the metamap.
Edit the metamap to reflect the custom mapping specification template structure. To avoid confusion,
complete the template design before you configure the metamap.
Copy, rename, and modify the Mapping template. Copy and rename MappingTemplate.xls or
MappingTemplate_NoValidation.xls, depending on whether you want to use a template with or without
validation. Use Microsoft Excel to modify the renamed mapping specification template by adding or
deleting columns.
Copy, rename, and modify the Source-Target-Matrix template and repeating sheet file. Copy and rename
source-target-matrix.xls and source-target-matrix-mirrepeatingsheet.xls. Use Microsoft Excel to modify the
renamed mapping specification template and repeating sheet file by adding or deleting columns.
The repeating sheet file defines the common structure for multiple mappings defined in a mapping
specification that is based on the Source-Target-Matrix template. When you modify a custom version of the
Source-Target-Matrix template, you must make the same changes to a custom version of the Source-TargetMatrix repeating sheet file. The Source-Target-Matrix metamap uses the Source-Target-Matrix repeating
sheet file to define the location of metadata in the Source-Target-Matrix mapping specification template.
Create a new template. Use Microsoft Excel to create a new spreadsheet if the metadata format that you
want to use differs significantly from the Informatica mapping specification templates.
41
The original mapping specification templates and the Source-Target-Matrix repeating sheet file are located in
the following directory:
<PowerCenter Client installation directory>\bin\Sample Specifications
Note: A metamap uses relative links to find the location of metadata in a mapping specification. To avoid broken
links, use Windows Explorer to copy the templates. Do not use the Save As menu option in Microsoft Excel.
Note: A metamap uses relative links to find the location of metadata in a mapping specification. To avoid broken
links, use Windows Explorer to copy the templates. Do not use the Save As menu option in Microsoft Excel.
Mapping metamap. Reads from the Mapping template to determine the structure of the mapping. When
you rename the Mapping template, you must associate the metamap with the new name to maintain the
metamap links to the mapping specification template.
Source-Target-Matrix metamap. Reads from the Source-Target-Matrix repeating sheet file to determine the
structure of the mapping on each worksheet of a mapping specification that is based on the Source-TargetMatrix template. When you rename the repeating sheet file, you must associate the metamap with the new
repeating sheet file name to maintain the metamap links to the repeating sheet file.
To associate the metamap with the mapping specification template or repeating sheet file:
1.
2.
3.
When a message box states that the metamap contains links to other data sources, click Update.
A message states that one or more links cannot be updated.
4.
42
6.
Select the custom mapping specification template or repeating sheet file, and click OK.
7.
8.
Excel Table Parameters. First and last lines to process in the mapping specification template.
User-Defined Properties. The location of user-defined properties in the mapping specification template.
When you configure each section, you modify the location of metadata in the mapping specification template.
Note: When Hide Special Fields is selected in a metamap worksheet, the worksheet hides internal cells needed
for proper functioning of the metamap. If you clear this option, do not modify the internal cells.
43
On each worksheet for the model, sources, targets, and mappings in the metamap, configure the following Excel
Table Parameters for the first and last lines:
Parameter
Description
How to Detect
Detection Parameter
Indicates a cell or line where the Repository Service starts or stops processing the
mapping specification. Enter one of the following options:
- Cell Location. The location of a cell where the Repository Service starts or stops
processing lines on the mapping specification worksheet. Required if the processing
is configured for an exact line. To add the cell location, see Modifying the Cell
Location of Metadata on page 46.
- Number of Lines. The number of empty lines to read before the Repository Service
stops processing the mapping specification worksheet. Required if the processing is
configured to stop when a number of empty lines are read.
Required Properties
When you configure the required properties, you define the location of the metadata in the mapping
specification template.
The Repository Service reads the metamap and imports the metadata from the mapping specification according
to the metamap hierarchy. The metamap hierarchy contains parent and child objects. The Required Properties
section on each metamap worksheet describes metadata for objects at that level and identifies all parent objects.
For example, the SourceSchemas worksheet contains a data package and model name for the schema. The data
package and model are the parent objects in the metadata hierarchy. If the mapping specification contains more
than one data package, the Repository Service chooses the first data package name from the mapping
specification as the parent.
The following figure shows the parent object properties configured in the SourceSchemas worksheet:
44
The following table describes the parameters for the required properties:
Parameter
Description
Style
Determines whether metadata occurs in more than one cell in the mapping specification
template. Select one of the following options:
- Column. Metadata occurs more than once in a column of the mapping specification
template. When you configure a reference to a column, the Repository Service
processes each row in the column. The column can have empty rows.
- Cell. Metadata is in one cell in the mapping specification template.
Metadata field
Name of the metadata property. For a list of the metadata fields on each worksheet, see
Metamap Worksheets on page 59.
If Empty
Determines how the Repository Service processes a blank metadata property. Select
one of the following options:
- Print a warning and then take a default action. The Repository Service uses the
default value or the default parent.
- Skip the row. The Repository Service does not create metadata for the metadata field.
- Stop the import. The Repository Service does not import the mapping specification
into the repository.
Reference to Data
Contains a constant value or the location of a cell in the mapping specification template.
To add the cell location, see Modifying the Cell Location of Metadata on page 46.
Validation
Displays one of the following values based on the Reference to Data parameter:
- Constant. The Reference to Data column contains a constant value.
- Reference. The Reference to Data column contains a cell location.
- Invalid. The Reference to Data column contains invalid values.
This parameter is updated to indicate the value of the Reference to Data parameter
when you save the metamap. You must correct the Reference to Data parameter if this
value is invalid.
User-Defined Properties
You can optionally configure user-defined properties to add metadata not defined in the metamap. When you
import the mapping specification, the Repository Service creates the property as a metadata extension.
The mapping specification templates do not contain a column to add user-defined properties. If you want to
add the properties to a mapping specification template, modify the template to add a column that contains the
metadata for the user-defined property.
The following table describes the parameters you can configure for user-defined properties:
Parameter
Description
Name Style
Determines whether the name of the user-defined property occurs in more than one cell
in the mapping specification template. Select one of the following options:
- Column. Metadata occurs more than once in a column of the mapping specification
template. When you configure a reference to a column, the Repository Service
processes each row in the column. The column can have empty rows.
- Cell. Metadata is in one cell in the mapping specification template.
Name Reference or
Constant
Defines the name of the user-defined property. Contains a constant value or the
location of a cell in the mapping specification template. To add the cell location, see
Modifying the Cell Location of Metadata on page 46.
Value Style
Determines whether the value of the user-defined property occurs in more than one cell
in the mapping specification template. Select one of the following options:
- Column. Metadata occurs more than once in a column of the mapping specification
template. When you configure a reference to a column, the Repository Service
processes each row in the column. The column can have empty rows.
- Cell. Metadata is in one cell in the mapping specification template.
Value Reference or
Constant
Defines the value of the user-defined property. Contains a constant value or the
location of a cell in the mapping specification template. To add the cell location, see
Modifying the Cell Location of Metadata on page 46.
45
Parameter
Description
Type
Defines the datatype of the user-defined property. Select one of the following datatypes:
- String
- Number
- Date
- Boolean
If Empty
Determines how the Repository Service processes a blank metadata property. Select
one of the following options:
- Print a warning and then take a default action. The Repository Service uses the
default value or the default parent.
- Skip the row. The Repository Service does not create metadata for the metadata field.
- Stop the import. The Repository Service does not import the mapping specification
into the repository.
Default Value
Default value of the property if the mapping specification does not contain a value for
the property.
Validation
Displays one of the following values based on the Reference to Data parameter:
- Constant. The Reference to Data column contains a constant value.
- Reference. The Reference to Data column contains a cell location.
- Invalid. The Reference to Data column contains invalid values.
This parameter is updated to indicate the value of the Reference to Data parameter
when you save the metamap. You must correct the Reference to Data parameter if this
value is invalid.
Mapping specification template name. Name of the mapping specification template that corresponds to the
metamap.
Cell location. Row and column in the worksheet that contains the metadata.
When you select a reference cell in the metamap, the function bar in Excel contains the mapping specification
template name, the worksheet name, and the cell location.
46
The following figure shows the Required Properties section of a SourceClasses metamap worksheet with the
Class Name Reference to Data cell selected:
Location of Metadata in the
Mapping Specification
Template
The function bar shows the following value of the Class Name Reference to Data cell:
=[MappingTemplate.xls]Source!$C$3
The following figure shows the corresponding section of the mapping specification template:
Mapping specification template. Use if your custom metamap is based on the Mapping metamap.
Repeating sheet file. Use if your custom metamap is based on the Source-Target-Matrix metamap.
Open the mapping specification template or repeating sheet file and the metamap.
2.
In the mapping specification template or repeating sheet file, navigate to the cell for the metadata that you
need to reference in the metamap.
3.
4.
5.
Reference to Data cell for the appropriate Metadata Field in the Required Properties section
Model, Source, Target, and Mapping Worksheet Types in the Metamap
47
6.
The metamap stores the location of the property in the mapping specification template or repeating sheet file.
The location includes the name of the mapping specification template or repeating sheet file and the worksheet
name that contains the cell.
Import Parameters
The following table describes the parameters you configure to import a mapping specification into the
PowerCenter repository:
48
Parameter
Description
Merge objects with the same name in the mapping specification. Select one of
the following options:
- True. Merge objects with the same name.
- False. Keep all objects. Use this option when the mapping specification includes
different objects with the same name.
Default is True.
Action to take when the mapping specification contains two or more sources
without a join expression. Select one of the following options:
- Add joins if needed. Adds a Joiner transformation to the mapping.
- Add union if needed. Use separate pipelines for sources.
- Do not change. Do not add a join or a union.
Default is Add joins if needed.
Print warnings in the Import Metadata wizard when rows are skipped. The Import
Wizard displays errors when you import mapping specifications. Select one of the
following options:
- True. Print warnings for skipped rows.
- False. Do not print warnings for skipped rows.
Default is False.
Export Parameters
The following table describes the parameters you configure to export a mapping from the PowerCenter
repository to a mapping specification:
Parameter
Description
Draw borders
Draws the bottom rule for each row in the mapping specification. Select one of
the following options:
- True. Draws a bottom rule for each row.
- False. Does not draw rules.
Default is True.
Export source or target definitions that appear in the mapping but are not used.
Applies when the template type option in the metamap is configured for
mappings. Select one of the following options:
- True. Exports all supported information.
- False. Does not export information that is not used in the mapping.
Default is True.
49
50
1.
2.
3.
Click Save.
CHAPTER 8
Overview, 51
Step 1. Copy the Mapping Specification Template, Repeating Sheet File, and Metamap, 52
Step 3. Edit the Mapping Specification Template and the Repeating Sheet File, 53
Overview
As a business analyst, you want to create multiple mappings in a single mapping specification. You can use the
Source-Target-Matrix template to create multiple mappings on separate worksheets. When you import mapping
specifications based on the Source-Target-Matrix template, the Repository Service uses the worksheet name for
both the mapping and target definition names. However, you want to use the names of the target database
tables for the target definition names in the mapping.
The Source-Target-Matrix template does not include a target name column. To add a target name column to
the template, configure a custom mapping specification template based on the Source-Target-Matrix template.
To customize the Source-Target-Matrix mapping specification template, copy and modify the following files:
To customize the Source-Target-Matrix mapping specification template, complete the following steps:
1.
Copy the mapping specification template, repeating sheet file, and the metamap.
2.
3.
Edit the mapping specification template and the repeating sheet file.
Overview
51
4.
For example, you can give the copied files the following names:
custom-source-target-matrix.xls
custom-stm-mirrepeatingsheet.xls
custom-stm-metamap.xls
2.
If a security warning appears to warn against using macros, click Enable Macros to enable the validation
macros.
3.
When a message box states that the metamap contains links to other data sources, click Update.
A message states that one or more links cannot be updated.
4.
52
5.
6.
7.
8.
2.
3.
4.
5.
6.
7.
8.
Repeat steps 2 through 6 to add a target name column to the following worksheets:
mapping1
mapping2
mapping3
Step 3. Edit the Mapping Specification Template and the Repeating Sheet File
53
For example, in the original Source-Target-Matrix mapping specification template and repeating sheet file,
target field and column data is located in columns F through L. In the modified Source-Target-Matrix mapping
specification template and repeating sheet file, column F contains target table and file information, and field
and column data begins in column G. The location of all remaining columns changed.
Complete the following tasks to edit the metamap to reflect the changes to the target metadata:
1.
2.
3.
4.
2.
In the repeating sheet file, navigate to the first cell in the new Target File/Table column, cell F3.
3.
4.
5.
In the Excel Table Parameters section, right-click the First Line Detection Parameter cell and click Paste >
Special.
6.
Location of metadata in
the repeating sheet file
7.
Set the Last Line How to Detect cell to Count of Empty Lines.
8.
9.
54
In the Required Properties section, set the Class Name Style cell to Column.
10.
In the repeating sheet file, navigate to the first cell in the new Target File/Table column, cell F3.
11.
12.
13.
In the Class Name Reference to Data cell, right-click and choose Paste Special.
14.
In the repeating sheet file, navigate to the first cell in the new Target File/Table column, cell F3.
2.
3.
4.
On the TargetAttributes worksheet, set the Class Name Style cell to Column.
5.
In the Class Name Reference to Data cell, right-click and choose Paste Special.
6.
55
The following figure shows the modified Class Name Reference to Data cell on the TargetAttributes
worksheet:
8.
Location of metadata in
the repeating sheet file
Repeat steps 1 through 6 for each target column in the repeating sheet file as described in the following
table:
Target Column in
Repeating Sheet File
Copy
Start Cell
Metamap
Worksheet
Field/Column
G3
TargetAttributes
Field/Column Datatype
Native Name
H3
TargetAttributes
Field/Column Datatype
I3
TargetAttributes
Length
J3
TargetAttributes
Scale
K3
TargetAttributes
Description
L3
TargetAttributes
Notes
M3
TargetAttributes
In the repeating sheet file, navigate to the first cell in the new Target File/Table column, cell F3.
2.
3.
4.
In the Feature Map Target Class Name Reference to Data cell, right-click and choose Paste Special.
5.
56
6.
In the repeating sheet file, navigate to the first cell in the new Target Field/Column column, cell G3.
7.
8.
9.
In the Feature Map Target Attribute Name Reference to Data cell, right-click and choose Paste Special.
10.
Location of metadata in
the repeating sheet file
2.
3.
Click Save.
You can now use the new mapping specification template and metamap to create and import mappings that
include user-defined names for target definitions.
57
58
APPENDIX A
Metamap Worksheets
This appendix includes the following topics:
Overview Worksheet, 59
Models Worksheet, 59
Mapping Worksheets, 62
MITI_SystemTypes Worksheet, 64
MITI_DataTypes Worksheet, 64
Overview Worksheet
The Overview worksheet in a metamap contains options that determine how the Repository Service imports
and exports metadata and the template type you want to use.
You can configure the import and export parameters. The import parameters determine how the Repository
Service imports the metadata in the mapping specification. The export parameters determine how the
Repository Service exports metadata from the repository to a mapping specification.
Select one of the following template types from the Overview worksheet:
Mapping. Select to configure sources, targets, and mappings in a mapping specification. When selected, the
metamap displays all worksheets.
Data Dictionary. Select to configure source tables or files in a mapping specification. When selected, the
metamap displays source worksheets only.
Models Worksheet
The Models worksheet in a metamap contains references to the entity that contains all metadata. The metadata
fields in the Required Properties section contain the metadata references. The Mapping metamap and the
Source-Target-Matrix metamap do not use all of the metadata fields in the Models worksheet.
Overview Worksheet
59
The following table describes the metadata fields in the Models worksheet that the Informatica metamaps use:
Metadata Field
Used by Metamap
Usage
Model Name
Mapping
Source-Target-Matrix
DataPackages Worksheets
The SourceDataPackages and TargetDataPackages worksheets contain references to the type of the source or
target database or file system, such as Oracle, DB2, or flat file.
The following table describes the metadata fields in the SourceDataPackages and TargetDataPackages
worksheets that the Informatica metamaps use:
Metadata Field
Used by Metamap
Usage
Package Name
Mapping
Source-Target-Matrix
Package
Description
Mapping
System Type
Mapping
Source-Target-Matrix
Schemas Worksheets
The SourceSchemas and TargetSchemas worksheets contain references to the name of the source or target
database or file system.
The following table describes the metadata fields in the SourceSchemas and TargetSchemas worksheets that the
Informatica metamaps use:
Metadata Field
Used by Metamap
Usage
Package Name
Mapping
Schema Name
Mapping
Source-Target-Matrix
Schema Comment
Mapping
Classes Worksheets
The SourceClasses and TargetClasses worksheets contain references to source and target tables and files.
60
The following table describes the metadata fields in the SourceClasses and TargetClasses worksheets that the
Informatica metamaps use:
Metadata Field
Used by Metamap
Usage
Package Name
Mapping
Schema Name
Mapping
Class Name
Mapping
Source-Target-Matrix
Class Physical
Name
Mapping
Class Description
Mapping
Attributes Worksheets
The SourceAttributes and TargetAttributes worksheets contain references to fields or columns in a relational
table or file.
The following table describes the metadata fields in the SourceAttributes and TargetAttributes worksheets that
the Informatica metamaps use:
Metadata Field
Used by Metamap
Usage
Package Name
Mapping
Schema Name
Mapping
Class Name
Source-Target-Matrix
Class Physical
Name
Mapping
Attribute Name
Mapping
Source-Target-Matrix
Attribute Physical
Name
Mapping
Column name.
Attribute
Description
Mapping
Source-Target-Matrix
Attribute Comment
Source-Target-Matrix
Source-Target-Matrix
Data Type
Mapping
Source-Target-Matrix
Mapping
Source-Target-Matrix
Mapping
Source-Target-Matrix
DataTypes Worksheets
The SourceDataTypes and TargetDataTypes worksheets contain references to datatype definitions. Configure
the datatypes worksheets when you define enumerated data types in a mapping specification template.
61
The Mapping and Source-Target-Matrix mapping specification templates do not include enumerated data
types. As a result, the associated metamaps do not use the datatypes worksheets.
Mapping Worksheets
The mapping worksheets in a metamap contain references to the location of mapping and transformation
metadata, including how to connect the source and target columns. The Repository Service reads each
worksheet in the hierarchy to create a mapping.
The metadata fields in the Required Properties section contain the metadata references. The Mapping metamap
and the Source-Target-Matrix metamap do not use all of the metadata fields in the mapping worksheets.
MappingDesignPackages Worksheet
The MappingDesignPackages worksheet contains references to the entity that contains all mapping metadata.
The following table describes the metadata field in the MappingDesignPackages worksheet that the Informatica
metamaps use:
Metadata Field
Used by Metamap
Usage
Package Name
Mapping
Source-Target-Matrix
TransformationTasks Worksheet
The TransformationTasks worksheet contains references to the mapping name.
The following table describes the metadata fields in the TransformationTasks worksheet that the Informatica
metamaps use:
Metadata Field
Used by Metamap
Usage
Package Name
Mapping
Transformation
Task Name
Mapping
Source-Target-Matrix
Mapping name.
Filters Worksheet
The Filters worksheet contains references to expressions to filter source data.
The following table describes the metadata fields in the Filters worksheet that the Informatica metamaps use:
62
Metadata Field
Used by Metamap
Usage
Filter Condition
Mapping
Filter condition.
Transformation
Source Schema
Name
Mapping
Transformation
Source Class
Physical Name
Mapping
Lookups Worksheet
The Lookups worksheet contains references to expressions that return data from a lookup source.
The following table describes the metadata fields in the Lookups worksheet that the Informatica metamaps use:
Metadata Field
Used by Metamap
Usage
Lookup Condition
Mapping
Lookup condition.
Transformation
Source Schema
Name
Mapping
Transformation
Source Class
Physical Name
Mapping
Joins Worksheet
The Joins worksheet contains references to metadata that joins two source definitions.
The following table describes the metadata fields in the Joins worksheet that the Informatica metamaps use:
Metadata Field
Used by Metamap
Usage
Join Type
Mapping
Type of join.
Left Attribute
Schema Name
Mapping
Mapping
Left Attribute
Physical Name
Mapping
Right Attribute
Schema Name
Mapping
Right Attribute
Class Physical
Name
Mapping
Right Attribute
Physical Name
Mapping
FeatureMaps Worksheet
The FeatureMaps worksheet contains references to the following mapping operations:
The following table describes the metadata fields in the FeatureMaps worksheet that the Informatica metamaps
use:
Metadata Field
Used by Metamap
Usage
Source-Target-Matrix
Mapping
Source-Target-Matrix
Mapping
Mapping Worksheets
63
Metadata Field
Used by Metamap
Usage
Source-Target-Matrix
Source-Target-Matrix
Mapping
Source-Target-Matrix
Mapping
Source-Target-Matrix
Mapping
Mapping
MITI_SystemTypes Worksheet
The MITI_SystemTypes worksheet lists the file and relational source and target types that Mapping Analyst for
Excel supports.
MITI_DataTypes Worksheet
The MITI_DataTypes worksheet lists native datatypes and the corresponding Mapping Analyst for Excel
datatypes.
For more information, see Mapping Analyst for Excel Datatypes on page 8.
64
APPENDIX B
Glossary
This appendix includes the following topic:
A Microsoft Excel file that contains mapping metadata to import into the PowerCenter repository. The
mapping metadata can include sources, targets, and transformations. Each mapping specification requires an
associated metamap.
mapping specification template
Microsoft Excel files installed with the PowerCenter Client that define the structure for a mapping
specification. Use a mapping specification template as a starting point to create a mapping specification.
metamap
A Microsoft Excel or XML file that contains a hierarchical representation of the metadata in a mapping
specification. The metamap contains import and export options and cell references to metadata in a mapping
specification.
repeating sheet file
A Microsoft Excel file that defines the common structure for multiple mappings defined in a mapping
specification that is based on the Source-Target-Matrix mapping specification template.
65
66
Appendix B: Glossary
INDEX
A
Aggregator transformation
configuring in mapping specification 11
C
custom
mapping specification template 41
metamap 39
repeating sheet file 41
importing
from Microsoft Excel, process 2
mapping specifications 34
J
Joiner transformation
configuring in mapping specification 9
Joins worksheet
metamap 63
datatypes
defining in mapping specification 8, 24, 25
defining in metamap 61
Lookup transformation
configuring in mapping specification 10
Lookups worksheet
metamap 63
Main worksheet
Mapping template 6
Mapping Analyst for Excel
components 1
datatypes 8
example multiple mappings 27
example one mapping 15
metamap hierarchy 39
overview 1
process 2
templates 3
mapping specification
configuring multiple mappings 23
configuring single mapping 5
creating custom templates 41
custom example 51
defining datatypes 8, 24, 25
definition 1
exporting to 36
importing 34
multiple mappings example 27
one mapping example 15
mapping specification templates
custom 39, 41
definition 3
example 15, 27
using 5, 23
F
FeatureMaps worksheet
metamap 63
Filter transformation
configuring in mapping specification 11
Filters worksheet
metamap 62
functions
adding to mapping specification 9
Functions worksheet
Mapping template 9
I
import parameters
metamap 48
67
Mapping template
adding functions 9
Aggregator transformation 11
configuring transformations 9
description 3
example 15
Expression transformation 12
Filter transformation 11
Functions worksheet 9
Joiner transformation 9
joining source data 9
Lookup transformation 10
Main worksheet 6
Source worksheet 7
Target worksheet 7
using 5
validating 12
mapping worksheets
metamap 62
MappingDesignPackages worksheet
metamap 62
metadata
metamap hierarchy 39
referencing in metamap 46
metamap
associating with template 42
creating custom 39
custom example 51
defining datatypes 61
definition 2
editing 43
editing example 53
Excel table parameters 43
export parameters 49
FeatureMaps worksheet 63
Filters worksheet 62
hierarchy 39
import parameters 48
Joins worksheet 63
Lookups worksheet 63
mapping worksheets 62
MappingDesignPackages worksheet 62
metadata hierarchy 39
MITI_DataTypes worksheet 64
MITI_SystemTypes worksheet 64
Models worksheet 59
Overview worksheet 59
referencing metadata 44, 46
required properties 44
source worksheets 60
SourceAttributes worksheet 61
SourceClasses worksheet 60
SourceDataPackages worksheet 60
SourceDataTypes worksheet 61
SourceSchemas worksheet 60
target worksheets 60
TargetAttributes worksheet 61
TargetClasses worksheet 60
TargetDataPackages worksheet 60
TargetDataTypes worksheet 61
TargetSchemas worksheet 60
TransformationTasks worksheet 62
user-defined properties 45
68
Index
XML version 49
Microsoft Excel
creating PowerCenter metadata 1
exporting to 36
importing from 34
MITI_DataTypes worksheet
metamap 64
MITI_SystemTypes worksheet
metamap 64
Models worksheet
metamap 59
multiple mappings
creating a single mapping specification 23
multiple sources
configuring in mapping specification 9
O
Overview worksheet
metamap 59
R
Reference to Data
metamap column 44
repeating sheet file
custom 41
description 3
editing example 53
required properties
metamap 44
S
Source worksheet
Mapping template 7
source worksheets
metamap 60
SourceAttributes worksheet
metamap 61
SourceClasses worksheet
metamap 60
SourceDataPackages worksheet
metamap 60
SourceDataTypes worksheet
metamap 61
sources
configuring in mapping specification 7, 9, 24
SourceSchemas worksheet
metamap 60
Source-Target-Matrix template
customizing 51
description 3
example 27
Expression transformation 25
sources 24
targets 25
using 23
T
Target worksheet
Mapping template 7
target worksheets
metamap 60
TargetAttributes worksheet
metamap 61
TargetClasses worksheet
metamap 60
TargetDataPackages worksheet
metamap 60
TargetDataTypes worksheet
metamap 61
targets
configuring in mapping specification 7, 25
TargetSchemas worksheet
metamap 60
templates
custom mapping specification 39
mapping specification 3
transformations
configuring in mapping specification 9, 25
TransformationTasks worksheet
metamap 62
U
user-defined properties
metamap 45
V
validation
Mapping template 12
X
XML spreadsheet
metamap 49
Index
69
70
Index
NOTICES
This Informatica product (the Software) includes certain drivers (the DataDirect Drivers) from DataDirect Technologies, an operating company of Progress Software Corporation (DataDirect)
which are subject to the following terms and conditions:
1. THE DATADIRECT DRIVERS ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
2. IN NO EVENT WILL DATADIRECT OR ITS THIRD PARTY SUPPLIERS BE LIABLE TO THE END-USER CUSTOMER FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
CONSEQUENTIAL OR OTHER DAMAGES ARISING OUT OF THE USE OF THE ODBC DRIVERS, WHETHER OR NOT INFORMED OF THE POSSIBILITIES OF DAMAGES IN
ADVANCE. THESE LIMITATIONS APPLY TO ALL CAUSES OF ACTION, INCLUDING, WITHOUT LIMITATION, BREACH OF CONTRACT, BREACH OF WARRANTY,
NEGLIGENCE, STRICT LIABILITY, MISREPRESENTATION AND OTHER TORTS.