Escolar Documentos
Profissional Documentos
Cultura Documentos
INFORMATICA POWERCENTER 6
INFORMATICA POWERMART 6
(VERSION 6.0)
The Apache Software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was
originally based on software copyright (c) 1999, International Business Machines, Inc.,
http://www.ibm.com. For more information on the Apache Software foundation, please see http://www.apache.org/.
DISCLAIMER: Informatica Corporation provides this documentation as is without warranty of any kind, either express or implied,
including, but not limited to, the implied warranties of non-infringement, merchantability, or use for a particular purpose. The information
provided in this documentation may include technical inaccuracies or typographical errors. Informatica could make improvements and/or
changes in the products described in this documentation at any time without notice.
Table of Contents
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
New Features and Enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiv
Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiv
Informatica Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
Metadata Reporter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvi
Repository Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvi
Repository Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvi
Transformation Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvii
Workflow Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvii
About Informatica Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
About this Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxi
About PowerCenter and PowerMart . . . . . . . . . . . . . . . . . . . . . . . . . . xxxi
Document Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxii
Other Informatica Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiii
Accessing the Informatica Webzine . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiii
Visiting the Informatica Web Site . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiii
Visiting the Informatica Developer Network . . . . . . . . . . . . . . . . . . . xxxiii
Obtaining Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiv
iii
Creating a Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Customizing a Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Adding Custom Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Navigating the Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Search Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Iconizing and Restoring Workspace Objects . . . . . . . . . . . . . . . . . . . . . 20
Arranging Objects in the Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Zooming the Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Viewing the Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Designer Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Adding a Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Printing the Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Viewing the Last Saved Date/Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Opening and Closing a Folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Creating Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Entering Descriptions for Repository Objects . . . . . . . . . . . . . . . . . . . . 25
Reverting to a Previous Object Version . . . . . . . . . . . . . . . . . . . . . . . . . 25
Copying Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Exporting and Importing Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Working with Multiple Ports or Columns . . . . . . . . . . . . . . . . . . . . . . . 27
Renaming Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Using Shortcut Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Working with Metadata Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Creating a Metadata Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Editing a Metadata Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Deleting a Metadata Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Viewing Object Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Using Business Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Adding Business Names to Sources or Targets . . . . . . . . . . . . . . . . . . . . 37
Displaying Business Names in the Navigator . . . . . . . . . . . . . . . . . . . . . 37
Displaying Business Names as Column Names . . . . . . . . . . . . . . . . . . . 38
Using Business Names as Port Names in Source Qualifiers . . . . . . . . . . . 38
Using Business Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Specifying the Documentation Path . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Creating Links to Documentation Files . . . . . . . . . . . . . . . . . . . . . . . . . 40
Viewing Business Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
iv
Table of Contents
Defining Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Creating a Target Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
SQL DDL Commands in the Designer . . . . . . . . . . . . . . . . . . . . . . . . . 87
Dropping and Recreating Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Recreating Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
vi
Table of Contents
Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Cardinality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Sources of Metadata in XML, DTD, and XML Schema Files . . . . . . . . 138
Fixed and Variable Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Element Type ANY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
XML Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Rules for a Valid Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Normalized Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Denormalized Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Group Keys and Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Default XML Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Normalized Default Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Denormalized Default Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Normalized Default Target Groups from Relational Tables . . . . . . . . . . 153
Default Group Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Custom XML Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Custom Group Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Groups At Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
XML Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Pivoting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Code Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Table of Contents
vii
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
viii
Table of Contents
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Table of Contents
ix
Table of Contents
Table of Contents
xi
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
xii
Table of Contents
. . . . . . . . . . . . . . . . . . . . . . . 412
Table of Contents
xiii
. . . . . . . . . . . . . . . . . . . . . . . . 435
xiv
Table of Contents
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
Table of Contents
xv
xvi
Table of Contents
List of Figures
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
...... 3
...... 4
. . . . . 12
. . . . . 12
. . . . . 12
. . . . . 12
. . . . . 12
. . . . . 13
. . . . . 13
. . . . . 15
. . . . . 23
. . . . . 35
. . . . . 36
. . . . . 38
. . . . . 41
. . . . . 45
. . . . . 59
. . . . . 60
. . . . . 61
. . . . . 75
. . . . . 75
. . . . . 81
. . . . . 83
. . . . . 85
. . . . 104
. . . . 106
. . . . 108
. . . . 108
. . . . 112
. . . . 112
. . . . 118
. . . . 120
. . . . 120
. . . . 121
. . . . 123
. . . . 124
. . . . 125
. . . . 133
. . . . 136
. . . . 137
List of Figures
xvii
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
xviii
List of Figures
.139
.140
.141
.142
.148
.149
.150
.151
.152
.152
.152
.154
.155
.158
.159
.159
.160
.161
.163
.187
.203
.210
.211
.212
.220
.221
.229
.230
.231
.234
.236
.237
.238
.243
.248
.256
.257
.258
.259
.262
.266
.266
.270
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
271
275
278
279
281
282
282
283
289
294
294
295
301
313
314
321
328
329
330
333
333
335
335
339
340
341
342
342
343
344
345
346
352
353
355
358
360
361
362
363
377
379
380
List of Figures
xix
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
xx
List of Figures
List of Tables
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
. 29
. 31
. 34
. 35
. 41
. 45
. 59
. 61
. 78
109
111
113
116
136
143
195
252
258
261
265
267
269
272
276
308
312
317
319
332
334
343
344
348
356
358
379
381
382
393
393
List of Tables
xxi
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
xxii
List of Tables
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.413
.432
.433
.436
.440
.446
.446
.447
.454
.454
.455
.463
.464
.464
.465
.471
.472
.472
.473
.479
.479
.480
.489
.491
.491
.495
.496
.497
.498
.499
.500
.500
.501
.502
.503
.504
.505
.507
.508
Preface
Welcome to PowerCenterRT, PowerCenter, and PowerMart, Informaticas integrated suite of
software products that delivers an open, scalable data integration solution addressing the
complete life cycle for data warehouse and analytic application development. PowerCenter
and PowerMart combine the latest technology enhancements for reliably managing data
repositories and delivering information resources in a timely, usable, and efficient manner.
The PowerCenter/PowerMart metadata repository coordinates and drives a variety of core
functions including extracting, transforming, loading, and managing. The Informatica Server
can extract large volumes of data from multiple platforms, handle complex transformations
on the data, and support high-speed loads. PowerCenter and PowerMart can simplify and
accelerate the process of moving data warehouses from development to test to production.
Note: Unless otherwise indicated, when this guide mentions PowerCenter, it refers to both
xxiii
Designer
xxiv
Preface
Compare objects. The Designer allows you to compare two repository objects of the same
type to identify differences between them. You can compare sources, targets,
transformations, mapplets, mappings, instances, or mapping/mapplet dependencies in
detail. You can compare objects across open folders and repositories.
Copying objects. In each Designer tool, you can use the copy and paste functions to copy
objects from one workspace to another. For example, you can select a group of transformations
in a mapping and copy them to a new mapping.
Custom tools. The Designer allows you to add custom tools to the Tools menu. This
allows you to start programs you use frequently from within the Designer.
Flat file targets. You can create flat file target definitions in the Designer to output data to
flat files. You can create both fixed-width and delimited flat file target definitions.
Heterogeneous targets. You can create a mapping that outputs data to multiple database
types and target types. When you run a session with heterogeneous targets, you can specify
a database connection for each relational target. You can also specify a file name for each
flat file or XML target.
Link paths. When working with mappings and mapplets, you can view link paths. Link paths
display the flow of data from a column in a source, through ports in transformations, to a
column in the target.
Linking ports. You can now specify a prefix or suffix when automatically linking ports between
transformations based on port names.
Lookup cache. You can use a dynamic lookup cache in a Lookup transformation to insert
and update data in the cache and target when you run a session.
Mapping parameter and variable support in lookup SQL override. You can use mapping
parameters and variables when you enter a lookup SQL override.
Mapplet enhancements. Several mapplet restrictions are removed. You can now include
multiple Source Qualifier transformations in a mapplet, as well as Joiner transformations
and Application Source Qualifier transformations for IBM MQSeries. You can also include
both source definitions and Input transformations in one mapplet. When you work with a
mapplet in a mapping, you can expand the mapplet to view all transformations in the
mapplet.
Metadata extensions. You can extend the metadata stored in the repository by creating
metadata extensions for repository objects. The Designer allows you to create metadata
extensions for source definitions, target definitions, transformations, mappings, and
mapplets.
Numeric and datetime formats. You can define formats for numeric and datetime values
in flat file sources and targets. When you define a format for a numeric or datetime value,
the Informatica Server uses the format to read from the file source or to write to the file
target.
Pre- and post-session SQL. You can specify pre- and post-session SQL in a Source Qualifier
transformation and in a mapping target instance when you create a mapping in the Designer.
The Informatica Server issues pre-SQL commands to the database once before it runs the
session. Use pre-session SQL to issue commands to the database such as dropping indexes
before extracting data. The Informatica Server issues post-session SQL commands to the
database once after it runs the session. Use post-session SQL to issue commands to a database
such as re-creating indexes.
Renaming ports. If you rename a port in a connected transformation, the Designer propagates
the name change to expressions in the transformation.
Tips. When you start the Designer, it displays a tip of the day. These tips help you use the
Designer more efficiently. You can display or hide the tips by choosing Help-Tip of the
Day.
Tool tips for port names. Tool tips now display for port names. To view the full contents
of the column, position the mouse over the cell until the tool tip appears.
View dependencies. In each Designer tool, you can view a list of objects that depend on a
source, source qualifier, transformation, or target. Right-click an object and select the View
Dependencies option.
Working with multiple ports or columns. In each Designer tool, you can move multiple ports
or columns at the same time.
Informatica Server
Add timestamp to workflow logs. You can configure the Informatica Server to add a
timestamp to messages written to the workflow log.
Expanded pmcmd capability. You can use pmcmd to issue a number of commands to the
Informatica Server. You can use pmcmd in either an interactive or command line mode.
The interactive mode prompts you to enter information when you omit parameters or
enter invalid commands. In both modes, you can enter a command followed by its
command options in any order. In addition to commands for starting and stopping
workflows and tasks, pmcmd now has new commands for working in the interactive mode
and getting details on servers, sessions, and workflows.
Error handling. The Informatica Server handles the abort command like the stop
command, except it has a timeout period. You can specify when and how you want the
Informatica Server to stop or abort a workflow by using the Control task in the workflow.
After you start a workflow, you can stop or abort it through the Workflow Monitor or
pmcmd.
New Features and Enhancements
xxv
Export session log to external library. You can configure the Informatica Server to write
the session log to an external library.
Flat files. You can specify the precision and field length for columns when the Informatica
Server writes to a flat file based on a flat file target definition, and when it reads from a flat
file source. You can also specify the format for datetime columns that the Informatica
Server reads from flat file sources and writes to flat file targets.
Write Informatica Windows Server log to a file. You can now configure the Informatica
Server on Windows to write the Informatica Server log to a file.
Metadata Reporter
List reports for jobs, sessions, workflows, and worklets. You can run a list report that lists
all jobs, sessions, workflows, or worklets in a selected repository.
Details reports for sessions, workflows, and worklets. You can run a details report to view
details about each session, workflow, or worklet in a selected repository.
Completed session, workflow, or worklet detail reports. You can run a completion details
report, which displays details about how and when a session, workflow, or worklet ran, and
whether it ran successfully.
Installation on WebLogic. You can now install the Metadata Reporter on WebLogic and
run it as a web application.
Repository Manager
Metadata extensions. You can extend the metadata stored in the repository by creating
metadata extensions for repository objects. The Repository Manager allows you to create
metadata extensions for source definitions, target definitions, transformations, mappings,
mapplets, sessions, workflows, and worklets.
pmrep security commands. You can use pmrep to create or delete repository users and
groups. You can also use pmrep to modify repository privileges assigned to users and
groups.
Tips. When you start the Repository Manager, it displays a tip of the day. These tips help
you use the Repository Manager more efficiently. You can display or hide the tips by
choosing Help-Tip of the Day.
Repository Server
The Informatica Client tools and the Informatica Server now connect to the repository
database over the network through the Repository Server.
xxvi
Preface
Repository Server. The Repository Server manages the metadata in the repository
database. It accepts and manages all repository client connections and ensures repository
consistency by employing object locking. The Repository Server can manage multiple
repositories on different machines on the network.
Repository connectivity changes. When you connect to the repository, you must specify
the host name of the machine hosting the Repository Server and the port number the
Repository Server uses to listen for connections. You no longer have to create an ODBC
data source to connect a repository client application to the repository.
Transformation Language
New functions. The transformation language includes two new functions, ReplaceChr and
ReplaceStr. You can use these functions to replace or remove characters or strings in text
data.
SETVARIABLE. The SETVARIABLE function now executes for rows marked as insert or
update.
Workflow Manager
The Workflow Manager and Workflow Monitor replace the Server Manager. Instead of
creating a session, you now create a process called a workflow in the Workflow Manager. A
workflow is a set of instructions on how to execute tasks such as sessions, emails, and shell
commands. A session is now one of the many tasks you can execute in the Workflow Manager.
The Workflow Manager provides other tasks such as Assignment, Decision, and Event-Wait
tasks. You can also create branches with conditional links. In addition, you can batch
workflows by creating worklets in the Workflow Manager.
DB2 external loader. You can use the DB2 EE external loader to load data to a DB2 EE
database. You can use the DB2 EEE external loader to load data to a DB2 EEE database.
The DB2 external loaders can insert data, replace data, restart load operations, or
terminate load operations.
Environment SQL. For relational databases, you may need to execute some SQL
commands in the database environment when you connect to the database. For example,
you might want to set isolation levels on the source and target systems to avoid deadlocks.
You configure environment SQL in the database connection. You can use environment
SQL for source, target, lookup, and stored procedure connections.
Email. You can create email tasks in the Workflow Manager to send emails when you run a
workflow. You can configure a workflow to send an email anywhere in the workflow logic,
including after a session completes or after a session fails. You can also configure a
workflow to send an email when the workflow suspends on error.
Flat file targets. In the Workflow Manager, you can output data to a flat file from either a
flat file target definition or a relational target definition.
Heterogeneous targets. You can output data to different database types and target types in
the same session. When you run a session with heterogeneous targets, you can specify a
database connection for each relational target. You can also specify a file name for each flat
file or XML target.
xxvii
xxviii
Preface
Metadata extensions. You can extend the metadata stored in the repository by creating
metadata extensions for repository objects. The Workflow Manager allows you to create
metadata extensions for sessions, workflows, and worklets.
Oracle 8 direct path load support. You can load data directly to Oracle 8i in bulk mode
without using an external loader. You can load data directly to an Oracle client database
version 8.1.7.2 or higher.
Partitioning enhancements. To improve session performance, you can set partition points
at multiple transformations in a pipeline. You can also specify different partition types at
each partition point.
Server variables. You can use new server variables to define the workflow log directory and
workflow log count.
Teradata TPump external loader. You can use the Teradata TPump external loader to load
data to a Teradata database. You can use TPump in sessions that contain multiple
partitions.
Tips. When you start the Workflow Manager, it displays a tip of the day. These tips help
you use the Workflow Manager more efficiently. You can display or hide the tips by
choosing Help-Tip of the Day.
Workflow log. In addition to session logs, you can configure the Informatica Server to
create a workflow log to record details about workflow runs.
Workflow Monitor. You use a tool called the Workflow Monitor to monitor workflows,
worklets, and tasks. The Workflow Monitor displays information about workflow runs in
two views: Gantt Chart view or Task view. You can run, stop, abort, and resume workflows
from the Workflow Monitor.
Designer Guide. Provides information needed to use the Designer. Includes information to
help you create mappings, mapplets, and transformations. Also includes a description of
the transformation datatypes used to process and transform source data.
Getting Started. Provides basic tutorials for getting started. Also contains documentation
about the sample repository.
Metadata Reporter Guide. Provides information on how to install and use the web-based
Metadata Reporter to generate reports on the metadata in PowerCenter and PowerMart
repositories.
Repository Guide. Provides information needed to administer the repository using the
Repository Manager or the pmrep command line program. Includes details on
functionality available in the Repository Manager, such as creating and maintaining
repositories, folders, users, groups, and permissions and privileges.
Transformation Language Reference. Provides syntax descriptions and examples for each
transformation function provided with PowerCenter and PowerMart.
Transformation Guide. Provides information on how to create and configure each type of
transformation in the Designer.
Troubleshooting Guide. Lists error messages that you might encounter while using
PowerCenter or PowerMart. Each error message includes one or more possible causes and
actions that you can take to correct the condition.
Workflow Administration Guide. Provides information to help you create and run
workflows in the Workflow Manager, as well as monitor workflows in the Workflow
Monitor. Also contains information on administering the Informatica Server and
performance tuning.
Informatica Metadata Exchange SDK User Guide. Provides information about the
second generation of Metadata Exchange interfaces for PowerCenter and PowerMart
repositories.
xxix
xxx
Preface
PowerConnect for SAP R/3 User and Administrator Guide. Provides information to
install PowerConnect for SAP R/3, build mappings, and run workflows to extract data
from SAP R/3 and load data into SAP R/3.
Metadata Exchange for Data Models User Guide. Provides information on how to extract
metadata from leading data modeling tools and import it into PowerCenter/PowerMart
repositories through Informatica Metadata Exchange SDK.
Metadata Exchange for OLAP User Guide. Provides information on how to use export
multi-dimensional metadata from PowerCenter/PowerMart repositories into the Hyperion
Integration Server through Informatica Metadata Exchange SDK.
xxxi
Document Conventions
This guide uses the following formatting conventions:
xxxii
Preface
If you see
It means
italicized text
boldfaced text
Emphasized subjects.
Note:
Tip:
Warning:
monospaced text
Informatica Webzine
xxxiii
Informatica Corporation
2100 Seaport Blvd.
Redwood City, CA 94063
Phone: 866.563.6332 or 650.385.5800
Fax: 650.213.9489
Hours: 6 a.m. - 6 p.m. (PST/PDT)
email: support@informatica.com
xxxiv
Preface
Chapter 1
Overview, 2
Using Toolbars, 12
Designer Tasks, 24
Overview
The Designer has five tools to help you build mappings and mapplets so you can specify how
to move and transform data between sources and targets. The Designer helps you create
source definitions, target definitions, and transformations to build your mappings.
The Designer allows you to work with multiple tools at one time and to work in multiple
folders and repositories at the same time. It also includes windows so you can view folders,
repository objects, and tasks.
You can configure general Designer settings, such as background color and font. You can also
configure specific tool settings for each Designer tool.
Designer Tools
The Designer provides the following tools:
Source Analyzer. Use to import or create source definitions for flat file, XML, COBOL,
Application, and relational sources.
Designer Windows
The Designer consists of the following windows:
Navigator. Use to connect to and work in multiple repositories and folders. You can also
copy and delete objects and create shortcuts using the Navigator.
Workspace. Use to view or edit sources, targets, mapplets, transformations, and mappings.
You can work with a single tool at a time in the workspace. You can use the workspace in
default or workbook format.
Output. Provides details when you perform certain tasks, such as saving your work or
validating a mapping. Right-click the Output window to access window options, such as
printing output text, saving text to file, and changing the font size.
Instance Data. View transformation data while you run the Debugger to debug a
mapping. For details, see Using the Debugger on page 325.
Target Data. View target data while you run the Debugger to debug a mapping. For
details, see Using the Debugger on page 325.
Workspace
Status Bar
Output
Overview
Overview Window
General. You can customize general display options, XML import, file directories, and the
organization of the Navigator window.
Tables. You can customize the color, font, and size of the tables.
Format. You can customize the color, font, and other format options of Designer tools.
Debug. You can customize display and TCP/IP options of the Debugger.
Choose Tools-Options.
2.
3.
Description
Reload Tables/Mappings
when Opening a Folder
Reloads the last view of a tool when you open it. For example, if you have a mapping
open when you disconnect from a repository, and you select this option, the next time
you open the folder and the Mapping Designer, the same mapping displays.
Appears only when you select Reload Tables/Mappings when Opening a Folder.
Select to have the Designer prompt you to reload tables and mappings each time you
open a folder.
Displays the name of the tool in the upper left corner of the workspace or workbook.
By default, when you drag the focus of the Overview window, the focus of the
workbook moves concurrently. When you select this option, the focus of the
workspace does not change until you release the mouse button.
Save MX Data
Select this option to use MX Views for third party repository tools.
Receive Notifications
from Server
Allows you to receive notification messages in the Designer and view them in the
Output window. Notification messages include information about objects that are
created, modified, or deleted by another user or notices posted by the Repository
Server administrator.
General Option
Description
Displays sources by business names in the Navigator. If you enable the option to
display sources by business names, the Navigator displays the business names first,
and then the source type name and table name in parentheses.
Displays targets by business names in the Navigator. If you enable the option to
display targets by business names, the Navigator displays the business names first,
then the target type name and table name in parentheses.
Select this option if you want the Designer to validate the XML file against its DTD
when you import an XML source or target file or when you run a workflow.
Select this option if you want the Designer to exclude any enclosure element with no
data from the XML groups when you import an XML source or target file.
When you edit XML groups, the Designer can display warnings when your changes
might invalidate the groups. Select this option if you want the Designer to display the
warnings. Note: Clear this option if you are certain your changes will not invalidate
the groups. Invalid groups can generate unpredictable data.
Workspace File
The directory for workspace files created by the Designer. Workspace files maintain
the last source or target you opened, or the last mapping you saved. This directory
should be a local directory to prevent file corruption or overwrites by multiple users.
By default, the Designer creates files in the installation directory.
HTML Documentation
Path or URL
Choose Tools-Options.
2.
3.
From the Tables list, select the repository object you want to customize.
The Columns section lists available display parameters for each repository object. You
can use the up and down arrows to change the display order of the columns.
4.
You can configure the following options for the selected object:
Tables Option
Description
Foreground
Background
Background(2)
The second background color. You can combine two background colors to create a color
gradient in the title bar of the repository object. Choose the same color for Background and
Background(2) if you do not want a color gradient.
Columns Available
All available columns display when the repository object is fully sized.
Columns Selected
Columns that display in the Designer when the repository object appears fully sized. To
display a column, select the column in Available Columns and click the arrow button to
move the column into the Columns Selected section. You can also delete and change the
order in which the columns appear.
Columns Default
Width
Default Width
Tables Option
Description
Default Height
Show Tooltips
Shows column or object name when you point to the column or the title bar of the
repository object. When selected, this option also displays business names when you point
to the icon on the title bar of the object. This option applies to all repository objects.
Repeat steps 3 and 4 for each repository object you want to customize.
Choose Tools-Options.
2.
Some options in the Format tab are disabled, depending on which tool you choose to
edit. Items in Workspace Colors also depend on which tool you select.
3.
You can configure the following format options for the selected tool:
Format Option
Tools Available
Description
Tools
All tools
Source Analyzer/
Warehouse Designer
Source Analyzer/
Warehouse Designer
Create Source
Qualifier when
Opening Sources
Mapping Designer/
Mapplet Designer
Mapping Designer/
Mapplet Designer
Workspace Colors
All tools
Color
All tools
Font Categories
All tools
Change Font
All tools
Select to change the display font and language script for the
Designer tool you selected from the Categories menu. You
might want to do this if the Informatica Client code page is
different from the source file code page.
Reset All
All tools
10
Choose Tools-Options.
2.
Description
Data Display
Select information to display in the Target Data and Instance Data windows.
TCP/IP
Select a specific TCP/IP port or a range of ports for the Designer connection to the
Informatica Server.
11
Using Toolbars
Toolbars allow you to select tools and tasks quickly. You can configure the toolbars you want
to display or hide. You can also create a new toolbar and add or remove toolbar buttons.
You can configure the Designer to display the following toolbars:
Standard. Contains buttons to connect to and disconnect from repository and folders, and
to toggle views and columns. By default, the Designer displays the Standard toolbar.
Figure 1-3 displays the Standard toolbar:
Figure 1-3. Standard Toolbar
Repository. Contains buttons to connect to and disconnect from repositories and folders,
export and import objects, save changes, and print mappings or mapplets.
Figure 1-4 displays the Repository toolbar:
Figure 1-4. Repository Toolbar
View. Contains buttons to customize toolbars, toggle windows, toggle full-screen view,
change workspace mode, and view properties.
Figure 1-5 displays the View toolbar:
Figure 1-5. View Toolbar
Layout. Contains buttons to iconize, restore, and arrange repository objects, copy and
move columns, and zoom in/out of the workspace.
Figure 1-6 displays the Layout toolbar:
Figure 1-6. Layout Toolbar
12
Once a toolbar appears, it displays until you exit the Designer or hide the toolbar. You can
click and drag each toolbar to resize and reposition each toolbar.
If you do not see all buttons in the toolbar, you can customize the toolbar. For details, see
Customizing a Toolbar on page 14.
Displaying a Toolbar
You can configure a toolbar to display at all times.
To display a toolbar:
1.
Choose Tools-Customize.
2.
3.
To show tooltips as you hold the cursor over a toolbar button, select Show Tooltips.
4.
Click OK.
Note: You can configure the toolbars to display in the Designer, Workflow Manager, and the
Workflow Monitor.
Creating a Toolbar
You can create a new toolbar and choose buttons for the new toolbar.
To create a new toolbar:
1.
Choose Tools-Customize.
2.
3.
4.
13
5.
Select a toolbar from the Categories list to view the buttons available.
6.
Drag any desired button from the Buttons area to the new floating toolbar.
7.
8.
Note: You can create toolbars in the Designer, Workflow Manager, and the Workflow Monitor.
Customizing a Toolbar
You can customize an existing toolbar by adding or removing buttons on the toolbar.
To customize a toolbar:
1.
Choose Tools-Customize.
2.
3.
To remove a button from the toolbar, drag the button from the toolbar to the Customize
dialog box.
4.
5.
Select a toolbar from the Categories list to view the buttons available.
6.
Drag any desired button from the Buttons area to the customized toolbar.
7.
8.
Note: You can customize toolbars to display in the Designer, Workflow Manager, and the
Workflow Monitor.
14
The Menu Contents list displays the custom tools. Tool names appear at the bottom of the
Tools menu in the order in which they appear in this list.
To add a custom tool:
1.
2.
In the Menu Contents field, enter a unique name for the custom tool. The Tools menu
displays this name.
Tip: Type an ampersand (&) before a character in the tool name to use that character as a
Use the arrow buttons to place the new tool in the appropriate position on the Tools
menu.
Adding Custom Tools
15
4.
5.
Description
Command
The name and file path of the tool executable file. Click the Browse button to select the
executable file.
Arguments
The arguments that PowerCenter/PowerMart passes to the custom tool. The arguments are
optional or required, depending on the tool.
If you want PowerCenter/PowerMart to prompt you for arguments when you start the custom
tool, select Prompt for Arguments.
Initial Directory
The directory in which the custom tool should start. If you do not enter an initial directory,
PowerCenter/PowerMart uses the custom tool program executable directory.
Click OK.
PowerCenter/PowerMart adds the new tool to the Tools menu.
16
Search Tools
The Designer includes the Find Next and Find in Workspace tools to help you find columns
or ports in repository objects, or strings in the output window.
Find Next
You can use the Find Next tool to search for a column or port name (or any set of characters
in a name) in:
Transformations
Mapplets
Source definitions
Target definitions
With the Find Next tool, you can search one object at a time. You cannot search multiple
objects at the same time. You can use Find Next in each Designer tool. Select a single
transformation or click in the Output window before performing the search.
The Designer saves the last 10 strings searched in the Find Next box on the Standard toolbar.
To find a column or port name:
1.
Select the transformation, mapplet, source or target definition, or click the Output
window.
2.
Enter the text you want to search in the Find box on the Standard toolbar. For example,
you might enter add to locate an address column.
Select Edit-Find Next, click the Find Next button, or press Enter to search for the string.
17
Press Enter again to search for the next occurrence of the search string. The Designer
searches each port or column name in the transformation and wraps to the top of the
transformation until it finds a match.
Find in Workspace
You can search for a string in the Save, Generate, or Validate tabs in the Output window. The
Find in Workspace tool searches for a field name or transformation name in all
transformations in the workspace.
The Find in Workspace tool lets you to search all of the transformations in the workspace for
port or transformation names. You can search for column or port names or table names
matching the search string. You can specify whether to search across all names in the
workspace, or across the business name of a table, column, or port. You can also choose to
search for whole word matches for the search string or matches which match the case of the
search string.
To find a column, port, or transformation name in the workspace:
1.
In any of the Designer tools, click the Find in Workspace button, or choose Edit-Find in
Workspace.
18
2.
3.
Choose whether you want to search for Field names or Table names matching the search
text.
Look for Option
Description
Fields
The Designer searches for column or port names matching the search text.
Tables
The Designer searches for table names matching the search text.
Specify the search string in the Find What entry field, or select a search string from the
list.
The Designer saves the last 10 search strings in the list.
4.
Specify whether you want to look for matches to the search text among all names or
business names.
Find In Option
Description
Names
The Designer searches across all names of tables, columns, or ports in the
workspace.
Business names
The Designer searches across the business names of tables, columns, or ports in
the workspace.
19
5.
6.
Description
Select this option to search across all tables in the workspace. If you do not select
this option, the Designer searches across all currently selected tables in the
workspace. This option is automatically selected when you search for table names
matching the search string.
Select this option to find names or business names that match the specified string.
Match case
Select this option if you want to search for strings that match the case of the
specified search string.
7.
Click Close.
Normal. The Designer displays the information in each object in columns. The Designer
displays objects normally by default.
Iconized. The Designer reduces objects to a named icon. You might iconize objects when
working with large mappings. You can view descriptions associated with iconized objects
by holding the pointer above the icon.
Zoom. The Designer changes the magnification level of the normal and iconized objects in
the workspace when you use the zoom feature. You can apply magnification levels from 30
to 100 percent in 10 percent increments.
2.
Choose Layout-Iconize.
Tip: You can also right-click and select Iconize.
20
2.
Choose Layout-Restore.
Tip: You can also restore an object by double-clicking the iconized object or right-clicking
Choose Layout-Arrange.
2.
3.
Click OK.
Note: Only the pipelines for the targets you select appear in the mapping.
To restore entire mapping to the workspace:
1.
Choose Layout-Arrange.
2.
3.
Click OK.
21
Zoom in 10% on button. Uses a point you select as the center point from which to
increase the current magnification in 10 percent increments.
Zoom out 10% on button. Uses a point you select as the center point from which to
decrease the current magnification in 10 percent increments.
Zoom in based on rectangle. Increases the current magnification of a rectangular area you
select. Degree of magnification depends on the size of the area you select, workspace size,
and current magnification.
Drop-down list. Maintains the center point of the workspace and sets the zoom level to
the percent you select from the list.
Zoom Center. Maintains the center point of the workspace and zooms in or out by 10
percent increments.
Zoom Point. Uses a point you select as the center point from which to zoom in or out by
10 percent increments.
Zoom Rectangle. Increases the current magnification of a rectangular area you select.
Degree of magnification depends on the size of the area you select, workspace size, and
current magnification.
Zoom Percent. Maintains the center point of the workspace and sets the zoom level to the
percent you choose.
When you add objects to a workspace, the Designer uses the magnification level of the other
objects. The Designer saves the zoom level for each Designer tool in a folder when you exit.
22
Figure 1-11 displays the Full Screen view of the workspace window:
Figure 1-11. Full Screen View
Close Full Screen
23
Designer Tasks
You can perform the following common tasks in each of the Designer tools:
Add a repository.
Create shortcuts.
Copy objects.
Rename ports.
Adding a Repository
When you want to access information in another repository, you must add a definition of that
repository to the Designer.
To add a repository in the Navigator, select Repository-Add to enter the repository name and
user name. You can also click the Add a Repository button on the Repository toolbar.
You must configure a Repository Agent in the Repository Manager in order to connect to a
repository. For more information on configuring a Repository Agent, see Managing the
Repository in the Repository Guide.
For Windows, you can use Regional Settings in the Control Panel to customize the Last
Saved date and time format.
24
Creating Shortcuts
To create a shortcut to an object in a shared folder, drag the object into the destination folder
or into the mapping. For example, to create a shortcut to a source, drag the source from the
shared folder into the mapping you have open in the workspace. You can also create a shortcut
by dropping the source into the destination folder. To use the new shortcut, drag it into the
workspace.
You can create a shortcut to a shared folder in the same repository. You can also create a
shortcut in a local repository that points to a shared folder in the global repository, as long as
both repositories are in the same domain.
As with copying objects, the destination folder must be open.
Note: You cannot create shortcuts to objects in non-shared folders.
For details on shortcuts, see Local and Global Shortcuts in the Repository Guide.
Designer Tasks
25
multiple objects at the same time. You can revert to a previously saved version of the following
objects:
Sources
Targets
Transformations
Mapplets
Mappings
2.
3.
Click Yes. If you selected more than one object, click Yes to All.
The Designer removes all changes entered since the last time you saved the object.
Copying Objects
In each Designer tool, you can copy objects across folders or within a folder.
26
To copy an object in a mapping or mapplet, select the object or objects and press Ctrl+C.
Open a new or an existing mapping or mapplet and press Ctrl+V to paste the objects.
Keep the following guidelines in mind when you copy and paste objects within a folder:
You can copy objects from any mapping or mapplet in a folder to any new or existing
mapping or mapplet in the same folder.
You can select multiple objects to copy by clicking and dragging a selection, or by holding
down the Ctrl key and clicking multiple objects.
You can view the objects you select by choosing View-Overview Window. Selected objects
appear in color.
The Designer copies the repository objects to the Designer clipboard. You cannot paste the
objects into any other applications.
You can paste the objects multiple times in any mapping or mapplet in the same folder.
For details on the permissions and privileges necessary to copy objects within a folder, see
Permissions and Privileges by Task in the Repository Guide.
Source Analyzer.
To select consecutive ports or columns:
1.
2.
In the Edit Tables dialog box, choose the Ports or Columns tab.
Designer Tasks
27
3.
Select the first port or column using the row header number in the transformation.
4.
Hold down the Shift key as you click the last port or column in the range that you want
to move or delete.
Row Header
Number
The Designer highlights all ports or columns within the selected range.
Or, to select individual ports or columns, hold down the Ctrl key and click each port or
column using the row header number you want to move or delete.
Note: When you select multiple ports or columns, the Designer disables add, copy, and
paste.
5.
Click Delete.
Renaming Ports
You can rename ports in transformations and targets. To rename a port, double-click the
transformation or target. In the Edit Transformations dialog box, click once on a port name
and the Designer returns a blinking cursor. Type in the new name.
The Designer propagates the new name to expressions within the transformation that use that
port name.
Note: The Designer updates the expressions written with the Expression Editor point-and-
click interface.
28
Shortcut
F2
Esc
Alt+W
Alt+U
Alt+F
Alt+V
Space bar
Ctrl+C
Ctrl+V
Add a row.
Alt+F
Cut a row.
Alt+C
Copy a row.
Alt+O
Paste a row.
Alt+P
Designer Tasks
29
Source definitions
Target definitions
Transformations
Mappings
Mapplets
You can create either reusable or non-reusable metadata extensions. You associate reusable
metadata extensions with all repository objects of a certain type (for example, all source
definitions or all Expression transformations). You associate non-reusable metadata extensions
with a single repository object (for example, one target definition or one mapping).
For more information about metadata extensions, see Metadata Extensions in the Repository
Guide.
To create, edit, and delete user-defined metadata extensions in the Designer, you must have
read and write permissions on the folder.
30
1.
2.
3.
Double-click the title bar of the object to edit it. If the object is a mapping or mapplet,
select Mappings-Metadata Extensions or Mapplets-Metadata Extensions.
4.
User-Defined
Metadata Extensions
This tab lists the existing user-defined and vendor-defined metadata extensions. Userdefined metadata extensions appear in the User Defined Metadata Domain. If they exist,
vendor-defined metadata extensions appear in their own domains.
5.
6.
Required/
Optional
Extension Name
Required
Datatype
Required
Precision
Description
31
7.
Field
Required/
Optional
Value
Optional
An optional value.
For a numeric metadata extension, the value must be an integer
between -2,147,483,647 and 2,147,483,647.
For a boolean metadata extension, choose true or false.
For a string metadata extension, click the Open button in the Value
field to enter a value of more than one line, up to 2,147,483,647
bytes.
Reusable
Required
UnOverride
Optional
Description
Optional
Description
Click OK.
32
33
Designer Tools
Source
Mapplet Designer
Mapping Designer
Source Analyzer
- Sources within the same folder that reference the source through a
foreign key relationship.
- Global and local shortcuts to the source.
- Mapplets using the source.
- Mappings using the source.
Target
Mapping Designer
Warehouse Designer
- Targets within the same folder that reference the target through a
foreign key relationship.
- Global and local shortcuts to the target.
- Mappings using the target.
Transformation
Mapplet Designer
Mapping Designer
Transformation Developer
Mapping
Mapping Designer
Mapplet
Mapping Designer
Mapplet Designer
You can right-click an object and select View Dependencies in all the Designer tools. The
Designer displays the object name, object type, and a list of dependent objects and their
properties.
To view mapping dependencies, choose Mappings-View Dependencies in the Mapping
Designer.
To view mapplet dependencies, choose Mapplets-View Dependencies in the Mapplet
Designer.
Note: You can also view some dependencies in the Repository Manager. For more information
about viewing dependencies in the Repository Manager, see Using the Repository Manager
in the Repository Guide.
34
Figure 1-12 shows the View Dependencies dialog box for a source CUSTOMERS:
Figure 1-12. View Dependencies Dialog Box
Save as HTML.
Table 1-4 describes the properties of the View Dependencies dialog box:
Table 1-4. View Dependencies Dialog Box Properties
Properties
Description
Object Name
Reference Name
Depends On
Dependency Type
Folder
Version
When you view dependencies for a shortcut, the View Dependencies dialog box displays the
shortcut indicator.
You can filter the list of dependent objects by type. Use Filter by dependency type to limit the
list of dependent objects that the Designer displays.
To save the list of dependent objects, click Save as HTML.
35
Figure 1-13 shows an example of the HTML file the Designer creates:
Figure 1-13. Object Dependencies Saved as HTML
36
In the Source Analyzer or Warehouse Designer, open the source or target definition.
2.
3.
4.
Click OK.
To display business names in the Navigator, enable the Display Table As Business Name
option. The business name appears in the Navigator with the table name in parentheses.
37
If you create a shortcut to a source or target when you enable business names to display in the
Navigator, the Designer names the shortcut Shortcut_To_BusinessName. For details, see
Configuring General Options on page 5.
38
words, which is not allowed in a port name. For example, the business name Employee Data
becomes Employee_Data.
Tip: Avoid using PowerCenter and PowerMart reserved words, such as DD_INSERT, for
business and port names. For a list of reserved words, see The Transformation Language in
the Transformation Language Reference.
39
Mapplets
Mappings
40
The links must be a valid URL or file path to reference your business documentation. You can
use either of the following formats:
Root variable. Use the string file://$docroot to refer to the documentation root you have
specified in the documentation path field.
For example, if your documentation root is http://internal.company.com/doc, the
Designer points to http://internal.company.com/doc/finance/vendors_help.html, but
displays file://$docroot as part of the link.
Figure 1-15 displays the root variable as part of the documentation link:
Figure 1-15. Using Root Variable as Part of the Documentation Link
To create a link, edit the properties of the object. How you do this depends on the type of
object you want to document.
Table 1-5 summarizes how to create a link for repository objects:
Table 1-5. Creating Documentation Links
Repository Object
Table/Transformation
Mapping/Mapplet
Tip: To add comments to individual business components, edit the properties of the original
object it references.
41
42
Chapter 2
Overview, 44
Troubleshooting, 68
43
Overview
To extract data from a source, you must first define sources in the repository. You can import
or create the following types of source definitions in the Source Analyzer:
Fixed-width and delimited flat files that do not contain binary data. For information on
flat file sources, see Working with Flat Files on page 91.
COBOL files
XML files. For more information on XML sources, see Working with XML Sources on
page 167.
Data models using certain data modeling tools through Metadata Exchange for Data
Models (an add-on product)
Note: Because source definitions must exactly match the source, Informatica recommends
44
The Designer does not recognize the following special characters in source table and column
names:
.+-=~!%^&*()[]{}\;:?,<>
Some databases require special configuration or commands to allow table and field names
containing the slash character. For details, consult the database documentation.
Result
Add a column
Mappings may be invalidated. If the column is connected to an input port that uses a
datatype incompatible with the new one (for example, Decimal to Date), the mapping is
invalidated.
Mapping may be invalidated. If you change the column name for a column you just
added, the mapping remains valid. If you change the column name for an existing
column, the mapping is invalidated.
Delete a column
Mappings may be invalidated if the mapping uses values from the deleted column.
When you add a new column to a source in the Source Analyzer, all mappings using the
source definition remain valid. However, when you add a new column and change some of its
properties, the Designer invalidates mappings using the source definition.
You can change the following properties for a newly added source column without
invalidating a mapping:
Name
Datatype
Format
Overview
45
Usage
Redefines
Occurs
Key type
If the changes invalidate the mapping, you must open and edit the mapping. Then choose
Repository-Save to save the changes to the repository. If the invalidated mapping is used in a
session, you must validate the session. For more information on validating sessions, see
Working with Sessions in the Workflow Administration Guide.
Creating Sessions
When you create a session, you can specify a source location different from the location you
use when you import the source definition. If the source is a file, you can override some of the
file properties when you create a session. For details, see Working with Sources in the
Workflow Administration Guide.
46
Import source definitions. Import source definitions into the Source Analyzer.
Source name
Database location
Column names
Datatypes
Key constraints
To import a source definition, you must be able to connect to the source database from the
client machine using a properly configured ODBC data source or gateway. You may also
require read permission on the database object.
After importing a relational source definition, you can optionally enter business names for
your table and columns. You can also manually define key relationships, which can be logical
relationships created in the repository that do not exist in the database.
To import a source definition:
1.
47
2.
Select the ODBC data source used to connect to the source database.
If you need to create or modify an ODBC data source, click the Browse button to open
the ODBC Administrator. Create the appropriate data source and click OK. Select the
new ODBC data source.
3.
You may need to specify the owner name for database objects you want to use as sources.
4.
Click Connect.
If no table names appear or if the table you want to import does not appear, click All.
5.
Scroll down through the list of sources to find the source you want to import. Select the
relational object or objects you want to import.
You can hold down the Shift key to select a block of sources within one folder, or hold
down the Ctrl key to make non-consecutive selections within a folder. You can also select
48
all tables within a folder by selecting the folder and clicking the Select All button. Use the
Select None button to clear all highlighted selections.
6.
Click OK.
The source definition appears in the Source Analyzer. In the Navigator, the new source
definition appears in the Sources node of the active repository folder, under the source
database name.
New Source
Definition
7.
Choose Repository-Save.
49
Edit the definition. Manually edit the source definition if you need to configure properties
that you cannot import or if you want to make minor changes to the source definition.
Re-import the definition. If the source changes are significant, you may need to re-import
the source definition. This overwrites or renames the existing source definition. You can
retain existing primary key-foreign key relationships and descriptions in the source
definition being replaced.
When you update a source definition, the Designer propagates the changes to all mappings
using that source. Some changes to source definitions can invalidate mappings. For details, see
Table 2-1 on page 45.
If the changes invalidate the mapping, you must open and edit the mapping. Then choose
Repository-Save to save the changes to the repository. If the invalidated mapping is used in a
session, you must validate the session. For more information, see Working with Sessions in
the Workflow Administration Guide.
50
In the Source Analyzer, double-click the title bar of the source definition.
2.
Description
Select Table
Displays the source definition you are editing. To choose a different open source
definition to edit, select it from the list.
Rename button
Opens a dialog box to edit the name of the source definition and enter a business name.
Owner Name
Description
Optional description of source table. Character limit is 2,000 bytes/K, where K is the
maximum number of bytes for each character in the repository code page. Enter links to
business documentation.
Database Type
Indicates the source or database type. If necessary, select a new database type.
51
3.
Click the Columns Tab. Edit column names, datatypes, and restrictions as needed. Click
OK.
52
1.
In the Designer, connect to the repository containing the source definition you wish to
update.
2.
Open the Source Analyzer and import the source definition again.
3.
The Designer prompts you to rename or replace the existing source tables.
4.
To view the differences between the table you are importing and the existing table, click
Compare. A dialog box displays the attributes in each source side-by-side.
For more information on comparing sources, see Comparing Sources on page 379.
5.
Specify whether you want to retain primary key-foreign key information or source
descriptions in the existing source definition.
The following table describes the options available in the Table Exists dialog box when
re-importing a source definition:
6.
Option
Description
Select this option to apply rename, replace, or skip all tables in the
folder.
Select this option if you want to keep the primary key-foreign key
relationships in the source definition being replaced.
Select this option if you want to retain the source description and
column and port descriptions of the source definition being
replaced.
Description
Replace
Rename
Skip
7.
If you click Rename, enter the name of the source definition and click OK.
8.
53
US ASCII
EBCDIC-US
8-bit ASCII
8-bit EBCDIC
ASCII-based MBCS
EBCDIC-based MBCS
You can import shift-sensitive COBOL files that do not contain shift keys. When you do, you
must define the shift states for each column in the COBOL source definition. For more
information, see Working with Shift-Sensitive Flat Files on page 126.
COBOL sources often de-normalize data and compact the equivalent of separate table records
into a single record. You use the Normalizer transformation to normalize these records in your
mapping.
Because COBOL uses unique conventions for storing and representing data, the process of
creating a COBOL source definition requires you to do the following:
1.
In the Source Analyzer, import the structure of the COBOL file. The Designer creates a
port representing each column in the COBOL source.
2.
Review the COBOL file and configure as necessary to create record groups. COBOL files
often represent the functional equivalent of multiple source tables within the same set of
records. When you review the structure of the COBOL file, you can adjust the
description to identify which groups of fields constitute a single pseudo-table.
3.
Save the modified COBOL source definition to the repository, and use the source
definition in your mapping.
54
data division.
file section.
fd
01
FILE-ONE.
SCHOOL-REC.
02
SCHOOL-ID
PIC 9(15).
02
SCHOOL-NM
PIC X(25).
02
CLASS-REC
OCCURS 2 TIMES.
03
CLASS-ID
PIC 9(5).
03
CLASS-NM
PIC X(25).
03
STUDENT-REC
04
STUDENT-ID
PIC 9(15).
04
STUDENT-NM
PIC X(25).
04
PARENT-REC
03
02
OCCURS 5 TIMES.
OCCURS 2 TIMES.
05 PARENT-ID
PIC 9(15).
05 PARENT-NM
PIC X(25).
TEACHER-REC
OCCURS 3 TIMES.
04
TEACHER-ID
PIC 9(15).
04
TEACHER-NM
PIC X(25).
SPORT-REC
03
SPORT-TEAM
OCCURS 2 TIMES.
PIC X(30).
working-storage section.
procedure division.
stop run.
55
n is the number of spaces the Designer reads for every tab character.
Suppose your COBOL copybook file is called sample.cpy. The COBOL file below shows how
to use the copy statement to insert the sample copybook into a COBOL file template:
identification division.
program-id. mead.
environment division.
select file-one assign to "fname".
data division.
file section.
fd
FILE-ONE.
copy sample.cpy.
working-storage section.
procedure division.
stop run.
56
1.
Open the Source Analyzer, and choose Sources-Import from COBOL file.
2.
3.
This is the code page of the COBOL file (.cbl), not the data file. The code page must be
compatible with the Informatica client code page.
When you select this code page, the data file uses this code page by default. After you
import the COBOL file, you can configure the code page of the source data when you
adjust the source definition or when you run the workflow.
4.
Click OK.
The COBOL source definition appears in the Designer. More than one definition may appear
if the COBOL file has more than one FD entry.
FD Section
Fields
OCCURS
REDEFINES
FD Section
The Designer assumes that each FD entry defines the equivalent of a source table in a
relational source and creates a different COBOL source definition for each such entry. For
example, if the COBOL file has two FD entries, CUSTOMERS and ORDERS, the Designer
creates one COBOL source definition containing the fields attributed to CUSTOMERS, and
another with the fields that belong to ORDERS.
Fields
The Designer identifies each field definition, reads its datatype (numeric, string, or nstring),
and assigns it to the appropriate source definition. Each field definition includes a large
number of possible attributes, described later in this section.
OCCURS
COBOL files often contain multiple instances of the same type of data within the same
record. For example, a COBOL file may include data about four different financial quarters,
each stored in the same record. When the Designer analyzes the file, it creates a different
column for each OCCURS statement in the COBOL file. These OCCURS statements define
repeated information in the same record. You can use the Normalizer transformation to
normalize this information.
For each OCCURS statement, the Designer:
Creates one target table when you drag the COBOL source definition into the Warehouse
Designer.
Working with COBOL Sources
57
REDEFINES
COBOL uses REDEFINES statements to build the description of one record based on the
definition of another record. When you import the COBOL source, the Designer creates a
single source that includes REDEFINES.
The REDEFINES statement allows you to specify multiple PICTURE clauses for the sample
physical data location. Therefore, you need to use Filter transformations to separate the data
into the tables created by REDEFINES.
For each REDEFINES:
The Designer creates one target table when you drag the COBOL source definition into
the Warehouse Designer.
OCCURS
Field definition
Field attributes
Look at the following tabs and dialog boxes when you configure a COBOL source definition:
You may need to switch to byte storage (for IBM VS COBOL and MicroFocus COBOLrelated data files) by selecting the IBM COMP option in the source definition. The
Informatica Server provides COMP word storage by default. COMP columns are 2, 4, and 8
bytes on IBM mainframes. COMP columns can be 1, 2, 3, 4, 5, 6, 7, and 8 bytes elsewhere,
when derived through MicroFocus COBOL. Clear the IBM COMP option to use byte
storage.
Figure 2-2 shows you how to configure the IBM COMP option:
Figure 2-2. Configuring the IBM COMP Option
Storage Type
Table 2-2 shows the COBOL file properties that you can set on the Table tab:
Table 2-2. COBOL File Properties
Table Option
Required/
Optional
Rename button
Optional
Owner Name
Optional
Description
Optional
Database Type
Required
IBM COMP
Optional
Required
Select Fixed-width.
Advanced button
Required
Description
59
OCCURS. When you review the contents of the Columns tab in a COBOL source, you
see several levels of columns. These levels represent the separate record sets contained
within a single COBOL source.
For example, the following COBOL source contains a nested record set, HST_MTH.
Each record set begins with a level 5 heading, indicating the beginning of the record. The
columns within each record set must all be at the same level beneath the record heading.
For example, the record set HST_MTH contains several columns, starting with
HST_ACCR_REM. An OCCURS setting of 24 indicates that, when you review the data
in this COBOL source, each record contains 24 nested records for HST_MTH.
Figure 2-3 shows a sample COBOL source definition with an OCCURS setting of 24:
Figure 2-3. Sample COBOL Source Definition with OCCURS
All of the columns in HST_MTH are at the same level, 7, in this COBOL source. The
heading for the record HST_MTH is at level 5, two levels above the columns in that
source.
60
FD Section. You may need to configure the source definition to group fields. Although the
Designer creates a separate source definition for each FD entry in the COBOL file, each
entry may represent the functional equivalent of multiple tables of data. When you
configure the source definition, you create different levels of fields within the source to
group data into separate pseudo-tables.
Field Attributes. When you review a COBOL source, you see several attributes for each
field (the COBOL equivalent of a column), representing the ways in which you can
configure a field in a COBOL file.
Among these attributes, the picture clause is the most fundamental, since it shows how the
COBOL file represents data. COBOL uses its own set of conventions for configuring how
data is formatted within the column. For example, the picture X(32) indicates that text
data in the field is 32 bytes long. The picture clause 9(7) indicates that the field contains
numeric data of no more than 7 digits in length. The picture N(8), an Nstring datatype
containing double-byte characters, indicates that the text data in the field is 16 bytes long.
You may need to adjust the definition of a field in the Source Analyzer, modifying the
picture in the process. Since the Informatica Server uses the source definition as a map for
finding data in the source file, you need to be cautious when you make such adjustments.
Figure 2-4 shows the Columns tab of a COBOL source definition:
Figure 2-4. COBOL Source Definition Columns Tab
Table 2-3 describes the attributes you can set in the Columns tab of a COBOL source
definition:
Table 2-3. COBOL Source Definition Columns Tab
Attribute
Description
The offset of the field in the file. The Designer calculates this read-only setting using
the physical length, picture, usage, and REDEFINES settings for the field.
Column name
61
62
Attribute
Description
Level
An indicator used to identify all fields that provide data for the same record. If you want
to group fields, you set all its columns to the same level. Using this feature, it is
possible to create multiple record types (the equivalent of separate tables of data) from
the same COBOL source.
Occurs
A COBOL statement indicating that multiple instances of this field appear in the same
record.
Datatype
Precision (Prec)
Scale
Picture
Usage
The storage format for data in the field. Different COBOL conventions exist, such as
COMP-1 and COMP-X. All available conventions appear in the drop-down list of
usages for each field.
Key Type
The type of key constraint to apply to this field. When you configure a field as a primary
key, the Informatica Server generates unique numeric IDs for this field when running a
workflow using the COBOL file as a source.
Signed (S)
If selected, indicates that the sign (+ or -) exists in the last digit of the field. If not
selected, the sign appears as the first character in the field.
Indicates whether the sign is included in any value appearing in the field.
For numeric values, specifies whether the decimal point is a period (.) or a V character.
Redefines
Indicates that the field uses a REDEFINES statement in COBOL to base its own field
definition on that of another field.
Shift key
You can define the shift state for shift-sensitive COBOL files that do not contain shift
keys.
This attribute appears when you select User Defined Shift State in the Edit Flat File
Information dialog box for fixed-width files.
Choose Shift-In if the column contains single-byte characters. Choose Shift-Out if the
column contains multibyte characters.
For more information, see Working with Shift-Sensitive Flat Files on page 126.
Business Name
Install the Microsoft Excel ODBC driver on your system. For details, see Installation
and Configuration Overview in the Installation and Configuration Guide.
2.
Create a Microsoft Excel ODBC data source for each source file in the ODBC 32-bit
Administrator. For details, see Using ODBC in the Installation and Configuration
Guide.
3.
4.
Define ranges.
Defining Ranges
The Designer creates source definitions based on ranges you define in Microsoft Excel. You
can define one or more ranges in a Microsoft Excel sheet. If you have multiple sheets, define
at least one range for each sheet. When you import sources in the Designer, each range
displays as a relational source.
You must define a range in the Designer to import the Excel source.
To define a range:
1.
2.
63
3.
Choose Insert-Name-Define.
4.
5.
If you have multiple sheets, select each sheet and repeat steps 1-4 to define ranges for
each set of data.
6.
Choose File-Save.
64
1.
2.
3.
Choose Format-Cells.
4.
5.
6.
Click OK.
7.
Choose File-Save.
In the Designer, connect to the repository and open the folder for the source definition.
65
66
2.
3.
Select Microsoft Excel data source, which is the Microsoft Excel filename.
4.
5.
In the User or System DSN tabs, depending on where you created the data source,
double-click the Microsoft Excel driver.
6.
Click Select Workbook and browse for the Microsoft Excel file, which is considered a
relational database.
7.
Click OK.
8.
Click Connect.
You do not need to enter a database username and password. The ranges you defined in
the Microsoft Excel file appear as table names. The database owner is No Owner because
you are not required to enter a database username.
Range displayed as
table definition.
9.
Select the table you want to import. To select more than one table, hold down the Ctrl or
Shift keys to highlight multiple tables.
10.
Click OK.
The newly-created source definition appears in the Source Analyzer.
In the Navigator, the source definition appears in the Sources node, under the database
name.
New Source
Definition
11.
Choose Repository-Save.
67
Troubleshooting
I imported a source from a DB2 database and received an SQL0954C error message from
the DB2 operating system.
If the value of the DB2 system variable APPLHEAPSZ is too small when you use the
Designer to import sources from a DB2 database, the Designer reports an error accessing the
repository. The Designer status bar displays the following message:
SQL Error:[IBM][CLI Driver][DB2]SQL0954C: Not enough storage is available
in the application heap to process the statement.
If you receive this error, increase the value of the APPLHEAPSZ variable for your DB2
operating system. APPLHEAPSZ is the application heap size (in 4KB pages) for each process
using the database.
68
Chapter 3
Overview, 70
Troubleshooting, 89
69
Overview
Before you create a mapping, you must define targets in the repository. Use the Warehouse
Designer to import and design target definitions. Target definitions include properties such as
column names and datatypes.
You can use the Warehouse Designer for the following tasks:
Relational. You can create a relational target for a particular database platform. Create a
relational target definition when you want to use an external loader to the target database.
Flat File. You can create fixed-width and delimited flat file target definitions. For details,
see Working with Flat Files on page 91.
XML File. You can create an XML target definition to output data to an XML file. For
details, see Working with XML Targets on page 193.
Import the definition for an existing target. Import the target definition from a relational
target or a flat file. The Warehouse Designer uses a Flat File Wizard to import flat files.
Create a target definition based on a source definition. Drag a source definition into the
Warehouse Designer to make a target definition.
Manually create a target definition. Create a target definition in the Warehouse Designer.
Design several related targets. Create several related target definitions at the same time.
You can create the overall relationship, called a schema, as well as the target definitions,
through wizards in the Designer. The Cubes and Dimensions Wizards follow common
principles of data warehouse design to simplify the process of designing related targets. For
details, see Creating Cubes and Dimensions on page 411.
70
Re-import target definitions. When the target changes significantly, you can re-import the
target definition to make sure it is correct.
Edit target definitions. Edit target definitions to add comments or key relationships, or
update them to reflect changed target definitions.
Create relational tables in the target database. If the target tables do not exist in the target
database, you can generate and execute the necessary SQL code to create the target table
that matches the target definition.
Preview relational and flat file target data. You can preview the data of relational and flat
file target definitions in the Designer. This feature saves you time because you can browse
the target data before you run a workflow or build a mapping. For details on previewing
data, see Previewing Data on page 367.
Compare target definitions. You can compare two target definitions to identify differences
between them. For details, see Comparing Targets on page 380.
Some databases require special configuration or commands to allow table and field names
containing the slash character. For details, consult the database documentation.
Overview
71
Flat file. The Warehouse Designer uses the Flat File Wizard to import a target definition
from a flat file that exactly matches the structure of the flat file. For more information, see
Importing Flat Files on page 93.
Relational table. You can import a relational table to create a target definition that exactly
matches the structure of the relational table.
XML file. You can import an XML target definition from an XML, DTD, or XML schema
file. For details, see Importing an XML Target from Files on page 196.
Once you add a target definition to the repository, you can use it in a mapping.
Database location. You specify the database location when you import a relational source.
You can specify a different location when you edit the target definition in the Warehouse
Designer and when you configure a session.
Datatypes. The Designer imports the native datatype for each column.
Key constraints. The constraints in the target definition can be critical, since they may
prevent you from moving data into the target if the Informatica Server violates a constraint
during a workflow. For example, if a column contains the NOT NULL constraint and you
fail to map data to this column, the Informatica Server cannot insert new records into the
target table.
Key Relationships. You can customize the Warehouse Designer to automatically create
primary-foreign key relationships. Choose Tools-Options and select the Format tab. Check
Import Primary and Foreign Keys.
You can also create logical relationships in the repository. Key relationships do not have to
exist in the database.
To import a relational target definition, you must be able to connect to the database from the
client machine using a properly configured ODBC data source or gateway. You may also
require read permission on the database object.
Note: Because views can include columns from more than one table, the Informatica Server
might encounter database errors when trying to insert, update, or delete data. If you import a
target view, you should make sure that it is a view of a single table.
72
2.
Select the ODBC data source used to connect to the target database.
If you need to create or modify an ODBC data source first, click the Browse button to
open the ODBC Administrator. After creating or modifying the ODBC source, continue
with the following steps.
3.
Enter the username and password needed to open a connection to the database, and click
Connect.
If you are not the owner of the table you want to use as a target, specify the owner name.
4.
Drill down through the list of database objects to view the available tables you can use as
targets.
5.
Select the relational table or tables to import the definitions into the repository.
You can hold down the Shift key to select a block of tables, or hold down the Ctrl key to
make non-contiguous selections. You can also use the Select All and Select None buttons
to select or clear all available targets.
6.
Click OK.
The selected target definitions now appear in the Navigator under the Targets icon.
7.
Choose Repository-Save.
73
Relational sources
COBOL sources
XML sources
After you create the matching target definition, you can add or edit target properties and
change the target type. When you create a relational target definition, you can generate the
target table in the target database. For details on creating target tables, see Creating a Target
Table on page 86.
For details on creating a target definition from an XML source definition, see Creating a
Target Definition from an XML Source on page 202.
When you drag a normalized COBOL source definition into the Warehouse Designer
workspace, the Warehouse Designer creates relational target definitions based on the
following rules:
The number of tables that appears is one more than the number of OCCURS statements
in the COBOL file.
The number of generated key names is the number of OCCURS statements minus the
number of primary keys.
Figure 3-1 shows a sample COBOL source definition with five OCCURS statements:
Figure 3-1. Sample COBOL Source Definition with OCCURS
Figure 3-2 shows that the Designer creates six target definitions when you drag the source
from Figure 3-1 into the Warehouse Designer workspace:
Figure 3-2. Target Definitions Created from a COBOL Source
75
With the Warehouse Designer tool active, drag the source definition you want to use into
the workspace. For XML sources, select the option to create relational targets or XML
targets and click OK. The target definition appears.
2.
3.
Enter a target name and select the target type. Add or edit columns or target properties,
and then click OK.
For details on adding columns, creating indexes, or configuring other target options, see
Maintaining Relational Target Definitions on page 78.
4.
Choose Repository-Save.
The new target definition is saved to the repository. You can now use the target definition in a
mapping. You can also create a target tables in the target database based on relational target
definitions. For details, see Creating a Target Table on page 86.
76
2.
Enter a name for the target and select the target type.
You can create a flat file target definition by choosing Flat File for the target type. For
more information on flat file definitions, see Working with Flat Files on page 91.
The target name you enter is the name of the new table in the database when you create a
relational target definition. Follow any database-specific naming conventions.
3.
Click Create.
An empty table structure appears in the workspace. (It may be covered by the dialog box.)
The new target definition also appears within the Navigator window.
4.
If you want to create another target definition, enter a new target name and target type
and click Create. Repeat this step for each target you want to create.
5.
6.
Configure the target definition. For details on configuring relational targets, see
Maintaining Relational Target Definitions on page 78. For details on configuring flat
file targets, see Editing Flat File Definitions on page 103.
7.
Choose Repository-Save.
The new target definition is saved to the repository. You can now use the target definition in a
mapping.
You can also create a target tables in the target database based on relational target definitions.
For details, see Creating a Target Table on page 86.
Note: You cannot manually create a target definition for XML files.
77
Re-import the target definition. Re-import a target definition rather than edit it if the
target changes significantly.
Edit the target definition. Edit a target definition to add comments or key relationships,
or update it to reflect a changed target.
After you create a relational target definition, you can edit it using the following target
definition tabs:
Table tab. Edit properties such as constraints for relational targets and flat file properties
for flat file targets.
Metadata Extensions tab. You can extend the metadata stored in the repository by
associating information with repository objects, such as target definitions. For more
information, see Metadata Extensions in the Repository Guide.
When you change a target definition, the Designer propagates the changes to any mapping
using that target. Some changes to target definitions can invalidate mappings.
Table 3-1 shows how you can impact mappings when you edit target definitions:
Table 3-1. Mapping Impact for Updated Target Definitions
Modification
Result
Add a column.
Mapping may be invalidated. If the column is connected to an input port that uses a
datatype that is incompatible with the new one (for example, Decimal to Date), the
mapping is invalid.
Mapping may be invalidated. If you change the column name for a column you just
added, the mapping remains valid. If you change the column name for an existing
column, the mapping is invalidated.
Delete a column.
Mapping may be invalidated if the mapping uses values from the deleted column.
When you add a new column to a target in the Warehouse Designer, all mappings using the
target definition remain valid. However, when you add a new column and change some of its
properties, the Designer invalidates mappings using the target definition.
78
You can change the following properties for a newly added target column without invalidating
a mapping:
Name
Datatype
Format
If the changes invalidate the mapping, you must open and edit the mapping. If the invalid
mapping is used in a session, you must validate the session. For more information on
validating sessions, see Working with Sessions in the Workflow Administration Guide.
In the Warehouse Designer, follow the same steps to import the target definition, and
select the target to import.
The Designer notifies you that a target definition with that name already exists in the
repository and displays the following dialog box:
You have the following options for handling the newly imported target definition:
Option
Description
Replace
Rename
Skip
Compare
To view the differences between the table you are importing and the existing table, click Compare.
A dialog box displays the attributes in each target side-by-side. For more information on
comparing targets, see Comparing Targets on page 380.
If you have multiple tables to import and replace, check Apply to all tables.
2.
79
3.
If you click Rename, enter the name of the target definition and click OK.
4.
If you have a relational target definition and click Replace, specify whether you want to
retain primary key-foreign key information and target descriptions.
The following table describes the options available in the Table Exists dialog box when
re-importing and replacing a relational target definition:
5.
Option
Description
Select this option to apply rename, replace, or skip all tables in the
folder.
Select this option to retain the target description and column and
port descriptions of the target definition being replaced.
80
You can edit the following options on the Table tab of the target definition:
Creation Options. SQL statements for table storage options. Applies to relational targets
only.
Keywords. Allows you to keep track of your targets. As development and maintenance
work continues, the number of targets increases. While all of these targets may appear in
the same folder, they may all serve different purposes. Keywords can help you find related
targets. Keywords can include developer names, mappings, or the associated schema.
81
You can use keywords to perform searches in the Repository Manager. For details on
keyword searches in the Repository Manager, see Using the Repository Manager in the
Repository Guide.
Database Type. Define the target type, either a relational database or a flat file. You can
change a relational target definition to a flat file target definition and vice versa. When you
change the target definition type, you lose some metadata when you save your changes to
the repository.
When you change the target definition type from relational to flat file, you lose indexes
information, constraints information, and creation options information. The Workflow
Manager invalidates all sessions using the target.
When you change the target definition type from flat file to relational, you lose all flat file
property information. If you change the target definition back to a flat file, the Designer
uses default values for the flat file properties. The Workflow Manager invalidates all
sessions using the target.
Note: If you change the target type from flat file to relational, the Workflow Manager
invalidates all sessions that use the target. However, you can change a target type from
relational to flat file without invalidating sessions that use the target. For more
information, see Working with Targets in the Workflow Administration Guide.
Flat file information. When the database type is flat file, you can define the flat file
properties by clicking the Advanced button. For more information on editing flat file
target definitions, Editing Flat File Definitions on page 103.
In the Warehouse Designer, double-click the title bar of the target definition.
The Edit Tables dialog box appears.
2.
Click the Rename button to edit the target name and the business name.
3.
To change the target type, choose a different database in the Database Type field.
To change the target type to a flat file target, choose flat file. For more information on
editing flat file target definitions, see Editing Flat File Definitions on page 103.
4.
5.
82
To add a constraint, type the SQL statement into the Constraints field.
To add a creation option, type the SQL statement in to the Creation options field.
6.
To add keywords, click Edit Keywords. The Edit Keywords dialog box appears. Use the
buttons to create and move keywords.
Move Down
Move Up
Delete Keyword
New Keyword
7.
Click OK.
8.
Editing Columns
Figure 3-4 shows the options you can edit on the Columns tab of a flat file target definition:
Figure 3-4. Target Definition Columns Tab
You can edit the following information in the Columns tab of the target definition:
Column Name. The column names in the target. When editing a relational target
definition, edit the column name only if you are manually creating the relational target
definition or if the actual target column name changed.
Datatype. The datatypes that display in the target definition depend on the target type of
the target definition.
83
Precision and Scale. When designing or importing relational targets, you often need to
consider the precision and scale of values in each column. Precision is the maximum
number of significant digits for numeric datatypes, or the maximum number of characters
for string datatypes. Precision includes scale. Scale is the maximum number of digits after
the decimal point for numeric values. Therefore, the value 11.47 has a precision of 4 and a
scale of 2. The string Informatica has a precision (or length) of 11.
All datatypes for relational targets have a maximum precision. For example, the Integer
datatype has a maximum precision of 10 digits. Some numeric datatypes have a similar
limit on the scale or do not allow you to set the scale beyond 0. Integers, for example, have
a scale of 0, since by definition they never include decimal values.
For details on precision and scale, see Datatype Reference on page 487.
Not Null. Choose whether you want to allow null data in your target.
Key Type. Select Primary, Foreign, Primary-Foreign, or Not a Key. Applies to relational
targets only.
Business Name. Optionally, you can add business names to each target column.
2.
3.
4.
If you are creating a target definition and you want to add columns, select a column and
click Add.
5.
Enter the name, datatype, and other characteristics of the column. Repeat these steps for
each column you want to add to the table.
6.
If you want to move a column, use the Up and Down buttons, or drag it within the
scrolling list.
7.
Click OK.
8.
Choose Repository-Save.
Defining Indexes
Since indexes speed queries against tables, adding indexes to your target database is an
important part of target table design. You can add index information to relational target
definitions. Queries to the data warehouse determine which columns you should index. If you
define indexes, select the option to create indexes when you create target tables. For details,
see Creating a Target Table on page 86.
84
In the Warehouse Designer, double-click the title bar of a relational target definition.
2.
3.
4.
5.
To add a column to the index, click the Add button in the Columns section. Select a
column name and click OK.
6.
7.
8.
Choose Repository-Save.
Important: When you generate and execute the DDL to create the target table, select the Create
index option.
For details, see Creating a Target Table on page 86.
85
In the Warehouse Designer, select the relational target definition you want to create in
the database. If you want to create multiple tables, select all relevant table definitions.
2.
Enter a filename and location for the SQL script you are about to generate, as well as any
options you want to include in the SQL DDL code. This text file exists on your local file
system, not in the repository.
Depending on the Generation options you select, the SQL script will contain all of the
CREATE and DROP commands that match your selections. If you created a target
definition with primary keys, for example, select the Primary key option.
3.
Click Generate if you want to create the SQL script, or Generate and Execute if you want
to create the file, and then immediately run it.
When you click Generate SQL file, the SQL generated for the selected table definitions is
stored in the file you selected. If the file already exists, a dialog box appears prompting
you to overwrite the existing file. The progress of copying the generated SQL file appears
in the Output window in Designer.
After the file has been generated, you can click Edit SQL file, which opens a text editor so
you can modify the SQL statements. When the Designer generates the SQL file for the
86
target database, it encloses all table and field names containing the slash character in
double quotes.
You can click Execute SQL file to create the tables. When you click Generate and
Execute, the SQL generated for the selected table definitions is stored in the file you
selected and immediately executed.
Note: As long as the Designer is open, it locks the SQL file you last opened and modified.
If you want to unlock the file so that you can view it in a different application, open a
different SQL file in the Designer, or exit the Designer.
4.
Click Close.
When you close this dialog box, the Designer maintains an open connection to the target
database. If you reopen the dialog box, you do not need to reconnect to the target
database.
Using pre- and post-session SQL commands. The preferred method for dropping and recreating indexes is to define a pre-session SQL statement in the Pre SQL property that
drops indexes before loading data to the target. You can use the Post SQL property to
recreate the indexes after loading data to the target. Define pre- and post-session SQL for
relational targets in the mapping target properties or on the Transformations tab in the
session properties. For more information on pre- and post-session SQL commands, see
Working with Sessions in the Workflow Administration Guide.
Using the Designer. The same dialog box you use to generate and execute DDL code for
table creation can drop and recreate indexes. However, this process is not automatic. Every
time you run a workflow that modifies the target table, you need to launch the Designer
and use this feature when you use this method.
Stored Procedures. You can also use stored procedures to drop and recreate indexes. For
more information, see Stored Procedure Transformation in the Transformation Guide.
87
Recreating Targets
If you modify a relational target definition, you can use the Designer to drop and recreate the
corresponding target table.
Note: This feature drops the existing table, including any records in it, so you may want to
back up the information in the table and reinsert it into the recreated table.
To recreate the target table:
1.
In the Warehouse Designer, modify the relational target definition and select it.
2.
88
3.
4.
The Designer drops and recreates the table, including any indexes assigned to it.
Troubleshooting
When I modified a target definition and used the Designer to run the SQL DDL code, I
lost all the data in the target table.
When you modify a target definition, the Designer can drop and recreate the table. It cannot
issue an ALTER TABLE command to change or add columns. If you need to modify the
table, back up the data in a temporary table before you drop and recreate the table.
Alternatively, you can issue the ALTER TABLE command, but you need to be careful to
match the exact target definition now stored in the repository.
When I connect to a database to import target definitions, I do not see the tables, views, or
synonyms I want to import.
Make sure you entered the correct owner name when connecting to the database. By default,
the owner name the Designer uses to identify sources and targets for import is the same as the
database username you used to connect to the database. You may need to enter a different
owner name to see the targets you want to import.
Instead of showing me a target when I drag it into a workspace, the Designer prompts me
to copy it or make a shortcut.
Each workbook represents metadata from a single folder. While you can change the tool mode
(for example, Source Analyzer or Warehouse Designer) used to view metadata in that folder,
the workbook remains tied to the folder. If you want to edit metadata from a different folder,
move the focus in the Navigator window to the second folder and click Open. The Designer
then opens another workbook, representing metadata from the second folder.
When I open a target definition appearing in a mapping, I cannot edit it.
The Mapping Designer is where you create mappings, not where you create and modify
source and target definitions. The Designer divides the process of adding source definitions,
target definitions, and mappings into separate modes of the Designer, to help you keep these
processes distinct. If you want to modify a target definition, switch to the Warehouse
Designer.
When I try to run a workflow that includes targets I have designed, the session log tells me
that one or more target tables does not exist.
When you are designing a target, you are adding a target definition to the repository. To
actually create the target table, run the necessary SQL DDL code in the database where you
want the target to appear.
Troubleshooting
89
I imported a target from a DB2 database and received an SQL0954C error message from
the DB2 operating system.
If the value of the DB2 system variable APPLHEAPSZ is too small when you use the
Designer to import targets from a DB2 database, the Designer reports an error accessing the
repository. The Designer status bar shows the following message:
SQL Error:[IBM][CLI Driver][DB2]SQL0954C: Not enough storage is available
in the application heap to process the statement.
If you receive this error, increase the value of the APPLHEAPSZ variable for your DB2
operating system. APPLHEAPSZ is the application heap size (in 4KB pages) for each process
using the database.
90
Chapter 4
Overview, 92
Troubleshooting, 130
91
Overview
You can use flat files as sources and targets in a mapping. To do so, you must first define flat
file sources and targets in the repository. You can import or create flat file source definitions
in the Source Analyzer. You can import or create flat file target definitions in the Warehouse
Designer.
After you create file source and target definitions, you can use them in mappings.
Note: Because source definitions must exactly match the source, Informatica recommends
92
File type
Delimiter type, quote character, and escape character for delimited files
When you import a flat file, the Flat File Wizard changes invalid characters and spaces into
underscores ( _ ).
For example, you have the source file sample prices+items.dat. When you import this flat
file in the Designer, the Flat File Wizard names the file definition sample_prices_items by
default.
93
The Flat File Wizard allows the following character sets for fixed-width and delimited flat
files:
US-ASCII
8-bit ASCII
ASCII-based MBCS
EBCDIC-based MBCS
For delimited files, specify delimiters, optional quotes, and escape characters that are
contained in the source file code page. For fixed-width files, specify null characters as either a
binary value from 0 to 255 or a character from the selected code page.
When you configure the flat file definition, use delimiters, escape characters, and null
characters that are valid in the code page necessary to run a workflow.
ASCII data movement mode. Use characters from the ISO Western European Latin 1
code page. Any 8-bit characters you specified in previous versions of PowerCenter and
PowerMart are still valid.
Unicode data movement mode. Use characters from the code page you define for the flat
file.
Tip: You can select a display font and language script for the Flat File Wizard. You might want
to do this if the current font does not support the source file code page. For details on
configuring display fonts in the Designer, see Customizing Designer Default Options on
page 5.
94
2.
Select the file you want to use, and select a code page.
Code pages display that are compatible with the repository code page. When you import
a flat file source definition, select a code page that is a subset of the Informatica Server
code page.
When you import a flat file target definition, select a code page that is a superset of the
Informatica Server code page.
3.
Click OK.
The contents of the file appear in the window at the bottom of the Flat File Wizard.
95
4.
5.
Required/
Optional
Description
Required
Required
Optional
Indicates the row number at which the Flat File Wizard starts reading
when it imports the file.
For example, if you specify to start at row 2, the Flat File Wizard skips
1 row before reading.
Optional
If selected, the Designer uses data in the first row for column names.
Select this option if column names appear in the first row. Invalid field
names are automatically prepended with FIELD_.
Click Next.
Follow the directions in the wizard to manipulate the column breaks in the file preview
window. Move existing column breaks by dragging them. Double-click a column break to
delete it.
For shift-sensitive files, the Flat File Wizard displays single-byte shift characters as . in
the window. Double-byte shift characters display as .. in the window so you can
configure the column breaks accurately.
96
6.
Click Next.
Required/
Optional
Name
Required
The port name that you want to appear for each column. If you
select Import Field Names from First Line, the wizard reads the
column names provided in the file.
Datatype
Required
7.
Click Finish.
8.
Choose Repository-Save.
Description
Note: If the file size exceeds 256 KB or contains more than 16 KB of data for each row, verify
that the Flat File Wizard imports the file with the correct field precision and width. If not,
adjust the field precision and width in the Flat File Wizard or in the imported definition.
Importing Flat Files
97
2.
Select the file you want to use, and select a code page.
Code pages display that are compatible with the repository code page. When you import
a file source definition, select a code page that is a subset of the Informatica Server code
page.
When you import a file target definition, select a code page that is a superset of the
Informatica Server code page.
3.
98
Click OK.
The contents of the file appear in the preview window at the bottom of the Flat File
Wizard.
4.
5.
Required
/Optional
Description
Required
Required
Optional
Indicates the row number at which the Flat File Wizard starts reading
when Flat File Wizard imports the file.
For example, if you specify to start at row 2, the Flat File Wizard skips
1 row before reading.
Optional
If selected, the Designer uses data in the first row for column names.
Select this option if column names appear in the first row. Invalid field
names are automatically prepended with FIELD_.
Click Next.
99
Any incorrectly parsed fields display in red text in the file preview window at the bottom
of this screen.
6.
100
Required/
Optional
Delimiters
Required
Treat Consecutive
Delimiters as One
Optional
Escape Character
Optional
Remove Escape
Character From Data
Optional
Description
Required/
Optional
Optional
If selected, the Flat File Wizard uses the entered default text
length for all string datatypes.
Text Qualifier
Required
Description
7.
Click Next.
8.
101
To switch between columns, select a new column in the Source Definition group or
Target Definition group, or click the column heading in the file preview.
Delimited Flat File
Wizard, Step 3 of 3
Required/
Optional
Name
Required
The port name that you want to appear for each column. If you
select Import Field Names from First Line, the wizard reads the
column names provided in the file instead.
Datatype
Required
9.
Click Finish.
10.
Choose Repository-Save.
Description
Note: If the file size exceeds 256 KB or contains more than 16 KB of data for each line, verify
that the Flat File Wizard imports the file with the correct field precision. If not, adjust the
field precision in the Flat File Wizard or in the imported definition.
102
Table tab. Edit properties such as table name, business name, and flat file properties.
Columns tab. Edit column information such as column names, datatypes, precision, and
formats.
Properties tab. You can view the default numeric and datetime format properties in the
Source Analyzer and the Warehouse Designer. You can edit these properties for each source
and target instance in a mapping in the Mapping Designer. For more information, see
Defining Default Datetime and Numeric Formats on page 124.
Metadata Extensions tab. You can extend the metadata stored in the repository by
associating information with repository objects, such as flat file definitions. For more
information, see Metadata Extensions in the Repository Guide.
Note: If the file for a source definition changes significantly, you may need to re-import the
103
You can edit the following options on the Table tab of a flat file source or target definition:
Business name. Add a more descriptive name to the source or target definition.
Keywords. Allows you to keep track of your flat file targets. As development and
maintenance work continues, the number of targets increases. While all of these targets
may appear in the same folder, they may all serve different purposes. Keywords can help
you find related targets. Keywords can include developer names, mappings, or the
associated schema.
You can use keywords to perform searches in the Repository Manager. For details on
keyword searches in the Repository Manager, see Using the Repository Manager in the
Repository Guide.
104
Database type. Define the source or target type. Choose Flat File for flat file sources and
targets.
Flat file information. When the database type is flat file, you can define the flat file
properties by clicking the Advanced button.
In the Source Analyzer, double-click the title bar of the source definition.
In the Warehouse Designer, double-click the title bar of the target definition.
The Edit Tables dialog box appears.
2.
Click the Rename button to edit the source or target name and the business name.
3.
4.
5.
6.
To add keywords for target definitions, click Edit Keywords. The Edit Keywords dialog
box appears. Use the buttons to create and move keywords.
Move Down
Move Up
Delete Keyword
New Keyword
7.
Click OK.
8.
105
Editing Columns
Figure 4-2 shows the options you can edit on the Columns tab of flat file source and target
definitions:
Figure 4-2. Source Definition Column Tab
You can edit the following information in the Columns tab of a source or target definition:
Column Name. The names of columns in the flat file source or target.
Datatype. The datatype of the column. For flat files, you can choose datetime, nstring,
number, or string.
Precision, Scale, and Format. When importing file sources and targets, you often need to
consider the precision, scale, field width, and format of values in each column. You can
edit the field width and format by clicking in the Format column. Enter the precision,
scale, and format as necessary. For more details on formatting flat file columns, see
Formatting Flat File Columns on page 116.
Not Null. Choose whether you want to allow null data in your source or target.
Key Type. Choose NOT A KEY for flat file source and target definitions.
Shift Key. You can define the shift state for shift-sensitive fixed-width flat file sources that
do not contain shift keys. This attribute appears when you select User Defined Shift State
in the Edit Flat File Information dialog box for fixed-width files.
Choose Shift-In if the column contains single-byte characters. Choose Shift-Out if the
column contains multibyte characters.
For more information, see Working with Shift-Sensitive Flat Files on page 126.
Business Name. Optionally, you can add business names to each source or target field.
Note: If the file columns for a source definition change significantly, you may need to re-
In the Source Analyzer, double-click the title bar of a flat file source definition.
-orIn the Warehouse Designer, double-click the title bar of a flat file target definition.
2.
3.
4.
5.
Enter the name, datatype, and other characteristics of the column. Repeat these steps for
each column you want to add to the source or target definition.
6.
If you want to move a column, use the Up and Down buttons, or drag it within the
scrolling list.
7.
Click OK.
8.
Choose Repository-Save.
107
Figure 4-3 shows the Edit Flat File Information - Fixed Width Files dialog box for source
definitions:
Figure 4-3. Fixed-Width File Properties Dialog Box for Sources
Figure 4-4 shows the Edit Flat File Information - Fixed Width Files dialog box for target
definitions:
Figure 4-4. Fixed-Width File Properties Dialog Box for Targets
108
Table 4-1 describes the fixed-width file properties that you can configure for source and target
definitions:
Table 4-1. Fixed-Width File Properties
Fixed-Width
Advanced Setting
Null Character
Repeat Null
Character
Code Page
Line Sequential
N/A
Number of initial
rows to skip
N/A
109
Number of bytes to
skip between
N/A
N/A
N/A
110
Table 4-2 describes how the Informatica Server uses the Null Character and Repeat Null
Character properties to determine if a column is null:
Table 4-2. Null Character Handling
Null
Character
Repeat Null
Character
Binary
Disabled
Non-binary
Disabled
Binary
Enabled
Non-binary
Enabled
111
Figure 4-6 shows the Edit Flat File Information - Delimited Files dialog box for target
definitions:
Figure 4-6. Delimited File Properties Dialog Box for Targets
112
Table 4-3 describes the delimited file properties that you can configure:
Table 4-3. Delimited File Properties
Delimited File
Advanced Settings
Delimiters
Treat Consecutive
Delimiters as One
N/A
Optional Quotes
Code Page
113
Escape Character
N/A
Remove Escape
Character From Data
N/A
N/A
The delimiter character, quote character, and escape character must all be different for a
source definition. These properties must also be contained in the source or target file code
page.
The escape character and delimiter must be valid in the code page of the source or target
file. If you plan to run a workflow in ASCII data movement mode, use characters in the
ISO Western European Latin 1 code page. If you plan to use Unicode data movement
mode, use characters that are supported by the flat file code page.
In a quoted string, you can use the escape character to escape the quote character. If the
escape character does not immediately precede a quote character, the Informatica Server
reads the escape character as an ordinary character.
Use an escape character to escape the delimiter. However, in a quoted string, you do not
need to use an escape character to escape the delimiter since the quotes serve this purpose.
If the escape character does not immediately precede a delimiter character, the Informatica
Server reads the escape character as an ordinary character.
When two consecutive quote characters appear within a quoted string, the Informatica
Server reads them as one quote character. For example, the Informatica Server reads the
following quoted string as Im going tomorrow:
2353,Im going tomorrowMD
114
The Informatica Server reads a string as a quoted string only if the quote character you
select is the first character of the field.
If the field length exceeds the column size defined in the Source Qualifier transformation,
the Informatica Server truncates the field.
If the row of data exceeds the larger of the line sequential buffer length or the total row size
defined in the Source Qualifier transformation, the Informatica Server drops the row and
writes it to the session log file. To determine the row size defined in the Source Qualifier
transformation, add the column precision and the delimiters, and then multiply the total
by the maximum bytes per character.
115
Precision. Precision is defined differently for different datatypes. Table 4-4 defines
precision and field width for file sources and targets. Precision includes scale.
Scale. Scale is the maximum number of digits after the decimal point for numeric values.
Field width. Field width is the number of bytes the Informatica Server reads from or writes
to a file. Field width applies to fixed-width file sources and targets only. Field width must
be greater than or equal to the precision.
Table 4-4 defines precision and field width for flat file definitions:
Table 4-4. Precision and Field Width Definitions for Flat File Definitions
Datatype
Number
Datetime
String
For more information on precision and scale, see Datatype Reference on page 487.
116
For numeric values, you can choose thousands and decimal separators. For example, you
can configure the file definition for numeric data with the following format:
1.000.000,95
Note: If the source file changes significantly, you may need to re-import the flat file source
definition.
You can define the appearance of number and datetime columns at the following locations:
Source or target field. You can define the format for individual columns on the
Columns tab for the source in the Source Analyzer, or for the target in the Warehouse
Designer. For more information, see Formatting Numeric Columns on page 117 and
Formatting Datetime Columns on page 121.
Source or target instance in a mapping. You can define the default datetime and
numeric formats for a source or target instance in a mapping in the Mapping Designer.
The Informatica Server uses the default formats you define when you do not define a
format for an individual column. For more information, see Defining Default
Datetime and Numeric Formats on page 124.
definition.
117
Figure 4-7 shows the Column Format Settings dialog box that appears when you click the
Format column for a numeric value:
Figure 4-7. Column Format Settings Dialog Box for Number Columns
Numeric Formatting
Options
You can define the following formatting options for numeric values in the Column Format
Settings dialog box:
Numeric data
Field width
When you define formatting options in the Column Format Settings dialog box, the Designer
shows the options you define in the Format column on the Columns tab. For more
information, see Format Column on page 119.
Numeric Data
You can define decimal and thousands separators in the numeric data area of the Column
Format Settings dialog box. For the decimal separator, you can choose a comma or a period.
The default is the period. For the thousands separator, you can choose no separator, a comma,
or a period. The default is no separator.
To specify numeric separators, click Override Separators and choose a separator from the
Decimal Separator and Thousands Separator fields. You can override one or both separators.
When you override the separators, you must choose different options for each.
For example, your source data contains a numeric field with the following data:
9.999.999,00
5.000.000,00
Choose the period as the thousands separator, and choose the comma as the decimal separator
in the flat file source definition.
Suppose you want to output the data above to a file target with the following format:
9,999,999.00
118
Choose the comma as the thousands separator, and choose the period as the decimal separator
in the flat file target definition.
Field Width
You can change the field width in the Column Format Settings dialog box by padding the
width or by defining a fixed width value in bytes. By default, the field width equals the
precision.
When you want to output numeric data to a fixed-width flat file, you must configure the field
width for the target field to accommodate the total length of the target field. If the data for a
target field is too long for the field width, the Informatica Server rejects the row and writes a
message to the session log. When you configure the field width for flat file target definitions,
you must accommodate characters the Informatica Server writes to the target file, such as
decimals and negative signs. For details, see Working with Targets in the Workflow
Administration Guide.
To adjust the field width, select Adjust Width and enter the number of bytes in the Padding
field. When you adjust the field width, the Informatica Server defines the field width as the
field precision plus the padding you enter. For example, when the precision of a field is 10
and you enter 5 in the Padding field, the Informatica Server reads 15 bytes from a file source,
and it writes 15 bytes to a file target.
To fix the field width, select Fixed Width and enter the number of bytes in the Field Width
field. The Designer allows you to enter a field width greater than or equal to the precision.
When you enter 20 in the Field Width field, the Informatica Server reads 20 bytes from a file
source, and it writes 20 bytes to a file target.
For example, you have a target field with a precision of 4, scale of zero. You want to add two
blank spaces to the target field to make the target file easier to view. Select Adjust Width and
enter 2 in the Padding field. Or, select Fixed Width and enter 6 in the Field Width field.
When padding numeric data in flat file targets, the Informatica Server adds blank spaces to
the left side of the target column.
Note: You might adjust the field width for a target field if you think another user might change
the precision of the field. That way, when the precision changes, the field width adjusts
accordingly.
Format Column
When you override the numeric separators or define the field width, the Designer shows the
options you define in the Format column on the Columns tab. For example, suppose you have
119
a numeric column with a precision of 5. Click the Format column and define the options in
the Column Format Settings dialog box as described in Figure 4-8:
Figure 4-8. Numeric Formatting Options Example
Figure 4-9 shows the format options the Designer displays in the Format column:
Figure 4-9. Format Options for Numeric Flat File Columns
Format Options
Indicates a decimal separator.
Displays the separator you
specified.
Displays the field width and
precision in bytes. The first
number is the field width, the
second is the precision.
The Designer displays N,NNN(F 6.5).NN in the Format column for the PRICE column.
Note: If you do not define a decimal and thousands separators for a particular source or target
field, the Informatica Server uses the separators you specify in the source or target instance in
120
the Mapping Designer. For more information, see Defining Default Datetime and Numeric
Formats on page 124.
You can define the following formatting options for datetime values in the Column Format
Settings dialog box:
Format string
Field width
When you define formatting options in the Column Format Settings dialog box, the Designer
shows the options you define in the Format column on the Columns tab. For more
information, see Format Column on page 123.
Format String
You can enter any datetime format in the Format String field in the Column Format Settings
dialog box. For example, you can specify the datetime format as MM/YYYY. Or, you can
specify the time only, for example, HH24:MI. For a list of supported date and time formats,
see Dates in the Transformation Language Reference.
To specify the datetime format, choose Format String and enter the format in the Format
String field. You can choose a format from the drop down list, or you can enter a format using
121
the keyboard. The default format is MM/DD/YYYY HH24:MI:SS, which has a field width of
19.
For example, your source data contains a datetime field with the following data:
11/28/2002
10/15/2003
Enter the following format in the flat file source definition: MM/DD/YYYY.
Suppose you want to output the data above to a file target with the following format:
28-11-2002
15-10-2003
Enter the following format in the flat file target definition: DD-MM-YYYY.
You can also enter any single-byte or multibyte string literal in the Format String field. To
enter a string literal, enclose it in double quotes (). When you enter string literals in the
format string, the Informatica Server writes the strings to the file target when it runs the
session. You might want to add string literals to describe the different date parts.
For example, you enter the following text in the Format String field:
MonthMM/DayDD/YearYYYY
When you run the session and the Informatica Server outputs the date October 21, 2002, it
writes the following to the target file:
Month10/Day21/Year2002
Field Width
You can define the field width after you define a format string. You can change the field width
by padding the width or by defining a fixed width value in bytes. By default, the field width
equals the precision.
To adjust the field width after you enter a format string, select Adjust Width and enter the
number of bytes in the Padding field. When you adjust the field width, the Informatica Server
defines the field width as the number of bytes required for the datetime format plus the
padding you enter. For example, when the datetime format is MM/YYYY and you enter 5 in
the Padding field for a flat file source, the Informatica Server reads 12 bytes from the file.
When the datetime format is MM/YYYY and you enter 5 in the Padding field for a flat file
target, the Informatica Server writes 12 bytes to the file.
When you use Adjust Width, the Informatica Server adjusts the field width based on the
format string. This allows you to change the format string without manually adjusting the
field width.
To fix the field width after you enter a format string, select Fixed Width and enter the number
of bytes in the Field Width field. You must specify a fixed width value greater than or equal to
the number of bytes required for the datetime format. For example, when the datetime format
is MM/DD/YYYY HH24:MI:SS, you must specify a fixed width value greater than or equal
122
to 19. When you enter 21 in the Field Width field, the Informatica Server reads 21 bytes from
a file source, and it writes 21 bytes to a file target.
For example, suppose you have a target field with a datetime format of MM/DD/YYYY,
which requires 10 bytes. You want to add two blank spaces to the target field to make the
target file easier to view. Select Adjust Width and enter 2 in the Padding field. Or, select Fixed
Width and enter 12 in the Field Width field.
Note: When padding datetime data in flat file targets, the Informatica Server adds blank spaces
Format Column
When you choose a datetime format or define the field width, the Designer shows the options
you define in the Format column on the Columns tab.
For example, suppose you define the options in the Column Format Settings dialog box as
described in Figure 4-11:
Figure 4-11. Datetime Formatting Options Example
123
Figure 4-12 shows the options the Designer displays in the Format column:
Figure 4-12. Format Options for Datetime Flat File Columns
Format Options
Displays the datetime format
you specified.
Displays the field width
in bytes.
Indicates an adjusted field width.
Displays F when you specify a
fixed field width.
The Designer displays A 23 MM/DD/YYYY HH24:MI:SS in the Format column for the
DATE column.
Note: If you do not define a datetime format for a particular source or target field, the
Informatica Server uses the datetime format you specify in the source or target instance in the
Mapping Designer. Defining Default Datetime and Numeric Formats on page 124.
The Informatica default date format MM/DD/YYYY HH24:MI:SS for the datetime format
Define the default formats for a source or target instance in a mapping in the Mapping
Designer. Double-click the file source or target instance in a mapping and click the Properties
tab.
124
Figure 4-13 shows the Properties tab of a flat file target definition where you define the
default formats:
Figure 4-13. Default Datetime and Numeric Formats in a Flat File Target Instance
You can enter any datetime
format in the Datetime Format
field.
You can choose no separator,
a comma, or a period. The
default is no separator.
You can choose a comma or
a period. The default is the
period.
For more information on defining the format string for datetime columns, see Formatting
Datetime Columns on page 121. For a list of supported date formats, see Dates in the
Transformation Language Reference.
Note: You can view the default formats for each source or target instance on the
125
Description
a
A
-o
-i
Single-byte character
Multibyte character
Shift-out character
Shift-in character
The Flat File Wizard displays single-byte shift characters as . in the window. Double-byte
shift characters display as .. in the window. Shift-in characters display on a green
background. Shift-out characters display on a blue background.
126
A shift-out and a shift-in character must enclose all multibyte characters. Single-byte
characters do not need to be enclosed with shift characters.
A file cannot contain nested shift characters. For example, you cannot have the following
sequence:
-oAA-oAA-iaaa
The Flat File Wizard disables the fixed-width option if your file has a multibyte character that
contains more than two bytes per character. Each row in a file must not exceed 16 KB.
The Flat File Wizard validates up to 500 rows or 256 KB of data, whichever comes first. If the
file does not meet the above requirements, the Informatica Server writes errors to the session
log.
verify the code page in the Workflow Manager is the same as the code page you chose in the
Designer. If you choose a different source code page in the Workflow Manager, the
Informatica Server does not use the shift keys you defined in the Designer. For more
information, see Working with Sources in the Workflow Administration Guide.
To define shift states for fixed-width shift-sensitive files:
1.
2.
In the Source Analyzer, double-click the title bar of the file source definition.
3.
In the Flat File Information section of the Table tab, select Fixed Width and click
Advanced.
127
The Edit Flat File Information - Fixed Width Files dialog box appears.
4.
5.
Shift Keys
6.
7.
128
Click OK.
129
Troubleshooting
I am running a workflow containing multibyte data. When I try to select a code page for a
flat file target using the Flat File Wizard, the code page I want to use is not available.
Using the Flat File Wizard to import a target definition limits the code pages available for the
target flat file. The Flat File Wizard only displays code pages that are a subset of the repository
code page. To generate a flat file target in a code page that is not supported in the Flat File
Wizard, create a target using Target-Create in the Warehouse Designer, and then choose the
code page you want.
130
Chapter 5
XML Concepts
This chapter includes the following topics:
Pivoting, 162
Limitations, 165
131
Parent element. An element that contains other elements. It can also contain data.
Enclosure element. An element that contains other elements but does not contain data. It
can also contain other enclosure elements.
Leaf element. An element that does not contain other elements. It refers to the lowest level
element in an XML document hierarchy.
Multiple-occurring element. An element that occurs more than once within its parent
element. Multiple-occurring elements can be enclosure or non-enclosure elements.
Single-occurring element. An element that occurs only once within its parent element.
Single-occurring elements can be enclosure or non-enclosure elements.
Parent chain. The succession of child-parent elements that traces the path from an
element to the root element of the hierarchy.
Any term used to refer to an element is relative to the hierarchy. An element might fall into
more than one category depending on its position in the hierarchy. For example, if a child
element contains other elements, it is also a parent element. An element is a leaf element and
132
also a multiple-occurring element if it does not contain any other element and occurs
multiple times within its parent element.
Figure 5-1 shows the different terms that Informatica uses to refer to elements in an XML
hierarchy:
Figure 5-1. Informatica Terms for Elements in the XML Hierarchy
Enclosure Element:
Element Address encloses
elements StreetAddress, City,
State, and Zip. Element
Address is also a Parent
element.
Leaf Element:
Element Zip, along with all its
sibling elements, is the
lowest level element within
element Address.
Multiple-occurring Element:
Element Sales occurs more
than once within element
Product.
Single-occurring Element:
Element PName occurs only
once within element Product.
Child Element:
Element PName is a child
element of root element
Store.
Parent Chain:
Element YTDSales is a child of element Sales which is a child of element
Product which is a child of root element Store. All these elements belong in
the same parent chain.
133
Name
Datatype
Null Constraint
Hierarchy
Cardinality
The Designer requires a lot of memory and resources to parse very large XML files and extract
metadata for source or target definitions. To ensure that the Designer creates an XML source
or target definition quickly and efficiently, Informatica recommends that you import source
or target definitions only from XML files that are no larger than 100K or from DTD or XML
schema files. If you want to import from a very large XML file that has no DTD or XML
schema file, decrease the size of the XML file by deleting duplicate data elements. You do not
need all of your data to import an XML source or target definition. You need only enough
data to accurately show the hierarchy of your XML file and enable the Designer to create a
source or target definition.
Name
In an XML file, each tag is the name of an element or attribute. In a DTD file, the tag
<!ELEMENT> indicates the name of an element while the tag <!ATTLIST> indicates the set
of attributes for an element. In an XML schema file, <element name> indicates the name of
an element while <attribute name> indicates the name of an attribute.
Datatype
When you import a source or target definition from an XML file without a DTD, the
Designer reads each element to determine the datatype and precision. The Designer assigns
either a number or a string datatype.
When you import a source definition from a DTD file, the Designer assigns all elements the
datatype of number with a precision of one.
When you import a source definition from an XML schema file, the Designer uses the
datatype defined for each element in the schema file. If no datatype is defined in the XML
schema file, the Designer supplies a datatype of number.
134
The specification for the XML schema allows the use of a number of datatypes. For more
information on XML datatypes, see the W3C specifications for XML datatypes at
http://www.w3.org/.
For information on how PowerCenter and PowerMart use XML datatypes, see XML and
Transformation Datatypes on page 504.
Null Constraint
The absolute cardinality of an element or attribute determines its null constraint. An element
that has an absolute cardinality of One or More(+) cannot have null values while an element
with a cardinality of Zero or More(*) can have null values. An attribute marked #REQUIRED
or #FIXED in a DTD file cannot have null values while an attribute marked #IMPLIED can
have null values. When you import an XML source or target definition, the Designer sets the
null constraints for the columns depending on the absolute cardinality of the element or
attribute the column points to. For more information on absolute cardinality, see Absolute
Cardinality on page 135.
Hierarchy
The position of an element in an XML hierarchy depicts its relationship to other elements. In
PowerCenter and PowerMart, the relationship among elements in the hierarchy determines
how elements are grouped in a source or target definition and how keys can be set in the
groups. Groups depict the relationship between elements in the hierarchy through primary
and foreign keys.
Cardinality
PowerCenter and PowerMart distinguish between two types of cardinality:
Absolute cardinality
Relative cardinality
Absolute Cardinality
The absolute cardinality of an element is the number of times an element occurs within its
parent element in an XML hierarchy. An XML file demonstrates the absolute cardinality of an
element by the number of occurrences of the element. Both DTD and XML schema files
explicitly describe the absolute cardinality of elements within the hierarchy. A DTD file uses
symbols, and an XML schema file uses the <minOccurs> and <maxOccurs> attributes to
describe the absolute cardinality of an element.
For example, an element has an absolute cardinality of Once(1) if it occurs only once within
its parent element. However, it might occur many times within an XML hierarchy if its parent
element has a cardinality of One or More(+).
135
Table 5-1 shows the possible absolute cardinality of an element in an XML hierarchy and how
it is expressed in a DTD and an XML schema file. The last column in the table shows the
terms PowerCenter and PowerMart use to define the absolute cardinality of an element.
Table 5-1. Possible Cardinality of Elements in XML
Occurrence
DTD
Schema
PowerCenter/
PowerMart
Zero or once
minOccurs=0 maxOccurs=1
Zero or One(?)
minOccurs=0 maxOccurs=unbounded
minOccurs=0 maxOccurs=n
Zero or More(*)
minOccurs=1 maxOccurs=1
Once(1)
minOccurs=1 maxOccurs=unbounded
minOccurs=1 maxOccurs=n
One or More(+)
Once
One or more times
136
Relative Cardinality
Relative cardinality is the relationship of an element to another element in the XML
hierarchy. An element can have a one-to-one, one-to-many, or many-to-many relationship to
another element in the hierarchy. The relative cardinality of elements in an XML hierarchy
affects how groups are created in a source or target definition. Relative cardinality determines
whether elements can be part of the same group or not.
For example, in the sample file StoreInfo.xml in Figure 5-3, you can determine an elements
relative cardinality by analyzing its parent chain and evaluating its position in relation to
other elements in the hierarchy.
Figure 5-3 illustrates several types of relative cardinality:
Figure 5-3. Relative Cardinality of Elements in StoreInfo.xml
One-to-Many Relationship
Many-to-Many Relationship
One-to-One Relationship
One-to-Many Relationship
137
Many-to-many relationship. In the many-to-many relationship example, the singleoccurring element STATE is a child element of ADDRESS, which is a multiple-occurring
child element of the root element STORE.
The element YTDSALES is a child element of SALES. Element SALES is a multipleoccurring child element of PRODUCT, which is a child element of the root element
STORE.
Element STATE has a many-to-many relationship with YTDSALES. Elements STATE and
YTDSALES do not belong to the same parent chain. They cannot both belong to the same
group.
machine that runs the Designer must have access to the machine where the DTD resides so
that the Designer can read the DTD.
If you import an XML file with any type of DTD, the Designer extracts the metadata for the
source definition based on the DTD structure and uses the data in the XML file only to
display sample data values. You can import a source or target definition from an XML file
with an external DTD that defines more than one hierarchy. The Designer extracts the
metadata for the source definition from the correct DTD hierarchy based on the root
element.
You can also import a source definition from an XML file whose elements and attributes
include only a portion of the hierarchy defined in its associated DTD.
Figure 5-4 shows an example of an XML file with only a portion of the hierarchy defined in
its associated DTD and the source definition that the Designer creates:
Figure 5-4. Source Definition from a Partial XML
StoreInfo.dtd contains the definition
of the Store hierarchy which includes
the Product hierarchy.
Product source definition contains only the Product and Sales group. The
XML file determines the groups but the DTD file determines the structure.
139
You can configure the Designer to validate the XML data against the structure described in an
internal or external DTD. Although the Designer uses the DTD to determine the structure of
an XML file, the Designer does not automatically validate the XML file against the DTD.
You must enable the Validate XML Content option in the Designer. For more information on
configuring the Designer, see Configuring General Options on page 5.
If you import an XML file with an associated XML schema, the Designer ignores the schema
and extracts all metadata for the source definition only from the XML file. PowerCenter and
PowerMart currently do not validate XML files against XML schema files.
Figure 5-5 shows the parts of an XML file that PowerCenter and PowerMart use to extract
data and metadata:
Figure 5-5. Sample XML File: StoreInfo.xml
Root Element
[Metadata]
Enclosure
Element
[Metadata]
Element Data
[Data]
Element
[Metadata]
Element Data
[Data]
Attribute Value
[Data]
Attribute
[Metadata]
140
Although DTD files do not provide datatypes for elements, the files can contain datatypes for
attributes. PowerCenter and PowerMart extract any datatype defined for attributes in a DTD
file as metadata.
You can define the elements and attributes of more than one XML hierarchy in one DTD file.
However, the Designer only imports the first hierarchy in a DTD file. If there is more than
one hierarchy defined in a DTD file, the Designer imports metadata from the first hierarchy
and ignores any other XML hierarchies or elements in the DTD
If you import a source or target definition from a DTD file, make sure that the first hierarchy
in your DTD file is the hierarchy from which you want to import metadata.
Figure 5-6 shows the parts of a DTD file that PowerCenter and PowerMart use to extract
metadata:
Figure 5-6. Sample DTD: StoreInfo.dtd
Root Element
[Metadata]
Element List
[Metadata]
Element Occurrence
[Metadata]
Attribute
[Metadata]
Null Constraint
[Metadata]
Attribute Datatype
[Metadata]
141
Figure 5-7 shows the parts of an XML schema file that PowerCenter and PowerMart use to
extract metadata:
Figure 5-7. Sample XML Schema: StoreInfo.xsd
Root Element
[Metadata]
Attribute
[Metadata]
Attribute Type and Null
Constraint
[Metadata]
Element Data
[Metadata]
Element List and
Occurrence
[Metadata]
142
Table 5-2 shows a summary of the metadata that PowerCenter and PowerMart extract from
XML, DTD, and XML schema files. It shows which metadata is fixed and which you can
modify.
Table 5-2. Metadata from XML, DTD, and XML Schema Files
File Type
Names
Datatype
Null Constraint
Hierarchy
Cardinality
Fixed
Variable
Variable
Fixed
Variable
Fixed
Variable
Variable
Fixed
Fixed
DTD
Fixed
Variable
Variable
Fixed
Fixed
XML Schema
Fixed
Fixed
Variable
Fixed
Fixed
143
XML Groups
PowerCenter and PowerMart represent the XML element hierarchy in the source or target
definition as logical groups. Each logical group represents a subset of the XML hierarchy. An
XML, DTD, or XML schema file converts to one or more groups. The groups are made up of
columns (elements and attributes) and rows (occurrences of elements) and are analogous to
tables in a relational source or target definition.
XML groups can be either normalized or denormalized groups. A normalized group has only
one multiple occurring element, while a denormalized group has more than one multiple
occurring element.
An XML source or target definition consists of at least one group. The Designer can create
groups for source and target definitions based on XML, DTD, and XML schema files. The
Designer can also create XML groups for target definitions from relational tables. The groups
that the Designer creates are called default groups.
For source definitions, you can configure the Designer to create normalized or denormalized
default groups. For target definitions, the Designer always creates normalized default groups.
You cannot create or modify target groups.
If you do not choose to create default groups for the source definition, the Designer creates an
empty source definition. You can update the source definition and manually build groups and
columns. The groups that you build are called custom groups. You can build normalized or
denormalized custom groups.
The definition of groups and columns for a source or target becomes part of the XML
metadata that PowerCenter and PowerMart save to the repository.
Column names in the groups are unique within a source or target definition.
The Designer validates any group you create or modify. When you try to create a group that
does not follow these constraints, the Designer returns an error message and does not create
the group.
Note: If the target definition consists of only one group, then it does not require a primary key
or a foreign key.
144
Normalized Groups
A normalized group is a valid group that contains only one multiple-occurring element. In
most cases, XML sources contain more than one multiple-occurring element and convert to
more than one normalized group.
The following rules apply to normalized groups:
Denormalized Groups
A denormalized group has more than one multiple-occurring element. The multipleoccurring elements can have a one-to-many relationship, but not a many-to-many
relationship. All the elements in a denormalized group belong to the same parent chain.
Source definitions can have denormalized groups, but target definitions cannot have
denormalized groups.
Denormalized groups, like denormalized relational tables, generate duplicate data. It can also
generate null data. Make sure you filter out any unwanted duplicate or null data before
passing data to the target.
The following rules apply to denormalized groups:
Denormalized groups can exist in a source definition, but not in a target definition.
For an example of a denormalized group used in a mapping, see XML Source Qualifier
Transformation in the Transformation Guide.
145
any column as a key for a group, the Designer creates a column called Group Link Key to
hold a key for the group.
If a mapping contains an XML source, the Informatica Server generates the values for the
generated primary key columns in the source definition when you run the workflow. If a
mapping contains an XML target, you need to pass the values to the group link columns in
the target groups from the data in the pipeline.
Group keys and relationships follow these rules:
A group can be related to only one other group, and therefore can have only one foreign
key.
A key column can be a column that points to an element in the hierarchy or a column
created by the Designer. A group can have a combination of the two types of key columns.
A foreign key always refers to a primary key in another group. Self-referencing keys are not
allowed.
A foreign key column created by the Designer always refers to a primary key column
created by the Designer.
For an example of primary and foreign keys in groups, see Figure 5-9 on page 149 and Figure
5-10 on page 150.
146
A denormalized default group contains all elements of the hierarchy. Therefore, there can
be only one denormalized default group in a source definition.
The Designer can create denormalized default groups only in a source definition.
The Designer might not create default source groups and target groups in the same way. If
you import a source definition from an XML file and then import a target definition from the
same XML file, you might not get the same group structure. For more information on
importing source and target groups from the same XML file, see Troubleshooting on
page 217.
When you modify a default source group, the Designer validates every change or addition
against these rules. If any change or addition violates the rules, the Designer displays an error
message. You cannot modify a default target group.
The sections below illustrate the method by which PowerCenter and PowerMart create default
groups for an XML source or target definition.
147
PRODUCT*: Multiple-occurring
PNAME, PPRICE?:
Single-occurring
SALES*: Multiple-occurring
YTDSALES:
Single-occurring
EMPLOYEE+: Multiple-occurring
EPHONE*: Multiple-occurring
ENAME,
LASTNAME,
FIRSTNAME:
Single-occurring
When the Designer creates normalized default groups for a source or target definition from
the StoreInfo.dtd file, it analyzes the elements in the hierarchy to determine how to represent
the hierarchy as valid groups and which elements can be in the same group. The analysis
involves establishing the root element, the single-occurring elements, and the multipleoccurring elements in the hierarchy.
The Designer performs the following steps to create default groups based on the
StoreInfo.dtd:
1.
The Designer creates the first group based on the root element STORE. The STORE
attribute SID and the single-occurring child element SNAME can be in the same group.
Child elements ADDRESS, PRODUCT, and EMPLOYEE are all multiple occurring
elements. A group cannot contain more than one multiple-occurring element.
ADDRESS, PRODUCT, and EMPLOYEE therefore cannot be in the same group.
148
2.
3.
The Designer creates a third group PRODUCT. The child elements PNAME and
PPRICE are both single-occurring elements and can appear in the same PRODUCT
group. The element SALES is a multiple-occurring element and cannot be included in
the same group.
4.
The Designer creates a fourth group SALES. The SALES attribute REGION and the
single-occurring child element YTDSALES can be in the same group.
5.
The Designer creates a fifth group EMPLOYEE. The EMPLOYEE attribute DEPID can
be included in the group. The child element ENAME, with its single-occurring child
elements LASTNAME and FIRSTNAME can all be included in the same group. The
child element EPHONE is a multiple-occurring element and cannot be included in the
same group.
6.
The Designer creates a sixth group EPHONE with a single element, EPHONE.
Although the Designer uses the same process to create default groups for both source and
target groups, the groups in the source and target definitions do not look exactly the same.
Figure 5-9 shows a source definition based on the StoreInfo.dtd with normalized default
groups. The source definition shows some primary and foreign keys generated by the
Designer:
Figure 5-9. Source Definition for StoreInfo.dtd
149
Figure 5-10 shows a target definition based on the StoreInfo.dtd with normalized default
groups. The source definition shows the primary and foreign key columns created by the
Designer:
Figure 5-10. Target Definition for StoreInfo.dtd
150
Figure 5-11 shows a data preview for each group of the source definition if the Designer
imports the source definition from StoreInfo.xml with the associated StoreInfo.dtd:
Figure 5-11. Data from StoreInfo.xml
Group STORE
Group ADDRESS
Group PRODUCT
Group SALES
Group EMPLOYEE
Group EPHONE
151
Figure 5-12 shows the ProdAndSales.dtd file, a sample XML source file that the Designer can
convert to a denormalized default group. The ProdAndSales.dtd file contains two multiple
occurring elements. Because the multiple-occurring elements have a one-to-many
relationship, the Designer can create a single denormalized group that includes all elements.
Figure 5-12. Sample ProdAndSales.dtd
STORE: Root
PRODUCT*: Multiple-occurring
SALES*: Multiple-occurring
Figure 5-13 shows the denormalized default group for ProdAndSales.dtd in a source
definition. The group does not need a primary or foreign key.
Figure 5-13. Source Definition for ProdAndSales.dtd
The Designer creates a single group for all the elements in the
ProdAndSales hierarchy. Because a DTD file does not define
datatypes, the Designer assigns a datatype of number to all
columns.
Figure 5-14 shows a data preview for the denormalized group Store if the Designer imports
the source definition from ProdAndSales.xml with the associated ProdAndSales.dtd:
Figure 5-14. Data for ProdAndsales.xml
152
Every table name converts to an enclosure element within the hierarchy of the root
element.
Every column in a table except a foreign key converts to an element within the enclosure
element.
If a table contains a foreign key that relates to another table to be converted, the Designer
depicts the relationship in the hierarchy. The foreign key does not convert into an actual
element in the hierarchy.
If a table contains a foreign key that does not relate to another table to be converted, the
Designer does not include the foreign key relationship in the hierarchy.
A table can be related to only one other table, and therefore can have only one foreign key.
If a table contains more than one foreign key, the Designer does not include any of the
foreign key relationships in the XML hierarchy.
The Designer does not create the XML target groups based directly on the relational tables.
Once the Designer creates the XML hierarchy, it analyzes the hierarchy and creates the XML
target groups based on the hierarchy. If a table has a primary key, the Designer uses the same
key as the primary key for the group. If a table does not have a primary key, the Designer
creates a group link key column for the group.
If a table is not related to any of the other source tables you import, the Designer creates a
foreign key column to relate the group to the root group.
Since the Designer creates the groups and group relationships based on the XML hierarchy, it
does not use any of the original foreign key column names in the tables. The Designer
generates new names for the foreign key columns, although the keys still point to the same
primary keys and define the same relationships among the groups.
153
Figure 5-15 shows an example of relational tables converted into an XML hierarchy. The
letters A through F match each table with its corresponding enclosure element:
Figure 5-15. Relational Tables with Corresponding XML Hierarchy
XML Hierarchy
Relational Tables
A
E
F
B
A
C
C
D
This example shows how the Designer converts related tables into an XML hierarchy.
Because these sample tables do not have a strict hierarchical relationship with one
another, the Designer does not include all table relationships in the hierarchy. All groups
fall under the root group StoreOrders.
A: Table Order_Items has more than one foreign key. The Designer drops all the foreign
keys and depicts none of the table relationships in the XML hierarchy. It relates the group
directly to the root group StoreOrders.
B: Table Orders has more than one foreign key. The Designer drops all the foreign keys
and depicts none of the table relationships in the XML hierarchy. It relates the group
directly to the root group StoreOrders.
C and D: Table Stores has a foreign key Manager_ID relating to the primary key
Employee_ID in table Employees. In the hierarchy, the Stores element is a child element
of the Employees element. The foreign key Manager_ID does not show among the child
elements of element Stores.
E and F: Table Items has a foreign key relating to the primary key in table Distributors. In
the hierarchy, the Items element is a child element of the Distributors element. The foreign
key Distributor_ID does not show among the child elements of element Items.
Unrelated tables Order_Items, Orders, Employees, and Distributors are all elements
under the given root element StoreOrders.
154
Figure 5-16 shows the normalized default groups in a target definition based on the
StoreOrders hierarchy in Figure 5-15 on page 154. The names of primary and foreign keys in
the groups might not match the names of primary and foreign keys in the source tables:
Figure 5-16. Target Definition for Relational Tables
155
Keys and relationships between default groups follow the rules for keys and relationships
between valid groups.
When the Designer creates a column for a primary or foreign key, it assigns a name with a
prefix. In a source definition, the prefixes are GPK for a generated primary key column and
GFK for a generated foreign key column. The Designer uses the prefix FK for a foreign key
that points to a user-defined primary key.
For example, when the Designer generates a primary key column for the Sales group, it names
the column GPK_Sales. When it generates a foreign key column to connect the Sales group to
a primary key in a generated column in another group, it names the column GFK_Sales.
When it generates a foreign key column to connect a group to the user-defined primary key
column Product_ID in another group, it names the column FK_Product_ID.
For an example of primary and foreign keys in a source group, see Figure 5-9 on page 149.
In a target definition, the prefixes are LPK for a group link primary key column and LFK for
a group link foreign key column. As in the source definition, the Designer uses the prefix FK
for a foreign key that points to a user-defined primary key.
For example, when the Designer creates a group link primary key column in the Store group,
it names the column LPK_Store. When it creates a group link foreign key column to connect
the Address group to a group link primary key in another group, it names the column
LFK_Address. When it creates a group link foreign key column to connect a group to the
user-defined primary key column Employee_ID in another group, it names the column
FK_Employee_ID.
For an example of primary and foreign keys in a target group, see Figure 5-10 on page 150.
You can rename any of the column names assigned by the Designer.
156
157
Groups At Element
When you create or modify XML groups using the XML Group Wizard, the Designer
displays information to help you determine whether the groups you create include the data
that you expect. For each group, the Designer displays the Groups At element. For each
column in the group, the Designer displays the XML Map.
The XML Map shows you the path from the root element to a column and helps you
determine which element in the hierarchy provides the data for a column. For more
information on the XML Map, see XML Map on page 160.
The Groups At element in a group is the lowest multiple-occurring element in the group. In a
normalized group, there can be only one multiple-occurring element. In a denormalized
group, there can be more than one multiple-occurring element. The lowest multipleoccurring element becomes the Groups At element.
The Groups At element of the group affects which other elements you can add to the group
and which elements or attributes you can set as a key for the group. It also determines how the
Informatica Server creates rows for the group when it writes the data out to the target.
The examples in this section use the StoreInfo.dtd to illustrate the concept of the Groups At
element in a normalized and a denormalized group.
Figure 5-17 shows the StoreInfo.dtd and its XML hierarchy:
Figure 5-17. StoreInfo.dtd and Hierarchy
158
Figure 5-18 shows the Groups At element for the normalized default group Product of the
StoreInfo.dtd:
Figure 5-18. Groups At Element for Normalized Product Group
Groups At:
STORE/PRODUCT
The multiple-occurring element of the Product group is the enclosure element Product.
If you denormalize the Product group and add sales data to it, the Groups At element
changes. If you add the single-occurring element YTDSales to the Product group, the lowest
multiple-occurring element becomes Sales, which is the multiple-occurring parent element of
YTDSales. Although the element Sales is not found in the Product group, its existence is
implied by the inclusion of the element YTDSales. Note that adding another multipleoccurring element to a group might invalidate the primary key and you might have to remove
the key or set another element as primary key for the group.
Figure 5-19 shows the denormalized group Product with the new column YTDSales:
Figure 5-19. Groups At Element for Denormalized Product Group
Groups At:
STORE/PRODUCT/SALES
Groups At Element
159
XML Map
The representation of the position of an element or attribute in the hierarchy is called the
XML Map. The XML Map lists the full path from an element or attribute to the root element
of the XML hierarchy. Except for generated key columns and group link columns, each
column in a group refers to an attribute or an element in an XML hierarchy and has an XML
Map. The data found in the element or attribute depicted in the XML Map is the data that
goes into the associated column. Only one XML Map depicts the position of any one element
or attribute in the hierarchy.
PowerCenter and PowerMart use a slash (/) notation to depict the XML Map of a column.
The XML Map ensures integrity in the group column definition. If an element is included in
two different groups, then it has the same XML Map in both groups. The element also has the
same cardinality and column attributes in both groups.
Figure 5-20 shows the XML Maps for different elements and attributes in a hierarchy:
Figure 5-20. XML Map of Elements and Attributes in the StoreInfo.xml
STORE
STORE/SNAME
STORE/ADDRESS/STREETADDRESS
STORE/PRODUCT/PNAME
STORE/PRODUCT/SALES/YTDSALES
STORE/PRODUCT/PID
STORE/PRODUCT/SALES/REGION
160
Every column, except a generated key column and a group link column, has an XML Map
defined.
A foreign key column has the same XML Map as the primary key column to which it
refers.
All XML Maps in a source or target definition have one common root element.
When you save an XML source or target definition, the Designer saves the XML hierarchy of
your file and the XML Map of all your group columns as metadata in the repository. This
enables the Designer to validate changes to any group against the XML hierarchy. When you
update a source definition, the Designer displays the XML Map for all columns in the groups
and also shows the relationship between groups. When you change or add a column, you can
select an attribute or an element directly from the hierarchy tree.
The column names in a group do not have to match element or attribute names in the XML
Map. For example, you can have a column name Location_ID that has an XML Map of
STORE/SID. The Designer does not validate column names against element or attribute
names in the XML Map. Keep track of which element or attribute a column points to, and
keep column names meaningful.
Figure 5-21 shows some column names and XML Maps in a source definition:
Figure 5-21. Column Names in a Source Definition and Corresponding XML Map
Designer-generated
primary key
Column names different from
element names in XML Map
Primary key name changed from
name generated by Designer
Data in element
STORE/ADDRESS/CITY
goes into the column CITY.
XML Map
161
Pivoting
Sometimes an element that occurs multiple times is a set of similar elements that mean
different things. For example, an element called Sales that occurs 12 times might actually be
the sales figures for each month of the year. Or, an element called Address that occurs twice
might be a home address and an office address.
If you have this type of element in your XML source and you decide to treat the different
occurrences as separate columns in the source definition, you can use a method called
pivoting. Pivoting is a PowerCenter and PowerMart feature that enables you to treat
occurrences of elements as columns in a group.
To pivot occurrences of an element, you need to have a column in your group for each
occurrence you want to represent as a column. In the monthly sales example, if you want to
represent all 12 occurrences as columns, create 12 sales columns in the group to hold all the
sales figures. If you want to import only the sales of one quarter, create three columns. Note
that when you run a workflow, the Informatica Server ignores the data for the occurrences
that you do not pivot.
You can pivot columns when you add or edit a group in the XML source definition. Use the
following rules when you pivot columns:
If you pivot an element, you must also pivot all its sibling elements included in the group.
A group cannot have a foreign key related to the primary key of a group that has a pivoted
column.
When you pivot columns in a group, you need to make sure that the resulting group structure
still follows the rules for a valid normalized or denormalized group. The Designer displays
warnings and errors if the pivoted columns might invalidate a group.
Pivoting affects an element only in the group where you pivot the element. It does not affect
how you use the same element in another group. You can pivot elements only in a source
definition.
162
Figure 5-22 shows the ADDRESS element of the StoreInfo XML file pivoted into two sets of
address columns:
Figure 5-22. ADDRESS Element Occurrences Pivoted into Columns
Second occurrence of
Address pivoted to office
address columns with
prefix OFC_.
The first and second occurrences of Address represented as columns in the group:
Pivoting
163
Code Pages
XML files contain an encoding declaration that indicates the code page used in the file. The
most commonly used code pages in XML are UTF-8 and UTF-16. All XML parsers support
these two code pages. For information on the XML character encoding specification, go to the
W3C website at http://www.w3c.org.
PowerCenter and PowerMart support the same set of code pages for XML files that they
support for relational databases and other flat files. You can use any code page supported by
both Informatica and the XML specification. For a list of code pages that Informatica
supports, see Code Pages in the Installation and Configuration Guide. Informatica does not
support any user-defined code page.
For XML source definitions, PowerCenter and PowerMart use the repository code page.
When you import a source definition from an XML file, the Designer displays the code page
declared in the file for verification only. It does not use the code page declared in the XML
file.
For XML target definitions, PowerCenter and PowerMart use the code page declared in the
XML file. If Informatica does not support the declared code page, the Designer returns an
error. You cannot import the target definition.
164
Limitations
PowerCenter and PowerMart do not support the following functions:
Custom datatypes. PowerCenter and PowerMart support only primitive and derived XML
datatypes. It converts any other datatype to String. For example, in your XML schema file
you might define a custom datatype of SSN that can have only nine digits. PowerCenter
and PowerMart do not recognize SSN as a valid XML datatype and convert it to String.
Composite keys. A key cannot be a concatenation of two elements. For example, you
cannot create a key CUSTOMERID that refers to a concatenation of two elements
LASTNAME and PHONENUMBER.
Limitations
165
166
Chapter 6
Overview, 168
Troubleshooting, 190
167
Overview
You can import source definitions from the following XML sources:
XML files
DTD files
When you import a source definition based on an XML file that does not have an associated
DTD, the Designer determines the types and occurrences of the data based solely on data
represented in the XML file. To ensure that the Designer can provide an accurate definition of
your data, import from an XML source file that represents the occurrence and type of data as
accurately as possible.
When you import a source definition from a DTD or an XML schema file, the Designer can
provide an accurate definition of the data based on the description provided in the DTD or
XML schema file.
The Designer represents the XML hierarchy from XML, DTD, or XML schema files as
related logical groups with primary and foreign keys in the source definition. You can
configure the Designer to generate groups and primary keys, or you can create your own
groups and specify keys.
The Designer saves the XML hierarchy and the group information to the repository. It also
saves the cardinality and datatype of each element in the hierarchy. It validates any change you
make to the groups against the XML hierarchy. It does not allow any change that is not
consistent with the hierarchy or that breaks the rules for XML groups. For more information
on XML groups, cardinality, and datatypes, see XML Concepts on page 131.
When you import an XML source definition, your ability to change the cardinality and
datatype of the elements in the hierarchy depends on the type of file you are importing. You
cannot change the cardinality of the root element since it only occurs once in an XML
hierarchy. You also cannot change the cardinality of an attribute since it only occurs once
within a group.
When you import an XML source definition, the Designer disregards any encoding
declaration in the XML file. The Designer uses the code page of the repository. For
information on PowerCenter and PowerMart support for XML code pages, see Code Pages
on page 164.
168
In the Source Analyzer, choose Sources-Import from XML. The Open XML File dialog
box appears.
The Open XML File dialog box defaults to a list of .xml files. To display the list of DTD
or XML schema files, select the appropriate file extension from the Files of Type list in
the dialog box.
Note: Do not use the Import From XML menu command to create an XML source
definition from an XML file of exported repository objects. When you create an XML file
by exporting objects from the repository, you can only import the objects by using the
Import Objects menu command. For more information on exporting and importing
repository objects, see Exporting and Importing Objects in the Repository Guide.
2.
169
The wizard displays the following information regarding the selected file:
File Information
Description
Full path and name of the file to import. Can be XML, DTD, or XML schema
(.xsd) file.
If the XML file has an associated DTD, the DTD file name displays here.
Version Name
XML Version.
XML Encoding
Code page defined by the <ENCODING> tag in the XML source file. Displayed
for verification only. The XML source definition uses the code page of the
repository, not the code page defined in the XML source file.
The name of the root element of the XML file is the default name for the new XML
source table. Change the name if necessary.
To view the contents of the XML file, click View XML File. The contents of the XML file
display on the application associated with the .xml, .dtd, or .xsd extensions.
3.
Click Next.
The wizard displays the XML elements and their properties. In the XML Structure area,
the wizard displays the element hierarchy.
The wizard displays any data available in the source file. If you are importing from an
XML file, the wizard displays the data for each element or attribute. If you are importing
from a DTD or an XML schema that contain attributes with enumerated data, the wizard
displays the possible values for the attributes.
170
As you move the cursor over the element hierarchy, the wizard displays the structure of
the element that the cursor points to.
Element
Hierarchy
4.
5.
have enclosure elements that contain only sub-elements. If you do not want to include
these empty elements as columns in the groups, you can select the option in the XML
Import section of the Options window. For more information, see Customizing
Designer Default Options on page 5.
6.
Click Next.
Importing an XML Source Definition
171
7.
If you want the wizard to generate the groups for your XML source, select the Generate
Default Groups option. The wizard can generate either normalized or denormalized
groups. Select the type of group you want.
For more information on normalized default groups, see Normalized Groups on
page 145. For more information on denormalized default groups, see Denormalized
Groups on page 145.
The wizard can generate denormalized groups for XML sources that contain only one
multiple-occurring element. If you are importing an XML source that contains more
than one multiple-occurring element, the Designer does not generate a denormalized
default group.
8.
172
Click Next.
Preview Data
for the Group
Group Relationship
Data Preview
If you select the Generate Default Groups option, the wizard lists the groups that it
creates. You can modify the groups and columns if necessary.
In the Columns section, the wizard displays the columns for the current group, including
the datatype, null constraint, and pivot attribute for each column.
If you do not select the Generate Default Groups option, the Designer does not display
any group. You can manually create the groups, add columns and set column properties,
and set primary and foreign keys to depict the relationship between the custom groups.
In the XML Tree area, the wizard highlights several things to emphasize the elements
relevant to the selected group:
All the elements corresponding to the columns in the group turn bold blue.
The element corresponding to the foreign key column turns bold blue.
You can resize the different sections to display the groups, columns, and XML hierarchy
more clearly.
9.
Click Preview Data for the Group to display the Data Preview section.
The wizard can display data in the Data Preview section only if you import from an XML
file. DTD and XML schema files do not contain data.
If you pivot an element, the Data Preview shows you the data included in the new pivot
columns.
Importing an XML Source Definition
173
The Data Preview is useful because it enables you to see how your data is structured
within a group. However, it uses a lot of resources and if you are importing from an
extremely large XML file, it may take a while for the wizard to refresh the screen.
10.
Click either the Add a New XML Group or the Edit the Current XML Group button to
invoke the XML Group Wizard. The wizard guides you through modifying groups,
setting primary and foreign keys, and pivoting columns in a group. You can select
elements directly from the XML hierarchy. For more information on how to use the XML
Group Wizard, see Using the XML Group Wizard on page 174.
PowerCenter saves the data attributes of enclosure elements only if they are included in
the source groups. If you do not include an enclosure element in any group, you could
lose its datatype information. If you decide to add the element to a group later, you might
have to re-enter its datatype information. To include enclosure elements in groups, see
Customizing Designer Default Options on page 5.
Tip: If you have PowerCenter.e 1.6 or 1.7, you can create a group by importing an XML
view. To import an XML view, click Import XML View and select the metadata.xml file
you want to import. For information on importing an XML view, see Creating Groups
from a PowerCenter.e XML View on page 186.
11.
You can click Relationship to display the relationship between the groups.
12.
Click Finish.
The source definition appears in the Source Analyzer.
13.
Choose Repository-Save.
Once you create an XML source definition, you cannot change it to any other source
type. Conversely, you cannot change other types of source definitions to XML.
174
When you invoke the XML Group Wizard, the group name and description window
appears. Type a name and a description for the group. Click Next.
2.
In the Columns and Keys window, select an element in the XML Tree and click the arrow
button to add the element as a column in the group.
Arrow Button
Group Columns
XML Tree
175
3.
4.
176
Edit
Description
XML Map
No
Groups At
No
Yes
Yes
Yes
To set the foreign key in the group, select from the list the name of
a group you want to relate to the current group.
Click Finish.
2.
Edit
Description
Select Table
Yes
Displays the source definition you are editing. To choose a different source
definition to edit, select it from the list.
Rename button
Yes
Edit the name of the source definition and enter a business name.
177
3.
Table Settings
Edit
Description
Business Name
No
Owner Name
Yes
Description
Yes
Database Type
No
Code Page
No
Indicates the repository code page. The XML source definition uses the code
page of the repository, not the code page defined in the XML source file.
On the Columns tab, you can add or make changes to groups and columns.
Invokes the XML
Group Wizard.
178
Columns Settings
Edit
Description
Select Table
Yes
Displays the source definition you are editing. To choose a different source
definition to edit, select it from the list.
Column Name
Yes
Datatype
No
Displays Datatype.
Precision
No
Displays Precision.
Scale
No
Displays Scale.
Not Null
Yes
Key Type
Yes
When the Designer creates default groups for XML sources, it generates the
primary and foreign keys automatically. To change the key type, select from
the list.
Columns Settings
Edit
Description
Pivot
Yes
Indicates the nth occurrence of the element shown in the XML map to be made
into a column.
XML Map
Yes
Indicates the element referenced by the current column in the XML hierarchy.
To change the element referenced by the current column, select from the list.
XML Map does not display for generated primary or foreign keys.
Business Name
Yes
User-defined descriptive name for the column. If it is not visible in the window,
scroll to the right to view or modify the column.
Primary Group
Yes
Edit only for foreign keys. Indicates to which group the foreign key relates.
Primary Column
No
Description
Yes
When you double-click a group name, the XML Group Wizard appears and enables you
to edit the group. The XML Group Wizard also appears when you click either the Add a
New XML Group button or the Edit the Current XML Group button.
Note: Although you can also use the editor buttons (Add a New Column, Delete a
The Properties tab does not display properties for the XML source definition since an
XML source definition does not have transformation attributes. The Properties tab is
applicable to XML target definitions. For more information on XML target definition
transformation attributes, see Editing an XML Target Definition on page 204.
179
5.
On the Datatype tab, you can change the datatype, precision, and scale for the elements
in the hierarchy.
When you change the datatype of an element, the Designer propagates the changes to all
the columns in the groups whose XML Map points to the modified element.
As you move the cursor over the element hierarchy, the wizard displays the structure of
the element to which the cursor points.
Edit the following datatype properties as necessary:
180
Datatype Settings
Edit
Description
Select Table
Yes
Displays the name of the source definition you are editing. To choose a
different source definition to edit, select it from the list.
XML Elements/Attributes
No
Cardinality
No
Datatype
Yes
Precision
Yes
Precision.
Scale
Yes
You can modify the scale for all datatypes except string.
6.
On the Metadata Extensions tab, you can create, edit, and delete user-defined metadata
extensions.
You can create, modify, delete, and promote non-reusable metadata extensions, as well as
update their values. You can also update the values of reusable metadata extensions. For
more information, see Working with Metadata Extensions on page 30.
7.
Click OK.
8.
181
Use the DTD and XML schema preview to verify that the source definition has the structure
you need.
To view the source definition group details:
1.
In the Source Analyzer, right-click the title bar of the source definition.
2.
Groups and
Relationship
Pane
Columns Pane
182
Groups and Relationship. This pane contains three buttons: Group, Relationship, and
View XML Metadata. You can click Groups to see a list of all the groups in the source
definition or click Relationship to see the relationship among the groups. You can also
click View XML Metadata to see an example of a DTD or XML schema file that the
Designer creates based on the source definition.
Columns. This pane lists the columns and column attributes of the current group.
XML Tree. This pane displays the XML hierarchy of the source definition.
You can resize any of the three panes to see the groups, columns, and XML hierarchy
more clearly.
3.
Click Groups.
A list of all the source definition groups displays in the Groups and Relationship pane.
4.
In the Groups and Relationship pane, click the name of the group for the details.
In the Columns pane, the columns for the current group display, including the datatype,
null constraint, and pivot attribute for each column.
In the XML Tree pane, the Designer highlights several things to emphasize the elements
relevant to the selected group:
5.
All the elements corresponding to the columns in the group turn bold blue.
The element corresponding to the foreign key column turns bold blue.
Click Relationship.
A hierarchy, depicting the relationship among the groups in the source definition,
displays in the Groups and Relationship pane. The current group is highlighted.
183
6.
View XML
Metadata
184
The files display on the application associated with their file extensions. For example, if
you associate files with the .xsd extension to Notepad, the XML schema displays as a
Notepad document.
The Designer creates the files temporarily in the Informatica directory. They exist in the
directory only for as long as the Group Preview window is on the screen. Once you click
Done in the Group Preview window, the Designer deletes the DTD or XML schema file
from the Informatica directory.
7.
185
is no longer available.
186
Figure 6-1 shows the structure that the xmlmeta.dtd file defines for the metadata.xml file:
Figure 6-1. Xmlmeta.dtd
The xmlmeta.dtd file requires the metadata.xml file to contain one or more XMLSRC
elements that are made up of one or more SRCFIELD elements. Each XMLSRC element
must point to an XMLMAP element.
The Designer uses the following rules to determine whether or not an XML view can be used
for the source definition:
The ROOTELEM attribute of an XMLSRC element in the metadata.xml must match the
root element of the XML hierarchy of the source definition.
The ELEMKEY attribute for each XMLMAP element must exist in the XML hierarchy of
the source definition.
When you create a custom group from a PowerCenter.e XML view, each SRCFIELD element
becomes a column in the group. The Designer takes the following column properties from the
attributes of the SRCFIELD and XMLMAP elements of the metadata.xml file:
Column Property
Element
Attribute
Name
SRCFIELD
NAME
Null Constraint
SRCFIELD
NULLABLE
Pivot
XMLMAP
MULTCOLNUM
The Designer takes all other column properties such as datatype, precision, scale, and key
constraint from the XML hierarchy of the source definition.
187
In the Edit Groups window of the XML Import Wizard, click Import an XML Group.
Import an XML
Group
188
2.
3.
Click OK.
If the Designer finds a metadata.xml file that contains XML views that are valid for the
source definition, it displays a list of available XML views:
4.
189
Troubleshooting
I cannot find the DTD or XML schema file for my source definition in the Informatica
directory.
The DTD or XML schema file that you can view through the XML Group Preview window is
a temporary file that the Designer creates only for viewing. Once you close the XML Group
Preview window the Designer deletes the file. If you want to use the file for your own
purposes, save it to your file name and directory when you view it.
When I add columns to my XML source groups, the hierarchy remains the same.
When you add columns to XML source groups, you do not add elements to the underlying
hierarchy. The XML hierarchy that you import remains the same no matter how you create
your groups or how you map the columns in your group to the elements in the hierarchy. You
can modify the datatypes and the cardinality of your elements, but you cannot modify the
structure of your hierarchy.
If you want to modify the XML hierarchy of your source definition, you can view a DTD or
XML schema file for the source XML hierarchy and save it to your own directory and
filename. You can open this file and modify the hierarchy, adding the elements and attributes
you want. You can then use this file to import a source definition with a new hierarchy.
For more information on viewing the DTD or XML schema of a source hierarchy, see
Viewing Source Groups, Relationships, and DTD or XML Schema on page 182.
How can I put two multiple-occurring elements that both have the same parent element
into one group? For example, I would like to put all the elements of EMPLOYEE in one
group:
<!ELEMENT EMPLOYEE (EID, EMAIL+, PHONE+)>
Although in this example EMAIL and PHONE belong to the same parent element, they do
not both belong in the same parent chain. Ordinarily, you cannot put them in the same
denormalized group.
To put all the elements of employee in one group, you need to pivot one of the multiple
occurring elements. For example, you can create an EMPLOYEE group and follow these steps
to add all the elements:
1.
2.
Pivot the number of occurrences of EMAIL that you want to include. If you get warnings
while pivoting any of the occurrences, confirm that you want to proceed.
3.
Pivoting in this case turns an element into a single occurring element in a group. After you
pivot EMAIL, the Groups At element for the EMPLOYEE group is PHONE because it
becomes the only multiple-occurring element in the group.
190
For an example of how to pivot elements in a group, see Tutorial Lesson 6 in Getting
Started.
I have the following element definition in my DTD:
<!ELEMENT EMPLOYEE (EMPNO, SALARY)+>
How can I match the EMPNO and SALARY in the same group?
This example of a DTD element definition is ambiguous. It is equivalent to the following:
<!ELEMENT EMPLOYEE (EMPNO+, SALARY+)>
In this definition, there appears to be an EMPNO and a SALARY for each employee.
However, when the definition is written this way, the number of occurrences for EMPNO is
separate from and may not match the number of occurrences of SALARY.
You can try either of the following solutions:
Redefined this way, there is one EMPNO and one SALARY for each EMPLOYEE, and
both elements go into the same EMPLOYEE group.
Leave the elements in separate groups and use the source definition twice in a mapping.
Even when EMPNO and SALARY are in different groups, you can still combine the data
in a mapping. Use two instances of the same source definition and join them in a Joiner
transformation. For an example of using two instances of an XML source in a mapping, see
XML Source Qualifier Transformation in the Transformation Guide.
Troubleshooting
191
192
Chapter 7
Overview, 194
Troubleshooting, 217
193
Overview
You can create an XML target definition from an XML, DTD, or XML schema file. You can
also create an XML target definition from an XML source definition or from one or more
relational source definitions.
Use the Warehouse Designer to create and maintain XML target definitions.
Import the definition from an XML file. Create a target definition from an XML, DTD,
or XML schema file.
Import the definition from one or more relational source definitions. Create one target
definition from one or more relational sources. The target definition contains as many
groups as relational sources plus a group for the root element.
Create an XML target definition based on an XML source definition. Drag an existing
XML source definition into the Warehouse Designer and select to create either an XML
target definition or a relational target definition. If you select to create an XML target
definition from an XML source, the Designer creates a target definition based on the
hierarchy of the source definition. However, the target definition may not have the same
structure as the source definition.
194
Edit target definitions. Edit an XML target definition to add comments or key
relationships, or update them to reflect changed target XML, DTD, or XML schema files.
When you change an XML target definition, the Designer propagates the changes to any
mapping using that target. Some changes to target definitions can invalidate mappings.
Table 7-1 shows how you can impact mappings when you edit an XML target definition:
Table 7-1. Mapping Impact for Updated XML Target Definitions
Modification
Result
Mappings may be invalidated. If the column connects to an input port that uses
a datatype incompatible with the new one (for example, Decimal to Date), the
mapping becomes invalid.
If the changes invalidate the mapping, you must open and edit the mapping. If you created
a session with the invalidated mapping, you must validate the session. For more
information, see Working with Sessions in the Workflow Administration Guide.
View the XML target groups and the DTD or XML schema file. You can view the details
of the target groups and the XML hierarchy that the Designer creates for the XML target
definition. You can also view a DTD or an XML schema file that corresponds to the XML
hierarchy of the target definition.
Overview
195
exported objects. For more information on exporting and importing repository objects, see
Exporting and Importing Objects in the Repository Guide.
To import an XML target definition from files:
1.
2.
196
The XML File Import Wizard appears. The full path and name of the file you select
appears as the selected XML File Name:
The wizard displays the following information regarding the selected file:
File Information
Description
Full path and name of the file to import. Can be XML, DTD, or XML schema
(.xsd) file.
If the XML file has an associated DTD, the DTD file name displays here.
Version
XML Version.
XML Encoding
Code page defined by the <ENCODING> tag in the XML file. You can change
the code page for an XML target definition when you edit the target definition.
The name of the root element of the XML file is the default name for the new XML
source table. Change the name if necessary.
To view the contents of the XML file, click View XML Source. The contents of the XML
file display on the application associated with the .xml, .dtd, or .xsd extensions.
3.
Click Next.
The wizard displays the XML elements and their properties. In the XML Structure area,
the wizard displays the element hierarchy.
The wizard displays any data available in the source file. If you are importing from an
XML file, the wizard displays the data for each element or attribute. If you are importing
from a DTD or an XML schema that contain attributes with enumerated data, the wizard
displays the possible values for the attributes.
197
As you move the cursor over the element hierarchy, the wizard displays the structure of
the element the cursor points to.
Element
Hierarchy
4.
5.
have enclosure elements that contain only sub-elements. If you do not want to include
these empty elements as columns in the groups, you can select the option in the XML
Import section of the Options window. For more information, see Customizing
Designer Default Options on page 5.
6.
198
Click Next.
Preview Data
for the Group
Group Relationship
Data Preview
For target definitions, the wizard automatically creates normalized default groups. You
cannot modify the groups and columns. You can click Relationship to display the
relationship between the groups.
In the XML Tree area, the wizard highlights several things to show you the elements
relevant to the selected group:
All the elements corresponding to the columns in the group turn bold blue.
The element corresponding to the foreign key column turns bold blue.
You can resize the different sections to display the groups, columns, and XML hierarchy
more clearly.
7.
Click Preview Data for the Group to display the Data Preview section.
Data displays in the Data Preview section only if you import from an XML file. DTD
and XML schema files do not contain data. If you are importing from a large XML file, it
may take a while for the wizard to display the data.
8.
9.
Choose Repository-Save.
Note: Once you create an XML target definition, you cannot change it to any other source
type. Conversely, you cannot change other types of target definitions to XML.
199
2.
In the XML Import dialog box, type a name for the target definition and a name for the
root element.
3.
4.
200
Click OK.
The Designer always creates a group for the root element. It relates all other groups
created from the relational sources to the root element group. Therefore, a target
definition created from relational sources always has one group more than the number of
sources selected. For more information on how the Designer creates target groups from
relational sources, see Normalized Default Target Groups from Relational Tables on
page 153.
In the Output window, the Designer lists any non-hierarchical table relationship that it
does not include in the XML hierarchy. It also displays the reason why the relationship is
not included.
5.
Choose Repository-Save.
201
The source groups do not include all the elements in the hierarchy.
In addition, a column that is pivoted in the source definition is not pivoted in the target
definition. XML target definitions cannot contain pivoted columns.
If you select to create a relational target, the Designer creates the relational target definitions
based on the groups in the XML source definition. Each group in the XML source becomes a
target definition. The Designer creates the same relationship among the target definitions as
the relationship among the groups in the source definition.
To create a target definition from an XML source definition:
1.
With the Warehouse Designer tool active, drag an XML source definition from the
Navigator into the workspace.
The XML Export dialog box appears.
2.
202
The target definition appears in the Warehouse Designer workspace. If you select
relational targets, more than one target definition might appear in the workspace,
depending on the source.
3.
Choose Repository-Save.
The Designer saves the new target definition to the repository. Now you can use the
target definition in a mapping.
Figure 7-1 shows a sample XML source definition with six groups and the six relational target
definitions that the Designer creates when you drag the source into the Warehouse Designer
workspace. The letters (A, B, C, D, E, and F) match each source group with its corresponding
target definition:
Figure 7-1. Relational Targets Created from an XML Source
XML Source Definition
A
B
B
A
C
D
C
203
In the Warehouse Designer, double-click the title bar of the target definition.
The Edit Tables window appears:
2.
204
Edit
Description
Select Table
Yes
Displays the target definition you are editing. To choose a different target
definition to edit, select it from the list.
Rename button
Yes
Edit the name of the target definition and enter a business name.
Business Name
No
Constraints
Yes
Creation Options
Yes
3.
Table Settings
Edit
Description
Description
Yes
Code Page
Yes
Select the code page to use in the target definition. For more information on XML
code pages, see Code Pages on page 164.
Database Type
No
Keywords
Yes
On the Columns tab, you can only modify column names, shift column positions, and
add column descriptions.
4.
Columns Settings
Edit
Description
Select Table
Yes
Displays the source definition you are editing. To choose a different open
source definition to edit, select it from the list.
Column Name
Yes
Business Name
Yes
User-defined descriptive name for the column. If not visible in the window,
scroll to the right to view or modify the column.
Description
Yes
Description for the column. Use the horizontal scroll bar to see this column.
On the Properties tab, you can view the transformation attributes of the target definition.
205
You configure the XML target definition attributes in the Mapping Designer. You cannot
edit the attributes in the Warehouse Designer. For more information on the
transformation attributes, see Working with Targets in a Mapping on page 235.
5.
On the Datatype tab, you can modify the datatypes, precision, and scale of the elements
in the XML hierarchy. As you move the cursor over the element hierarchy, a tooltip
appears and displays the structure of the element:
Element Definition
Hint
206
6.
Datatype Settings
Edit
Definition
Select Table
Yes
Displays the name of the target definition you are editing. To choose a
different open target definition to edit, select it from the list.
XML Elements/Attributes
No
Cardinality
No
Datatype
Yes
XML datatype.
Precision
Yes
Precision.
Scale
Yes
On the Metadata Extensions tab, you can create, edit, and delete user-defined metadata
extensions.
You can create, modify, delete, and promote non-reusable metadata extensions, as well as
update their values. You can also update the values of reusable metadata extensions. For
more information, see Working with Metadata Extensions on page 30.
7.
Click OK.
8.
Choose Repository-Save.
207
Active sources
Active Sources
An active source is the last active transformation in a pipeline. The following transformations
can be active sources within a mapping:
Source Qualifier
Aggregator
Joiner
Rank
Sorter
An XML target can receive rows from different active sources if each data flow supplies rows
to a different XML group. All target ports within a single group must receive data from the
same data flow.
208
When you create an XML target definition and you do not define keys for the groups, the
Designer automatically creates primary key and foreign key columns called group link key
columns to define the group relationships.
When you run a workflow, the Informatica Server does not automatically generate the values
for the primary and foreign keys. When you pass a value to a column in an XML target group,
you must also pass values to the primary and foreign keys of the group. Make sure that you
keep the referential integrity intact.
An XML target group can contain a combination of user-defined and group link keys.
For more information on passing values to primary and foreign keys, see Target Port
Connections on page 209.
For more information on XML groups keys, see Group Keys and Relationships on
page 145.
User-Defined Keys
When you create an XML target, you can define as a key any type of element in the target
hierarchy. The Designer sets these elements to be the primary keys for the groups and creates
corresponding foreign key columns in related groups. For more information on setting keys
for XML target groups, see Importing an XML Target Definition on page 196.
When you run a workflow, the Informatica Server writes the values of the user-defined
primary and foreign keys to the XML target file.
If one port in a group is connected, then both the foreign and primary key ports for the
group must be connected.
Using an XML Target in a Mapping
209
2.
If the foreign key port of a group is connected, then the port of the primary key that the
foreign key refers to must be connected.
3.
If the primary key of the root group is a user-defined key, rules 1 and 2 must be followed
for all groups in the parent chain of a connected group.
4.
If the primary key of the root group is a group link key and the primary key port of the
root group is connected, then rules 1 and 2 must be followed for all groups in the parent
chain of a connected group.
If the primary key of the root group is a group link key, and the primary key port of the
root group is not connected, then the foreign key port of any group that refers to the
group link primary key of the root group does not need to be connected.
Figure 7-2 shows the hierarchy of target definitions TgtStore01 and TgtStore02 used in the
example that follows. Both target definitions have the same hierarchy, but the groups are
related by different types of keys. The root group in TgtStore01 has a group link primary key
created by the Designer, while the root group in TgtStore02 has a user-defined primary key.
Store is the root group in both target definitions.
Figure 7-2. Group Hierarchy of TgtStore01 and TgtStore02 Target Definitions
For example, you want to connect the port of target column YTDSales in the Sales group.
When you connect the YTDSales port in the TgtStore01 target definition, you need to follow
rules 1, 2, and 3. When you connect the YTDSales port in the TgtStore02 target definition,
you need to follow rules 1, 2, and 4.
Figure 7-3 shows how the connection rules apply if you connect the YTDSales column of the
Sales group in the TgtStore01 target definition. Although this diagram shows the target
210
connected to an XML Source Qualifier transformation, the target can be connected to any
type of data input.
Figure 7-3. XML Target Port Connections with User-Defined Primary Key in Root Group
A: Rule 1 requires that you connect
the port of the foreign key column
FK_PID when you connect the
YTDSales port in the Sales group.
B
C
A
Connecting YTDSales
Figure 7-4 shows how the connection rules apply if you connect the YTDSales column of the
Sales group in the TgtStore02 target definition. Although this diagram shows the target
211
connected to an XML Source Qualifier transformation, the target can be connected to any
type of data input.
Figure 7-4. XML Target Port Connections with Group Link Primary Key in Root Group
A: Rule 1 requires that you connect the port
of the foreign key LFK_Sales when you
connect the YTDSales port in the Sales
group.
B
C
A
Connecting YTDSales
You can modify them and import a new target definition from them.
Use the DTD and XML schema preview to verify that the target definition has the structure
you need.
To view the target definition group details:
1.
In the Warehouse Designer, right-click the title bar of the target definition and choose
View XML Groups.
The XML Group Preview window appears:
Groups and
Relationship
Pane
Columns Pane
Groups and Relationship. Contains three buttons: Group, Relationship, and View
XML Metadata. You can click Groups to see a list of all the groups in the target
Viewing Target Groups, Relationships, and DTD or XML Schema
213
definition or click Relationship to see the relationship among the groups. You can also
click View XML Metadata to see an example of a DTD or XML schema file that the
Designer creates based on the target definition.
Columns. Lists the columns and column attributes of the current group.
You can resize any of the three panes to see the groups, columns, and XML hierarchy
more clearly.
2.
Click Groups.
A list of all the target definition groups displays in the Groups and Relationship pane.
3.
In the Groups and Relationship pane, click the name of the group for which you want to
view details.
In the Columns pane, the columns for the current group display, including the datatype,
null constraint, and pivot attribute for each column.
In the XML Tree pane, the Designer highlights several things to emphasize the elements
relevant to the selected group:
4.
All the elements corresponding to the columns in the group turn bold blue.
The element corresponding to the foreign key column turns bold blue.
Click Relationship.
A hierarchy depicting the relationship among the groups in the target definition displays
in the Groups and Relationship pane. The current group is highlighted.
214
5.
View XML
Metadata
215
The files display in the application associated with their file extensions. For example, if
you associate files with the .xsd extension to Notepad, the XML schema displays as a
Notepad document.
The Designer creates the files temporarily in the Informatica directory. They exist in the
directory only as long as the Group Preview window is on the screen. Once you click
Done in the Group Preview window, the Designer deletes the DTD or XML schema file
from the Informatica directory.
6.
216
Troubleshooting
I cannot modify the groups in my XML target definition.
When you create an XML target definition, the Designer automatically creates normalized
groups and relates the groups to one another. You cannot modify the structure of these default
groups nor create your own custom groups.
I imported a source definition from an XML file, setting the option for the Designer to
generate normalized default groups. Then I imported a target definition from the same
XML file. The default groups for the source and target definitions are not the same.
The Designer does not always create the same group structure for a source definition and a
target definition even if you import from the same XML file. One reason is that the Designer
uses the following rule when it imports target definitions from XML, but not when it imports
source definitions from XML: the Designer always includes all multiple-occurring elements
that do not contain single-occurring child elements in a target definition, but not in a source
definition.
The Designer enforces this rule for target definitions even when you enable the option When
an Element has No Data, Exclude the Element from Analysis. For details, see Configuring
General Options on page 5.
For example, the Designer applies this rule on the ContactInfo element for the XML
hierarchy shown in the following DTD:
Troubleshooting
217
When you turn on the Exclude Element with no Data option and import from this DTD file,
the Designer creates the source and target definition in this way:
Source Definition for HR.dtd
The Designer does not include the ContactInfo element in the source definition, following
the option setting. However, the Designer includes the ContactInfo element in the target
definition.
When you disable the Exclude Element with no Data option and import from this DTD file,
the Designer creates a source definition that is the same as the target definition.
The XML target created from my relational sources contains all elements, but no attributes.
How can I modify the target hierarchy so that I can mark certain data as attributes?
You cannot modify the XML target definition the Designer creates from relational sources.
However, you can view a DTD or XML schema file of the target XML hierarchy. Save the
DTD or XML schema file to your own directory and filename. Open this new file and modify
the hierarchy, setting the attributes and elements as needed. Then you can use this file to
import a target definition with a new hierarchy.
For more information on viewing the DTD or XML schema of a target hierarchy, see
Viewing Target Groups, Relationships, and DTD or XML Schema on page 213.
For more troubleshooting tips relevant to both source and target definitions, see
Troubleshooting on page 190.
218
Chapter 8
Mappings
This chapter includes the following topics:
Overview, 220
Troubleshooting, 249
219
Overview
Mappings represent the data flow between sources and targets. When the Informatica Server
executes a session, it uses the instructions configured in the mapping to read, transform, and
write data.
Every mapping must contain the following components:
Connectors. Connect sources, targets, and transformations so the Informatica Server can
move the data as it transforms it.
A mapping can also contain one or more mapplets. A mapplet is a set of transformations that
you build in the Mapplet Designer and can use in multiple mappings.
When you add an object to a mapping, you configure the properties according to the way you
want the Informatica Server to transform the data. You also connect the mapping objects
according to the way you want the Informatica Server to move the data. You connect the
objects through ports.
The Mapping Designer displays objects in three different views:
Normal. Shows the columns in the ports tab and the input and output port indicators. You
can connect objects that are in the normal view.
Edit. Shows the object properties. You can switch between the different tabs and configure
the object in this view.
Figure 8-1 illustrates the iconized and normal views in a mapping and the required mapping
components:
Figure 8-1. Sample Mapping
Connectors
Source Definition
(iconized)
220
Chapter 8: Mappings
Transformations
(normal view)
Target Definition
(normal view)
Object Dependency
Some objects in a mapping are also stored as independent objects in the repository:
Sources
Targets
Reusable transformations
Mapplets
The mapping is dependent on these objects. When this metadata changes, the Designer and
other Informatica Client applications track the effects of these changes on mappings. In these
cases, you may find that mappings become invalid even though you do not edit the mapping.
When a mapping becomes invalid, the Informatica Server cannot execute it properly, and the
Workflow Manager invalidates the session.
The only objects in a mapping that are not stored as independent repository objects are the
standard transformations that you build within the mapping. These standard transformations
are stored within the mapping only.
Developing a Mapping
When you develop a mapping, use the following procedure as a guideline:
1.
Verify that all source, target, and reusable objects are created. Create source and target
definitions. If you want to use mapplets, you must create them also. You can create
reusable transformations in the Transformation Developer, or you can create them while
you develop a mapping.
Overview
221
222
2.
Create the mapping. You can create a mapping by dragging a source, target, mapplet, or
reusable transformation into the Mapping Designer workspace, or you can choose
Mapping-Create from the menu.
3.
Add sources and targets. Add sources and targets to the mapping.
4.
Add transformations and transformation logic. Add transformations to the mapping and
build transformation logic into the transformation properties.
5.
Connect the mapping. Connect the mapping objects to create a flow of data from
sources to targets, through mapplets and transformations that add, remove, or modify
data along this flow.
6.
7.
Save the mapping. When you save the mapping, the Designer validates it, identifying
any errors. The Designer displays validation messages in the Output window. A mapping
with errors is invalid, and you cannot run a session against it until you validate it.
Chapter 8: Mappings
Create a mapping. When you create a mapping, you save the mapping name in the
repository. You can then develop and save the mapping.
Copy a mapping. You can copy a mapping within the same folder or to another folder.
Copy and paste objects in a mapping. You can copy one or more objects in a mapping and
paste them into another mapping or mapplet in the same folder.
Import a mapping. You can import a mapping from an XML file that you exported in the
Designer.
Save a mapping. When you save a mapping in the repository, the Designer performs
mapping validation.
Debug a mapping. Run the Debugger in the Mapping Designer to test mapping logic.
Delete a mapping. Delete a mapping from the repository if you do not want to use it
again.
View link paths to a port. You can view link paths to a port in a mapping. You can view
the forward path, the backward path, or both.
View source column dependencies. You can view from which source columns a target
column receives data.
Creating a Mapping
The first step in the process of moving data between sources and targets is to create a mapping
in the Mapping Designer.
Use the following steps to create a mapping.
To create a mapping:
1.
2.
3.
223
Opening a Mapping
To open a mapping, drag it from the Navigator into the Mapping Designer workspace. If you
have a mapping in the same folder already open, the Designer prompts you to close it before
continuing. Click OK to close the current mapping and open the other one.
You can open one mapping at a time in a folder. If you open more than one folder at a time,
you can open a mapping in each folder.
Tip: You can also right-click a mapping in the Navigator and choose Open to open a mapping.
Copying a Mapping
The Designer allows you to copy mappings:
Within a folder
When you copy a mapping, the Designer creates a copy of each component in the mapping, if
the component does not already exist.
If any of the mapping components already exist, the Designer prompts you to rename,
replace, or reuse those components before you continue.
For details on copying objects across repositories, see Working with Folders in the Repository
Guide.
2.
Choose Edit-Copy.
The Designer saves the mapping on the clipboard.
3.
If the folder has more than one version under the Mapping node, select the version where
you wish to paste.
If the folder has only one version under the Mapping node, select the Mapping node.
4.
224
Choose Edit-Paste.
Chapter 8: Mappings
6.
Click OK.
The new mapping appears under the mapping node.
You can copy a mapping to a different folder. After you copy the mapping, it appears in the
Mappings node of the new folder.
To use the Copy command to copy a mapping across folders:
1.
2.
Choose Edit-Copy.
The Designer saves the mapping on the clipboard.
3.
4.
Choose Edit-Paste.
The Designer creates a copy of the mapping.
-or-
1.
In the Designer, open the folder containing the mapping you want to copy.
2.
3.
If you are copying from a shared folder, press Ctrl and drag the mapping to the
destination folder. If you do not press Ctrl, the Designer creates a shortcut to the
mapping.
-orIf you are copying a mapping from a folder that is not shared, drag the mapping to the
destination folder.
225
2.
3.
4.
Click OK.
You cannot use Copy As to copy shortcuts.
5.
Editing a Mapping
After you create a mapping, you can edit it by adding, modifying, or deleting objects. Objects
include source definitions, target definitions, mappings, and transformations. The Designer
displays a validation message in the Output window when you save a mapping.
To see what sessions or shortcuts may be affected by changes you make to a mapping, select
the mapping in the Navigator, right-click, and select View Dependencies. Or, select
Mappings-View Dependencies from the menu bar. For more information on viewing
dependencies, see Viewing Object Dependencies on page 34.
Chapter 8: Mappings
For details on creating links to business documentation, see Using Business Documentation
on page 40.
To rename or add comments to a mapping:
1.
2.
In the Edit Mapping dialog box, enter a new name for the mapping.
3.
4.
Click OK.
Invalidating Sessions
When you edit and save a mapping, some changes cause the session to be invalid even though
the mapping remains valid.
The Informatica Server does not execute invalid sessions. If you edit a mapping, the Designer
invalidates sessions under the following circumstances:
Add or remove Source Qualifiers or COBOL Normalizers, or change the list of associated
sources for these transformations.
For details on validating a session, see Working with Sessions in the Workflow
Administration Guide.
Debugging a Mapping
You can debug a valid mapping to gain troubleshooting information about data and error
conditions. To debug a mapping, you configure and run the Debugger from within the
Mapping Designer. When you run the Debugger, it pauses at breakpoints and allows you to
view and edit transformation output data.
For details on debugging a mapping, see Using the Debugger on page 325.
Deleting a Mapping
You may decide to delete mappings that you no longer use. When you delete a mapping, you
do not delete any sources, targets, mapplets, or reusable transformations defined outside the
mapping. However, you do delete all standard transformations that exist within the mapping.
Working with Mappings
227
If you want to save any of these transformations, you can make them reusable before deleting
the mapping.
You can delete a mapping from the Navigator window, or you can delete the mapping
currently displayed in the Mapping Designer workspace.
To delete a mapping from the Navigator window, select the mapping and press the Delete
key, or choose Edit-Delete.
When configuring the format options, choose the Link Selection option. For details, see
Configuring Format Options on page 9.
228
Chapter 8: Mappings
Define the following expression in the Q3_sales port in the Aggregator transformation:
LAST(sales, quarter = 3)
229
Every source instance, target instance, mapplet, and transformation contains a collection of
ports, each representing a column of data:
Figure 8-4 shows an example of a transformation with input, output, and input/output ports:
Figure 8-4. Example of Input, Output, and Input/Output Ports
Input Port
Input/Output Port
Output Port
To connect ports, you drag between ports in different mapping objects. The Designer
validates the connection and creates the connection only when the connection meets
validation requirements.
For details on connecting ports, validation, and rules, see Linking Ports on page 257.
230
Chapter 8: Mappings
Source Qualifier transformation. Represents data read from relational and flat file sources.
XML Source Qualifier transformation. Represents data read from XML sources.
You can let the Designer create the Source Qualifier by default, so each time you drag a source
into a mapping, the Designer adds a Source Qualifier and connects it to the source. Use the
automatic Source Qualifier creation when you want to create one Source Qualifier or
Normalizer for each source in your mapping. You can disable the automatic creation when
you want to join data from different relational sources. You can then manually create and
connect it to the source.
When you edit the source in the Source Analyzer, all instances of the source in mappings
inherit the changes. Some changes might invalidate the mappings using the source. For
details, see Working with Relational Sources on page 47.
However, you specify some properties for every source instance in a mapping. Double-click
the source instance in the Mapping Designer and click the Properties tab. For relational
sources, you can specify the table owner name. For flat file sources, you can specify the default
datetime format, thousands separator, and decimal separator.
231
When you add a source definition with the slash character (/) in the table name to mapping,
the Designer replaces the slash character with an underscore character in the source instance
name for the mapping. For details, see Special Character Handling on page 44.
For details on disabling the automatic Source Qualifier creation, see Configuring Format
Options on page 9.
For details on joining data through a Source Qualifier, see Source Qualifier Transformation
in the Transformation Guide.
232
Chapter 8: Mappings
233
You can expand the mapplet in the Mapping Designer by selecting it and choosing MappingsExpand from the menu. This expands the mapplet within the mapping for view. You can open
or iconize all the transformations in the mapplet and mapping, but you cannot edit any of the
properties.
When you edit the mapplet in the Mapplet Designer, all instances of the mapplet in mappings
inherit the changes. Some changes might invalidate the mappings using the mapplet. For
details, see Editing Mapplets on page 297.
For details on mapplets, see Mapplets on page 291.
234
Chapter 8: Mappings
Reject truncated and overflow data. Select this option in the target instance Properties tab
when you want the Informatica Server to write truncated data to the reject file.
Update override. Override the default UPDATE statement using the SQL Editor in the
target instance Properties tab.
Table name prefix. Specify the owner of the target tables in the target instance Properties
tab.
Pre- and post-session SQL. You can enter pre-session SQL commands for a target instance
in a mapping to execute commands against the target database before the Informatica
Server reads the source. Enter post-session SQL commands to execute commands against
the target database after the Informatica Server writes to the target.
For flat file targets, you can configure the following properties within a mapping:
Datetime format. Define the default datetime format to use for datetime values.
Thousands Separator. Define the default thousands separator to use for numeric values.
Decimal Separator. Define the default decimal separator to use for numeric values.
For more information on formatting flat file target properties in a mapping, see Defining
Default Datetime and Numeric Formats on page 124.
For XML targets, you can configure the following properties within a mapping:
Duplicate Group Row Handling. Specify how the Informatica Server handles duplicate
rows in XML groups.
DTD/Schema Reference. Specify the DTD or XML schema file for the target XML file.
The Informatica Server writes the DTD or XML schema file name as part of the document
type declaration in the XML file.
235
You can configure the following target property for a mapping containing any type of target
definition:
Set the target load order. Choose Mapping-Target Load Plan to designate the order that
the Informatica Server loads multiple targets in a mapping. You do not configure this in
the target instance.
When you edit the target in the Warehouse Designer, all instances of the target in mappings
inherit the changes. Some changes might invalidate the mappings using the target. For details,
see Working with Targets on page 69.
When you add a target definition with slash characters (/) in the table and name to mapping,
the Designer replaces the slash character with an underscore in the target instance name for
the mapping. For details, see Special Character Handling on page 71.
Figure 8-7 shows the items you can configure on the Properties tab of a relational target
definition in the Mapping Designer:
Figure 8-7. Relational Target Properties tab in the Mapping Designer
236
Chapter 8: Mappings
The Designer provides an option to let you include all truncated and overflow data between
the last transformation and target in the session reject file. If you select Reject Truncated/
Overflow Rows, the Informatica Server sends all truncated rows and any overflow rows
(between the last transformation and target) to the session reject file.
237
Figure 8-9 shows the default UPDATE statement for the target T_SALES:
Figure 8-9. UPDATE Statement for Sample Mapping
Because the target ports must match the target column names, the update statement includes
the keyword :TU to specify the ports in the target transformation. If you modify the
UPDATE portion of the statement, be sure to use :TU to specify ports.
Note: You cannot override the default UPDATE statement if the target column name contains
238
1.
2.
Click Properties.
Chapter 8: Mappings
3.
4.
5.
6.
7.
Click OK.
The Designer validates the SQL when you save the mapping.
General Rules
Keep the following rules in mind when entering custom target update queries:
1.
When you save a mapping, the Designer verifies that you have referenced valid port
names. It does not verify the accuracy of the SQL.
2.
If you update an individual row in the target table more than once, the database only has
data from the last update. If the mapping does not define an order for the result data,
different runs of the mapping on identical input data may result in different data in the
target table.
3.
A WHERE clause that does not contain any column references updates all rows in the
target table, or no rows in the target table, depending on the WHERE clause and the data
from the mapping.
For example, the following query sets the EMP_NAME to 'MIKE SMITH' for all rows
in the target table if any row of the transformation has EMP_ID > 100.
UPDATE T_SALES set EMP_NAME = 'MIKE SMITH' WHERE :TU.EMP_ID > 100
239
4.
If the WHERE clause contains no port references, the mapping updates the same set of
rows for each row of the mapping.
For example, the following query updates all employees with EMP_ID > 100 to have the
EMP_NAME from the last row in the mapping.
UPDATE T_SALES set EMP_NAME = :TU.EMP_NAME WHERE EMP_ID > 100
5.
6.
If you use the Target Update option, be sure to configure the session to mark all source
records as update.
240
1.
2.
Chapter 8: Mappings
3.
On the Properties tab, enter the table owner name or prefix in the Value field for Table
Name Prefix.
4.
Click OK.
You can use any command that is valid for the database type. However, the Informatica
Server does not allow nested comments, even though the database might.
You cannot use session or mapping variables in the target pre- and post-session SQL
commands.
The Informatica Server ignores semi-colons within single quotes, double quotes, or within
/* ...*/.
241
If you need to use a semi-colon outside of quotes or comments, you can escape it with a
back slash (\).
Note: You can also enter pre- and post-session SQL commands on the Properties tab of the
Root Group
For the XML target root group, the Informatica Server always passes the first row to the
target. When the Informatica Server encounters other rows with the same primary key, it
increases the number of rejected rows in the session load summary.
If you enable the Warn About Duplicate XML Rows option, the Informatica Server writes all
duplicate rows for the root group to the session log. If you do not enable the option, the
Informatica Server does not write the duplicate rows to the session log. It drops the rows
without logging any error messages.
242
Chapter 8: Mappings
Figure 8-10 shows the Duplicate Group Row Handling option on the Properties tab when
you edit an XML target definition in the Mapping Designer:
Figure 8-10. XML Target Duplicate Group Row Handling Selections
You can select which row the Informatica Server passes to the XML target:
First Row. The Informatica Server passes the first row to the target. When the Informatica
Server encounters other rows with the same primary key, it increases the number of
rejected rows in the session load summary.
Last Row. The Informatica Server passes the last duplicate row to the target. If you enable
the Warn About Duplicate XML Rows option, the Informatica Server writes all previous
duplicate rows to the session log. If you do not enable the option, the Informatica Server
does not write the previous duplicate rows or any error message to the session log.
For example, the Informatica Server encounters five rows with the same primary keys. If
you enable the Warn About Duplicate XML Rows option, the Informatica Server passes
the fifth row to the XML target and writes the first four duplicate rows to the session log.
If you disable the Warn About Duplicate XML Rows option, the Informatica Server passes
the fifth row to the XML target but does not write anything to the session log.
For details on the Warn About Duplicate XML Rows option, see Installing and
Configuring the Informatica Windows Server or Installing and Configuring the
Informatica UNIX Server in the Installation and Configuration Guide.
Error. The Informatica Server passes the first row to the target. When the Informatica
Server encounters another row with the same primary key, it increases the number of
rejected rows in the session load summary and increments the error count.
When the error threshold is reached during a session, the session fails. When a session
containing an XML target fails, the Informatica Server does not write any rows to the
XML target.
243
The Informatica Server sets an error threshold for each XML group. For details on the
error threshold, see Working with Sessions in the Workflow Administration Guide.
DTD/Schema Reference
When you edit the XML target in the Mapping Designer, you can also specify a DTD or an
XML schema file name for the target XML file. The Informatica Server adds a document type
declaration to the target XML file and inserts the name of the DTD or XML schema file you
specify. For example, if you have a target XML file with the root element TargetRoot and you
set the DTD/Schema Reference option to TargetDoc.dtd, the Informatica Server adds the
following document type declaration after the XML declaration:
<!DOCTYPE TargetRoot SYSTEM "TargetDoc.dtd">
The Informatica Server does not check that the file you specify exists or that it is valid. The
Informatica Server does not validate the target XML file against the DTD or XML schema file
you specify.
To set the DTD/Schema reference:
1.
2.
3.
4.
Click OK.
Chapter 8: Mappings
foreign key constraints. The Informatica Server writes data to all the targets connected to the
same Source Qualifier or Normalizer simultaneously to maximize performance.
To specify the order in which the Informatica Server sends data to targets, create one Source
Qualifier or Normalizer transformation for each target within a mapping. To set the target
load order, you then determine the order in which each Source Qualifier sends data to
connected targets in the mapping.
When a mapping includes a Joiner transformation, the Informatica Server sends all rows to
targets connected to that Joiner at the same time, regardless of the target load order.
To set the target load order:
1.
2.
3.
4.
Click the Up and Down buttons to move the Source Qualifier within the load order.
5.
Repeat steps 3 and 4 for any other Source Qualifiers you wish to reorder.
6.
Click OK.
7.
Choose Repository-Save.
245
Validating a Mapping
When you develop a mapping, you must configure it so the Informatica Server can read and
execute the entire mapping. The Designer marks a mapping invalid when it detects errors that
will prevent the Informatica Server from executing the mapping.
The Designer marks a mapping valid for the following reasons:
Connection validation. Required ports are connected and that all connections are valid.
Object validation. The independent object definition matches the instance in the
mapping.
Connection Validation
The Designer performs connection validation each time you connect ports in a mapping and
each time you validate or save a mapping. When you connect ports, the Designer verifies that
you make valid connections. When you save or validate a mapping, the Designer verifies that
the connections are valid and that all required ports are connected. When you save or validate
a mapping, the Designer makes the following connection validations:
Mapplets must be connected. At least one mapplet input port and output port is
connected to the mapping. If the mapplet includes a Source Qualifier that uses an SQL
override, the Designer prompts you to connect all mapplet output ports to the mapping.
Datatypes between ports must be compatible. If you change a port datatype to one that is
incompatible with the port it is connected to, the Designer generates an error and
invalidates the mapping. For example, you have two Date/Time ports connected, and you
change one port to a Decimal. The Designer invalidates the mapping. You can however,
change the datatype if it remains compatible with the connected ports, such as Char and
Varchar.
Expression Validation
You can validate an expression in a transformation while you are developing a mapping. If you
did not correct the errors, the Designer writes the error messages in the Output window when
you save or validate the mapping.
If you delete input ports used in an expression, the Designer marks the mapping as invalid.
For details on validating expressions, see Working with Expressions on page 258.
246
Chapter 8: Mappings
Object Validation
When you validate or save a mapping, the Designer verifies that the definitions of the
independent objects, such as sources or mapplets, match the instance in the mapping. If any
of the objects change while you configure the mapping, the mapping might contain errors.
If any of the objects change while you are not configuring the mapping, the Designer and
other Informatica Client applications track the effects of these changes on the mappings. The
Repository Manager displays the status of mappings, so you can see if a mapping is valid or
not. If you notice that a mapping is invalid, you can open the mapping and validate it to see
the error messages in the Output window.
Validating a Mapping
247
Figure 8-11 shows the mapping validation messages in the Output window:
Figure 8-11. Mapping Validation
248
Chapter 8: Mappings
Troubleshooting
I cannot perform a drag and drop operation, such as connecting ports.
Review the error message on the status bar for details.
I cannot connect a source definition to a target definition.
You cannot directly connect sources to targets. Instead, you need to connect them through a
Source Qualifier transformation for relational and flat file sources, or through a Normalizer
transformation for COBOL sources.
When I save my mapping, the Designer indicates that it contains errors.
When you save a mapping, the Designer automatically checks it for errors, such as targets that
do not receive data from any sources. While you can save an invalid mapping, you cannot run
a workflow using it.
The Designer does not allow me to connect two ports in a mapping.
The Designer performs validation when you connect ports. You cannot connect an input port
to an input port, or two ports with incompatible datatypes. Look carefully at the error
message displayed when the Designer prevented you from making the connection.
I cannot connect multiple sources to one target.
The Designer does not allow you to connect multiple Source Qualifiers to a single target.
These are possible workarounds:
1.
All targets are reusable. You can add the same target to the mapping multiple times.
Then, connect each Source Qualifier to each target.
2.
Join the sources in a Source Qualifier. Then, remove the WHERE clause from the SQL
query.
3.
When I click and drag to create a connection between ports, the Designer copies the port
instead.
Change the mode in which you are working by choosing Layout-Link Columns. Now, when
you click and drag between columns, the Designer tries to link them instead of copying the
selected port.
When I validate my mapping, I cannot see the results of the test.
Make sure that you have the Output window open when you validate the mapping. Choose
View-Output Window to see the results of the validation.
Troubleshooting
249
I entered a custom query, but it is not working when I run the workflow.
Be sure to test this setting for the Source Qualifier before you run the workflow. Return to the
Source Qualifier and open the dialog box in which you entered the custom query. You can
connect to a database and click the Validate button to test your SQL. The Designer shows you
whatever errors exist in the SQL you entered. Review the session logs if you need further
information.
The session has been invalidated since I last edited the mapping. Why?
Any changes you make to the Stored Procedure transformation may invalidate the session.
The most common reason is that you have changed the type of stored procedure, such as from
a Normal to a Post-load Source type.
250
Chapter 8: Mappings
Chapter 9
Transformations
This chapter includes the following topics:
Overview, 252
251
Overview
A transformation is a repository object that generates, modifies, or passes data. The Designer
provides a set of transformations that perform specific functions. For example, an Aggregator
transformation performs calculations on groups of data.
Transformations in a mapping represent the operations the Informatica Server performs on
the data. Data passes into and out of transformations through ports that you link in a
mapping or mapplet.
Transformations can be active or passive. An active transformation can change the number of
rows that pass through it, such as a Filter transformation that removes rows that do not meet
the filter condition. A passive transformation does not change the number of rows that pass
through it, such as an Expression transformation that performs a calculation on data and
passes all rows through the transformation.
Transformations can be connected to the data flow, or they can be unconnected. An
unconnected transformation is not connected to other transformations in the mapping. It is
called within another transformation, and returns a value to that transformation.
Table 9-1 provides a brief description of each transformation:
Table 9-1. Transformation Descriptions
252
Transformation
Type
Description
Active/
Connected
Aggregator
Active/
Connected
Active/
Connected
Expression
Passive/
Connected
Calculates a value.
External Procedure
Passive/
Connected or
Unconnected
Filter
Active/
Connected
Filters data.
Input
Passive/
Connected
Joiner
Active/
Connected
Lookup
Passive/
Connected or
Unconnected
Looks up values.
Chapter 9: Transformations
Type
Description
Normalizer
Active/
Connected
Source qualifier for COBOL sources. Can also use in the pipeline to
normalize data from relational or flat file sources.
Output
Passive/
Connected
Rank
Active/
Connected
Router
Active/
Connected
Sequence Generator
Passive/
Connected
Sorter
Active/
Connected
Source Qualifier
Active/
Connected
Stored Procedure
Passive/
Connected or
Unconnected
Update Strategy
Active/
Connected
Passive/
Connected
Represents the rows that the Informatica Server reads from an XML
source when it runs a workflow.
For information about the Transaction Control transformation, see the Supplemental Guide.
When you build a mapping, you add transformations and configure them to handle data
according to your business purpose. Perform the following tasks to incorporate a
transformation into a mapping:
Create the transformation. Create it in the Mapping Designer as part of a mapping, in the
Mapplet Designer as part of a mapplet, or in the Transformation Developer as a reusable
transformation.
Configure the transformation. Each type of transformation has a unique set of options
that you can configure.
Link the transformation to other transformations and target definitions. Drag one port
to another to link them in the mapping or mapplet.
Overview
253
Creating a Transformation
You can create transformations using the following Designer tools:
Mapplet Designer. Create and configure a set of transformations, called mapplets, that
you can use in multiple mappings. For details, see Mapplets on page 291.
Use the same process to create a transformation in the Mapping Designer, Transformation
Developer, and Mapplet Designer.
To create a transformation:
1.
2.
In the Mapping Designer, open or create a Mapping. In the Mapplet Designer, open or
create a Mapplet.
3.
4.
Click and drag across the portion of the mapping where you want to place the
transformation.
The new transformation appears in the workspace. Next, you need to configure the
transformation by adding any new ports to it and setting other properties.
254
Chapter 9: Transformations
Configuring Transformations
After you create a transformation, you can configure it. Each transformation contains an Edit
Transformation dialog box to configure properties. This dialog box contains multiple tabs for
each transformation. Every transformation contains the following common tabs:
Some transformations might include other tabs, such as the Condition tab, where you enter
conditions in a Joiner or Normalizer transformation.
When you configure transformations, you might perform the following tasks:
Add ports. Define the columns of data that move into and out of the transformation.
Enter expressions. Enter SQL-like expressions in some transformations that transform the
data.
Define local variables. Define local variables in some transformations that temporarily
store data.
Override default values. Configure default values for ports to handle input nulls and
output transformation errors.
Enter tracing levels. Choose the amount of detail the Informatica Server writes in the
session log about a transformation.
Configuring Transformations
255
Creating Ports
You can create a new port in the following ways:
Drag a port from another transformation. When you drag a port from another
transformation the Designer creates a port with the same properties and links the two
ports. Choose Layout-Copy Columns to enable copying ports.
Click the Add button on the Ports tab. The Designer creates an empty port you can
configure.
Configuring Ports
On the Ports tab, you can configure the following properties:
256
Datatype, Precision, and Scale. If you plan to enter an expression or condition, make sure
the datatype matches the return value of the expression.
Default Value. The Designer assigns default values to handle null values and output
transformation errors. You can override the default value in some ports.
Chapter 9: Transformations
For details on configuration options, see the appropriate sections in this chapter or in the
specific transformation chapters.
Note: The Designer creates some transformations with configured ports. For example, the
Designer creates a Lookup transformation with output port for each column in the table or
view used for the lookup. You need to create a port representing a value used to perform a
lookup.
Linking Ports
Once you add and configure a transformation in a mapping, you link it to targets and other
transformations. You link mapping objects through the ports. Data passes into and out of a
mapping through the following ports:
Figure 9-2 shows an example of a transformation with input, output, and input/output ports:
Figure 9-2. Example of Input, Output, and Input/Output Ports
Input Port
Input/Output Port
Output Port
To link ports, drag between ports in different mapping objects. The Designer validates the
link and creates the link only when the link meets validation requirements.
For details on linking ports, see Linking Ports on page 277.
257
For details on the transformation language, see the Transformation Language Reference.
Table 9-2 lists the transformations in which you can enter expressions:
Table 9-2. Transformations Containing Expressions
258
Transformation
Expression
Return Value
Aggregator
Expression
Filter
Chapter 9: Transformations
Expression
Return Value
Rank
Router
Update Strategy
259
Adding Comments
The Expression Editor also allows you to add comments using -- or // comment indicators.
You can use comments to give descriptive information about the expression, or you can
specify a valid URL to access business documentation about the expression.
For examples on adding comments to expressions, see The Transformation Language in the
Transformation Language Reference.
For details on linking to business documentation, see Using Business Documentation on
page 40.
Validating Expressions
You can use the Validate button to validate an expression. If you do not validate an
expression, the Designer automatically validates it when you close the Expression Editor. You
cannot run a workflow against a mapping with invalid expressions.
260
1.
In the transformation, select the port and open the Expression Editor.
2.
Enter the expression. Use the Functions and Ports tabs and the operator keys.
3.
4.
Validate the expression. Use the Validate button to validate the expression.
Chapter 9: Transformations
Compare values.
Rather than entering the same arguments for both calculations, you might create a variable
port for each condition in this calculation, then modify the expression to use the variables.
Table 9-3 shows how you can use variables to simplify complex expressions and temporarily
store data:
Table 9-3. Variable Usage
Port
Value
V_CONDITION1
JOB_STATUS = Full-time
V_CONDITION2
OFFICE_ID = 1000
261
Value
AVG_SALARY
SUM_SALARY
Since the Informatica Server sorts the input data by state, the company uses an Aggregator
transformation with variables to hold the value of the previous state read and a state counter.
The following expression compares the previous state to the state just read:
IIF(PREVIOUS_STATE = STATE, STATE_COUNTER +1, 1)
The STATE_COUNTER is incremented if the row is a member of the previous state. For
each new state, the Informatica Server sets the counter back to 1. Then an output port passes
the value of the state counter to the next transformation.
262
Chapter 9: Transformations
Port order. The Informatica Server evaluates ports by dependency. The order in which
ports display in a transformation must match the order of evaluation: input ports, variable
ports, output ports.
Datatype. The datatype you choose for reflects the return value of the expression you
enter.
Variable initialization. The Informatica Server sets initial values in variable ports. This
allows you to create counters.
Port Order
The Informatica Server evaluates ports in the following order:
1.
Input ports. The Informatica Server evaluates all input ports first since they do not
depend on any other ports. Therefore, you can create input ports in any order. Since they
do not reference other ports, the Informatica Server does not order input ports.
2.
Variable ports. Variable ports can reference input ports and variable ports, but not output
ports. Because variable ports can reference input ports, the Informatica Server evaluates
variable ports after input ports. Likewise, since variable can reference other variables, the
display order for variable ports is the same as the order in which the Informatica Server
evaluates each variable.
For example, if you calculate the original value of a building and then adjust for
depreciation, you might create the original value calculation as a variable port. This
variable port needs to appear before the port that adjusts for depreciation.
3.
Output ports. Because output ports can reference input ports and variable ports, the
Informatica Server evaluates output ports last. The display order for output ports does
not matter since output ports cannot reference other output ports. Be sure output ports
display at the bottom of the list of ports.
Datatype
When you configure a port as a variable, you can enter any expression or condition in it. The
datatype you choose for this port reflects the return value of the expression you enter. If you
specify a condition through the variable port, any numeric datatype returns the values for
TRUE (non-zero) and FALSE (zero).
Variable Initialization
The Informatica Server does not set the initial value for variables to NULL. Instead, the
Informatica Server uses the following guidelines to set initial values for variables:
263
01/01/1753 for Date/Time ports if PMServer 4.0 date handling compatibility is disabled
01/01/0001 for Date/Time ports if PMServer 4.0 date handling compatibility is enabled
Therefore, you can use variables as counters, which need an initial value. For example, you
can create a numeric variable with the following expression:
VAR1 + 1
This expression counts the number of records in the VAR1 port. If the initial value of the
variable were set to NULL, the expression would always evaluate to NULL. This is why the
initial value is set to zero.
264
Chapter 9: Transformations
Input port. The system default value for null input ports is NULL. It displays as a blank in
the transformation. If an input value is NULL, the Informatica Server leaves it as NULL.
Output port. The system default value for output transformation errors is ERROR. The
default value displays in the transformation as ERROR(transformation error). If a
transformation error occurs, the Informatica Server skips the row. The Informatica Server
notes all input rows skipped by the ERROR function in the session log file.
The following errors are considered transformation errors:
Input/output port. The system default value for null input is the same as input ports,
NULL. It displays as blank in the transformation. The default value for output
transformation errors is the same as output ports. It does not display in the
transformation.
Table 9-4 shows the system default values for ports in connected transformations:
Table 9-4. System Default Values and Server Behavior
Port Type
Default
Value
Server Behavior
User-Defined Default
Value Supported
Input,
Input/Output
NULL
Input
Input/Output
Output,
Input/Output
ERROR
Output only
Note: Variable ports do not support default values. The Informatica Server initializes variable
ports according to the datatype. For details, see Using Local Variables on page 261.
265
Figure 9-6 illustrates that the system default value for input and input/output ports
appears as a blank in the transformation:
Figure 9-6. Default Value for Input and Input/Output Ports
Selected
Port
Blank
Default
Value for
input port
means
NULL.
Figure 9-7 illustrates that the system default value for output ports appears
ERROR(transformation error):
Figure 9-7. Default Value for Output Ports
Selected
Port
ERROR
Default
Value
You can override some of the default values to change the Informatica Server behavior when it
encounters null input values and output transformation errors.
266
Chapter 9: Transformations
Input ports. You can enter user-defined default values for input ports if you do not want
the Informatica Server to treat null values as NULL.
Output ports. You can enter user-defined default values for output ports if you do not
want the Informatica Server to skip the row, or if you want the Informatica Server to write
a specific message with the skipped row to the session log.
Input/output ports. You can enter user-defined default values to handle null input values
for input/output ports in the same way you can enter user-defined default values for null
input values for input ports. You cannot enter user-defined default values for output
transformation errors in an input/output port.
Note: The Informatica Server ignores user-defined default values for unconnected
Advanced External
Procedure
Supported
Supported
Not Supported
Aggregator
Supported
Not Supported
Not Supported
Expression
Supported
Supported
Not Supported
External Procedure
Supported
Supported
Not Supported
Filter
Supported
Not Supported
Not Supported
Joiner
Supported
Supported
Not Supported
Lookup
Supported
Supported
Not Supported
Normalizer
Supported
Supported
Not Supported
Rank
Not Supported
Supported
Not Supported
Router
Supported
Not Supported
Not Supported
Stored Procedure
Supported
Supported
Not Supported
Sequence Generator
n/a
Not Supported
Not Supported
Sorter
Supported
Not Supported
Not Supported
Source Qualifier
Not Supported
n/a
Not Supported
Update Strategy
Supported
n/a
Not Supported
Transformation
267
Constant value. You can use any constant (numeric or text), including NULL.
ERROR. Generate a transformation error. Write the row and a message in the session log.
You cannot use values from ports within the expression because the Informatica Server assigns
default values for the entire mapping when it initializes the session. Some invalid default
values include the following examples, which incorporate values read from ports:
AVG(IN_SALARY)
IN_PRICE * IN_QUANTITY
:LKP(LKP_DATES, DATE_SHIPPED)
Note: You cannot call a stored procedure or lookup table from a default value expression.
268
Chapter 9: Transformations
Table 9-6 summarizes how the Informatica Server handles null input for input and input/
output ports:
Table 9-6. Default Values for Input and Input/Output Ports
Default Value
Default Value
Type
Description
System
Constant or
Constant expression
User-Defined
The Informatica Server replaces the null value with the value of the
constant or constant expression.
ERROR
User-Defined
ABORT
User-Defined
The session aborts when the Informatica Server encounters a null input
value. The Informatica Server does not increase the error count or write
rows to the reject file.
269
Figure 9-8 shows a string constant as a user-defined default value for input or input/output
ports:
Figure 9-8. Using a Constant as a Default Value
Selected Port
User-Defined
Constant
Default Value
The Informatica Server replaces all null values in the DEPT_NAME port with the string
UNKNOWN DEPT.
DEPT_NAME
REPLACED VALUE
Housewares
Housewares
NULL
UNKNOWN DEPT
Produce
Produce
270
Chapter 9: Transformations
Figure 9-9 shows a user-defined default value that instructs the Informatica Server to skip null
values:
Figure 9-9. Using the ERROR Function to Skip Null Input Values
When you use the ERROR function as a default value, the Informatica Server skips the row
with the null value. The Informatica Server writes all rows skipped by the ERROR function
into the session log file. It does not write these rows to the session reject file.
DEPT_NAME
RETURN VALUE
Housewares
Housewares
NULL
Produce
Produce
In this example, the Informatica Server skips the row with the null value, including a note in
the session log:
TE_11019 Port [DEPT_NAME]: Default value is: ERROR(<<Transformation
Error>> [error]: Error. DEPT is NULL
... error('Error. DEPT is NULL')
).
CMN_1053 EXPTRANS: : ERROR: NULL input column DEPT_NAME: Current Input
data:
CMN_1053
Rowid=2
271
For details on the ERROR function, see Functions in the Transformation Language
Reference.
Replace the error with a constant value or constant expression. The Informatica Server
does not skip the row.
You cannot enter user-defined default output values for input/output ports.
Table 9-7 summarizes how the Informatica Server handles output port transformation errors
and default values in transformations:
Table 9-7. Supported Default Values for Output Ports
Default Value
Default Value
Type
Transformation Error
System
When a transformation error occurs and you did not override the default
value, the Informatica Server performs the following tasks:
- Increases the transformation error count by 1.
- Skips the row, and writes the error and input row to the session log file.
The Informatica Server does not write the row to the reject file.
Constant or
Constant Expression
User-Defined
The Informatica Server replaces the error with the default value.
The Informatica Server does not increase the error count or write a
message to the session log.
ABORT
User-Defined
The session aborts and the Informatica Server writes a message to the
session log.
The Informatica Server does not increase the error count or write rows to
the reject file.
Description
Replacing Errors
If you do not want the Informatica Server to skip a row when a transformation error occurs,
you can use a constant or constant expression as the default value for an output port. For
272
Chapter 9: Transformations
example, if you have a numeric output port called NET_SALARY and you want to use the
constant value 9999 when a transformation error occurs, assign the default value 9999 to the
NET_SALARY port. If there is any transformation error (such as dividing by zero) while
computing the value of NET_SALARY, the Informatica Server uses the default value 9999.
The following examples show how user-defined default values may override the ERROR
function in the expression:
Constant value or expression. The constant value or expression overrides the ERROR
function in the output port expression.
For example, if you enter 0 as the default value, the Informatica Server overrides the
ERROR function in the output port expression. It passes the value 0 when it encounters
an error. It does not skip the row or write Negative Sale in the session log.
ABORT. The ABORT function overrides the ERROR function in the output port
expression.
If you use the ABORT function as the default value, the Informatica Server ABORTS the
session when a transformation error occurs. The ABORT function overrides the ERROR
function in the output port expression.
ERROR. If you use the ERROR function as the default value, the Informatica Server
includes the following information in the session log:
Error message indicated in the ERROR function in the output port expression
Skipped row
273
For example, you can override the default value with the following ERROR function:
ERROR(No default value)
The Informatica Server skips the record, and includes both error messages in the session
log file.
TE_7007 Transformation Evaluation Error; current row skipped...
TE_7007 [<<Transformation Error>> [error]: Negative Sale
... error('Negative Sale')
]
Sun Sep 20 13:57:28 1998
TE_11019 Port [OUT_SALES]: Default value is: ERROR(<<Transformation
Error>> [error]: No default value
... error('No default value')
274
The default value must be either a NULL, a constant value, a constant expression, an
ERROR function, or an ABORT function.
For input/output ports, the Informatica Server uses default values to handle null input
values. The output default value of input/output ports is always ERROR(Transformation
Error).
You can assign default values to group by ports in the Aggregator and Rank
transformations.
Not all port types in all transformations allow user-defined default values. If a port does
not allow user-defined default values, the default value field is disabled.
Not all transformations allow user-defined default value. For details, see Table 9-5 on
page 267.
If any input port is unconnected, its value is assumed to be NULL and the Informatica
Server uses the default value for that input port.
If an input port default value contains the ABORT function and the input value is NULL,
the Informatica Server immediately stops the session. You can use the ABORT function as
a default value to restrict null input values. The first null value in an input port stops the
session.
If an output port default value contains the ABORT function and any transformation
error occurs for that port, the session immediately stops. You can use the ABORT function
Chapter 9: Transformations
as a default value to enforce strict rules for transformation errors. The first transformation
error for this port stops the session.
The ABORT function, constant values, and constant expressions override ERROR
functions configured in output port expressions.
Selected Port
User-Defined
Default Value
Validate Button
The Designer also validates default values when you save a mapping. If you enter an invalid
default value, the Designer marks the mapping invalid.
275
Description
Normal
Informatica Server logs initialization and status information, errors encountered, and skipped
rows due to transformation row errors. Summarizes session results, but not at the level of
individual rows.
Terse
Informatica Server logs initialization information as well as error messages and notification of
rejected data.
Verbose Init
In addition to normal tracing, Informatica Server logs additional initialization details, names of
index and data files used, and detailed transformation statistics.
Verbose Data
In addition to verbose initialization tracing, Informatica Server logs each row that passes into the
mapping. Also notes where the Informatica Server truncates string data to fit the precision of a
column and provides detailed transformation statistics.
By default, the tracing level for every transformation is Normal. You change the tracing level
to a Verbose setting only when you need to debug a transformation that is not behaving as
expected. To add a slight performance boost, you can also set the tracing level to Terse,
writing the minimum of detail to the session log when running a workflow containing the
transformation.
When you configure a session, you can override the tracing levels for individual
transformations with a single tracing level for all transformations in the session.
276
Chapter 9: Transformations
Linking Ports
After you add transformations to a mapping or mapplet, you can link the ports between
transformations. The Informatica Server passes data from one transformation to another
through the ports.
You can manually link ports, or you can automatically link ports between transformations.
When you link ports automatically, you can link by position or by name. When you link ports
automatically by name, you can specify a prefix or suffix by which to link the ports. Use
prefixes or suffixes to indicate where ports occur in a mapping. For example, your mapping
includes a port in the Source Qualifier called Name and a corresponding port in a Filter
transformation called FilName. Fil is the prefix you specify when you automatically link
ports between the Source Qualifier and Filter transformation.
You can link many transformations to one transformation, one to many, or one to one.
When you link transformations, the Designer performs validation. If the attempted link is
invalid, the Designer does not create the link, and it displays an error message in the status
bar explaining the problem.
Linking Ports
277
Figure 9-11 shows the results of linking ports based on their relative positions:
Figure 9-11. Link by Position
Choose Layout-Autolink.
2.
3.
Select Position.
Link by Position
4.
Click OK. The Designer links the first output port to the first input port, the second
output port to the second input port, and so forth.
278
Link by name.
Chapter 9: Transformations
Linking by Name
The Designer adds links between input and output ports that have the same name. Linking by
name is case insensitive. Link by name when you use the same port names across
transformations.
To link ports by name:
1.
Choose Layout-Autolink.
2.
3.
Select Name.
Link by Name
4.
Click OK.
The Designer adds links between input and output ports that have the same name,
regardless of name case.
Figure 9-12 shows the results of linking SQ_CUSTOMERS to FIL_STATE using the
name option:
Figure 9-12. Link by Name
Linking Ports
279
Choose Layout-Autolink.
2.
3.
Select Name.
4.
Click More to view the options for entering prefixes and suffixes.
When you click the More button, it toggles to the Less button.
5.
In From Transformation, enter the prefix used in the ports from which you are linking.
6.
In To Transformation, enter the prefix used in the ports to which you are linking.
In this example, the Designer links ports in SQ_CUSTOMERS to ports in FIL_STATE
where the port name in FIL_STATE is either the same as SQ_CUSTOMERS, or is the
same and is preceded by the prefix F_.
7.
280
Click OK.
Chapter 9: Transformations
Figure 9-13 shows the results of linking SQ_CUSTOMERS to FIL_STATE using the
name and prefix option:
Figure 9-13. Link by Name and Prefix
Choose Layout-Autolink.
2.
3.
Select Name.
4.
Click More to view the options for entering prefixes and suffixes.
5.
In From Transformation, enter the suffix used in the ports from which you are linking.
6.
In To Transformation, enter the suffix used in the ports to which you are linking.
Linking Ports
281
Click OK.
Figure 9-14 shows the results of linking SQ_CUSTOMERS to FIL_STATE using the
name and suffix option.
Figure 9-14. Link by Name and Suffix
One to many.
282
Chapter 9: Transformations
Link Validation
If the Designer detects an error when you try to link ports, it displays a symbol indicating that
you cannot link the ports. You cannot link ports that do not meet the following validation
requirements:
Follow logic of data flow in the mapping. Given the logic of the data flow between
sources and targets, you can link the following types of ports:
You cannot link input ports to input ports or output ports to output ports.
The receiving transformation can have only one originating active transformation. You
cannot link two active transformations to the same transformation, since the Informatica
Server cannot verify that both transformations provide the same number of records.
You can link any number of passive transformations, or link one active transformation
with any number of passive transformations, to the same transformation or target.
The datatypes must be compatible. The Designer checks if it can map between the two
datatypes before linking them. The Informatica Server cannot transform data between
ports with incompatible datatypes. While the datatypes do not have to be identical, they
do have to be compatible, such as Char and Varchar. For a list of compatible datatypes, see
Datatype Reference on page 487.
Link a source definition to a Source Qualifier transformation only. Every source must
link to a Source Qualifier or Normalizer transformation. You then link the Source
Qualifier or Normalizer to targets or other transformations.
Linking Ports
283
284
Link columns to a target definition. You can link ports into a target definition in a
mapping, but you cannot copy columns into a target definition in a mapping. Use the
Warehouse Designer to add columns to a target definition.
Chapter 9: Transformations
Reusable Transformations
Mappings can contain standard and reusable transformations. Standard transformations exist
within a single mapping. Reusable transformations can be used in multiple mappings.
For example, you might create an Expression transformation that calculates value-added tax
for sales in Canada, which is useful when you analyze the cost of doing business in that
country. Rather than perform the same work every time, you can create a reusable
transformation. When you need to incorporate this transformation into a mapping, you add
an instance of it to the mapping. Later, if you change the definition of the transformation, all
instances of it inherit the changes.
The Designer stores each reusable transformation as metadata separate from any mappings
that use the transformation. If you review the contents of a folder in the Navigator, you see
the list of all reusable transformations in that folder.
Each reusable transformation falls within a category of transformations available in the
Designer. For example, you can create a reusable Aggregator transformation to perform the
same aggregate calculations in multiple mappings, or a reusable Stored Procedure
transformation to call the same stored procedure in multiple mappings.
Normally, you have the option to create any transformation as a standard or reusable
transformation. However, you can only create External Procedure and Advanced External
Procedure transformations as reusable transformations.
When you add instances of a reusable transformation to mappings, you must be careful about
the changes you make to the transformation.
Reusable Transformations
285
If the mapping parameter or variable does not exist in the mapplet or mapping, the Designer
logs an error.
For details, see Mapping Parameters and Variables on page 305.
Promote a standard transformation from the Mapping Designer. After you add a
transformation to a mapping, you can promote it to the status of reusable transformation.
The transformation designed in the mapping then becomes an instance of a reusable
transformation maintained elsewhere in the repository.
If you promote a transformation to reusable status, you cannot demote it. However, you can
create a standard, or non-reusable, instance of it.
Note: Sequence Generator transformations must be reusable in mapplets. You cannot demote
2.
3.
4.
Double-click the transformation title bar to open the dialog displaying its properties.
5.
Click the Rename button and enter a descriptive name for the transformation, and click
OK.
The naming convention for reusable transformations is reuTransformation_Name.
6.
Click the Ports tab, then add any input and output ports you need for this
transformation.
7.
8.
286
Choose Repository-Save.
Chapter 9: Transformations
In the Designer, open a mapping and double-click the title bar of the transformation you
want to promote.
2.
3.
When prompted whether you are sure you want to promote the transformation, click Yes.
4.
5.
Choose Repository-Save.
Now, when you look at the list of reusable transformations in the folder you are working in,
the newly promoted transformation appears in this list.
2.
In the Navigator, select an existing transformation, hold down the Ctrl key, and drag the
transformation into the mapping.
The status bar displays the following message:
Make a non-reusable copy of this transformation and add it to this
mapping.
3.
4.
Choose Repository-Save.
Reusable Transformations
287
2.
3.
In the list of repository objects, drill down until you find the reusable transformation you
want in the Transformations section of a folder.
4.
Click and drag the transformation from the Navigator into the mapping.
A copy (or instance) of the reusable transformation appears.
5.
6.
Choose Repository-Save.
When you delete a port or multiple ports in a transformation, you disconnect the instance
from part or all of the data flow through the mapping.
When you change a port datatype, you make it impossible to map data from that port to
another port using an incompatible datatype.
When you change a port name, expressions that refer to the port are no longer valid.
When you enter an invalid expression in the reusable transformation, mappings that use
the transformation are no longer valid. The Informatica Server cannot execute sessions
based on invalid mappings until you correct the errors.
288
Chapter 9: Transformations
Figure 9-17 shows how you can revert to the original properties of the reusable
transformation:
Figure 9-17. Reverting to Original Reusable Transformation Properties
Revert to original
properties
defined in
Transformation
Developer.
Reusable Transformations
289
290
Chapter 9: Transformations
Chapter 10
Mapplets
This chapter includes the following topics:
Overview, 292
Tips, 304
291
Overview
A mapplet is a reusable object that you create in the Mapplet Designer. It contains a set of
transformations and allows you to reuse that transformation logic in multiple mappings.
For example, if you have several fact tables that require a series of dimension keys, you can
create a mapplet containing a series of Lookup transformations to find each dimension key.
You can then use the mapplet in each fact table mapping, rather than recreate the same
lookup logic in each mapping.
When you use a mapplet in a mapping, you use an instance of the mapplet. Like a reusable
transformation, any changes made to the mapplet are inherited by all instances of the
mapplet.
Mapplets help simplify mappings in the following ways:
292
Include source definitions. You can use multiple source definitions and source qualifiers
to provide source data for a mapping.
Accept data from sources in a mapping. If you want the mapplet to receive data from the
mapping, you can use an Input transformation to receive source data.
Pass data to multiple transformations. You can create a mapplet to feed data to multiple
transformations. Each Output transformation in a mapplet represents one output group in
a mapplet.
Contain unused ports. You do not have to connect all mapplet input and output ports in
a mapping.
Mapplet input. You can pass data into a mapplet using source definitions and/or Input
transformations. When you use an Input transformation, you connect it to the source
pipeline in the mapping.
Mapplet output. Each mapplet must contain one or more Output transformations to pass
data from the mapplet into the mapping.
Mapplet ports. Mapplet ports display only in the Mapping Designer. Mapplet ports
consist of input ports from Input transformations and output ports from Output
transformations. Other ports within the mapplet are referred to as transformation ports. If
a mapplet uses source definitions rather than Input transformations for input, it does not
contain any input ports in the mapping.
Mapplet Input
Mapplet input can originate from a source definition and/or from an Input transformation in
the mapplet. You can create multiple pipelines in a mapplet. You can use multiple source
definitions and source qualifiers or Input transformations. You can also use a combination of
source definitions and Input transformations.
Mapplet Output
Use an Output transformation in a mapplet to pass data through the mapplet into a mapping.
A mapplet must contain at least one Output transformation with at least one connected port
Understanding Mapplet Input and Output
293
Input Transformation
Output Transformation
When you use the mapplet in a mapping, the mapplet object displays only the ports from the
Input and Output transformations. These are referred to as the mapplet input and mapplet
output ports.
Figure 10-2 shows a mapplet in the Mapping Designer:
Figure 10-2. Sample Mapplet in a Mapping
294
You can expand the mapplet in the Mapping Designer by selecting it and choosing MappingsExpand from the menu. This expands the mapplet within the mapping for view.
Transformation icons within an expanded mapplet display as shaded.
You can open or iconize all the transformations in the mapplet and mapping. You cannot edit
any of the properties, navigate to other folders, or save the repository while the mapplet is
expanded.
Figure 10-3 shows an expanded mapplet in the Mapping Designer:
Figure 10-3. Expanded Mapplet in a Mapping
Mapping Sources
Mapplet Transformations
Mapping Target
Notice that you do not see the Input and Output transformations.
295
Create a mapplet. Choose Mapplets-Create from the menu in the Mapplet Designer. The
recommended naming convention for mapplets is mpltMappletName.
2.
Create mapplet transformation logic. Create and link transformations in the same
manner as in a mapping.
3.
Create mapplet ports. For more information about mapplet components and ports, see
Creating and Configuring Mapplet Ports on page 300.
Creating a Mapplet
A mapplet can be active or passive depending on the transformations in the mapplet. Active
mapplets contain one or more active transformations. Passive mapplets contain only passive
transformations. When you use a mapplet in a mapping, all transformation rules apply to the
mapplet depending on the mapplet type. For example, as with an active transformation, you
cannot concatenate data from an active mapplet with a different pipeline.
When you add transformations to a mapplet, keep the following restrictions in mind:
If you use a Sequence Generator transformation, you must use a reusable Sequence
Generator transformation.
If you use a Stored Procedure transformation, you must configure the Stored Procedure
Type to be Normal.
Normalizer transformations
COBOL sources
XML sources
Target definitions
Other mapplets
Although you can use reusable transformations and shortcuts in a mapplet, to protect the
validity of your mapplet, use a copy of a transformation instead. Reusable transformations
and shortcuts automatically inherit changes to their original transformations. This might
invalidate the mapplet and the mappings that use the mapplet.
For more information about active and passive transformations, see Overview on page 252.
296
Validating Mapplets
The Designer validates a mapplet when you save it. You can also validate a mapplet using the
Mapplet-Validate menu command. When you validate a mapplet, the Designer writes all
relevant messages about the mapplet in the Output window.
The Designer validates the mapplet pipeline in the same way it validates a mapping. The
Designer also performs the following checks specific to mapplets:
The mapplet contains Input transformations and/or source definitions with at least one
port connected to a transformation in the mapplet.
The mapplet contains at least one Output transformation with at least one port connected
to a transformation in the mapplet.
For more information about validating mappings, see Validating a Mapping on page 246.
Editing Mapplets
You can edit a mapplet in the Mapplet Designer. The Designer validates your changes when
you save the mapplet. When you save changes to a mapplet, all instances of the mapplet and
all shortcuts to the mapplet inherit your changes. These changes might invalidate mappings
that use the mapplet.
To see what mappings or shortcuts may be affected by changes you make to a mapplet, select
the mapplet in the Navigator, right-click, and select View Dependencies. Or, select MappletsView Dependencies from the menu bar. For more information on viewing dependencies, see
Viewing Object Dependencies on page 34.
You can make the following changes to a mapplet without affecting the validity of existing
mappings and sessions:
Add or remove transformations in the mapplet, providing you do not change the mapplet
type from active to passive or from passive to active.
To maintain valid mappings, use the following rules when you edit a mapplet that is used by
mappings:
Do not delete a port from the mapplet. The Designer deletes mapplet ports in the
mapping when you delete links to an Input or Output transformation or when you delete
ports connected to an Input or Output transformation.
Do not change the datatype, precision, or scale of a mapplet port. The datatype,
precision, and scale of a mapplet port is defined by the transformation port to which it is
connected in the mapplet. Therefore, if you edit a mapplet to change the datatype,
297
Do not change the mapplet type. If you remove all active transformations from an active
mapplet, the mapplet becomes passive. If you add an active transformation to a passive
mapplet, the mapplet becomes active.
Set tracing level. You can set the tracing level on individual transformations within a
mapplet in the same manner as in a mapping.
Copy mapplet. You can copy a mapplet from one folder to another as you would any other
repository object. After you copy the mapplet, it appears in the Mapplets node of the new
folder.
If you make changes to a mapplet, but you do not want to overwrite the original mapplet,
you can make a copy of the mapplet by choosing Mapplet-Copy As. For details, see
Copying a Mapping on page 224.
298
Export and import mapplets. The Designer allows you to export a mapplet to an XML file
or import a mapplet from an XML file. You might want to use the export and import
feature to copy a mapplet to another repository. For details on exporting and importing
mapplets and other objects, see Exporting and Importing Objects in the Repository
Guide.
Delete mapplets. When you delete a mapplet you delete all instances of the mapplet. This
invalidates each mapping containing an instance of the mapplet or a shortcut to the
mapplet.
Compare mapplets. You can compare two mapplets to find differences between them. For
example, if you have mapplets with the same name in different folders, you can compare
them to see if they differ. For details, see Comparing Mappings and Mapplets on
page 384.
Compare instances within a mapplet. You can compare instances in a mapplet to see if
they contain similar attributes. For example, you can compare a source instance with
another source instance, or a transformation with another transformation. You compare
instances within a mapplet in the same way you compare instances within a mapping. For
details, see Comparing Instances on page 388.
Create shortcuts to mapplets. You can create a shortcut to a mapplet if the mapplet is in a
shared folder. When you use a shortcut to a mapplet in a mapping, the shortcut inherits
any changes you might make to the mapplet. However, these changes might not appear
until the Informatica Server runs the workflow using the shortcut. Therefore, only use a
shortcut to a mapplet when you do not expect to edit the mapplet. For details, see Local
and Global Shortcuts in the Repository Guide.
Add a description. You can add a description to the mapplet in the Mapplet Designer in
the same manner as in a mapping. You can also add a description to the mapplet instance
in a mapping. When you add a description, you can also create links to documentation
files. The links must be a valid URL or file path to reference your business documentation.
For more information about business documentation, see Using Business
Documentation on page 40.
View links to a port. You can view links to a port in a mapplet in the same way you would
view links to a port in a mapping. You can view the forward path, the backward path, or
both paths. For details, see Viewing Link Paths to a Port on page 228.
299
2.
If a mapplet contains input ports, connect at least one mapplet input port to a
transformation in the mapping.
3.
Manually create ports in the Input/Output transformation. You can create port names in
Input and Output transformations. You can also enter a description for each port name.
The port has no defined datatype, precision, or scale until you connect it to a
transformation in the mapplet.
Drag a port from another transformation. You can create an input or output port by
dragging a port from another transformation into the Input or Output transformation.
The new port inherits the port name, description, datatype, and scale of the original port.
You can edit the new port name and description in the transformation. If you change a
port connection, the Designer updates the Input or Output transformation port to match
the attributes of the new connection.
You can view the datatype, precision, and scale of available mapplet ports when you use the
mapplet in a mapping.
300
When a mapplet contains a source qualifier that has an override for the default SQL query,
you must connect all mapplet output ports to the mapping pipeline.
If the mapping does not require all the output from a mapplet, connect all mapplet ports
to the next transformation in the mapping, then leave unnecessary ports unconnected
from the rest of the mapping.
If the mapplet contains more than one source qualifier, you can use a Joiner
transformation to join the output into one pipeline.
301
If the mapplet contains only one source qualifier, you must connect the mapplet output
ports to separate pipelines. You cannot use a Joiner transformation to join the output.
If you need to join the pipelines, you can create two mappings to perform this task:
Use the mapplet in the first mapping and write data in each pipeline to separate targets.
Use the targets as sources in the second mapping to join data, then perform any
additional transformation necessary.
When a mapplet contains a source qualifier that has an override for the default SQL query,
you must connect all mapplet output ports to the mapping pipeline.
If the mapping does not require all the output from a mapplet, connect all mapplet ports to
the next transformation in the mapping, then leave unnecessary ports unconnected from the
rest of the mapping.
Pipeline Partitioning
If you use PowerCenter, you can increase the number of partitions in a pipeline to improve
session performance. Increasing the number of partitions allows the Informatica Server to
create multiple connections to sources and process partitions of source data concurrently.
When you create a session, the Workflow Manager validates each pipeline in the mapping for
partitioning. You can specify multiple partitions in a pipeline if the Informatica Server can
maintain data consistency when it processes the partitioned data.
There are partitioning restrictions that apply to mapplets. For more information on
restrictions for partitioning data, see Pipeline Partitioning in the Workflow Administration
Guide.
302
Mapplet Guidelines
The following list summarizes the guidelines that appear throughout this chapter:
A mapplet must contain at least one Input transformations or source definition with at
least one port connected to a transformation in the mapplet.
A mapplet must contain at least one Output transformation with at least one port
connected to another transformation in the mapping.
When a mapplet contains a source qualifier that has an override for the default SQL query,
you must connect all mapplet output ports to the mapping pipeline.
If the mapplet contains more than one source qualifier, you can use a Joiner
transformation to join the output into one pipeline. If the mapplet contains only one
source qualifier, you must connect the mapplet output ports to separate pipelines. You
cannot use a Joiner transformation to join the output.
When you edit a mapplet, you might invalidate mappings if you change the mapplet type
from passive to active.
If you delete ports in the mapplet when the mapplet is used in a mapping, you can
invalidate the mapping.
Do not change the datatype, precision, or scale of a mapplet port when the mapplet is used
by a mapping.
If you use a Sequence Generator transformation, you must use a reusable Sequence
Generator transformation.
If you use a Stored Procedure transformation, you must configure the Stored Procedure
Type to be Normal.
Normalizer transformations
Cobol sources
XML sources
Target definitions
Other mapplets
Mapplet Guidelines
303
Tips
Enter comments for Input and Output transformations.
In a mapping, you can view comments associated with an Input or Output transformation by
holding the pointer over the transformation name in the mapplet. You can clarify the use of a
mapplet and its ports by creating descriptive comments or instructions in the Description
field of Input and Output transformations. You can even include links to business
documentation.
Create an Output transformation for each output group you need.
You can pass data from each mapplet output group to a different mapping pipeline. Create an
Output transformation for each output group you need.
To create mapplets from existing mappings, copy the objects from the mapping into the
Mapplet Designer.
Configure Sequence Generator caches appropriately.
You can include a reusable Sequence Generator transformation in a mapplet. If you use the
mapplet in several mappings and each mapping expends a large number of values in a session,
you might want to configure the cache size for reusable Sequence Generator to limit the
number of unused values.
To keep existing mappings valid when you edit a mapplet used in a mapping:
304
Do not change the datatype, precision, or scale of connected ports in an Input or Output
transformation.
Chapter 11
Overview, 306
Tips, 322
Troubleshooting, 323
305
Overview
In the Designer, you can use mapping parameters and variables to make mappings more
flexible. Mapping parameters and variables represent values in mappings and mapplets. If you
declare mapping parameters and variables in a mapping, you can reuse a mapping by altering
the parameter and variable values of the mapping in the session. This can reduce the overhead
of creating multiple mappings when only certain attributes of a mapping need to be changed.
When you use a mapping parameter or variable in a mapping, first you declare the mapping
parameter or variable for use in each mapplet or mapping. Then, you define a value for the
mapping parameter or variable before you run the session.
You can use mapping parameters and variables in a mapping to incrementally extract data.
Use mapping parameters or variables in the source filter of a Source Qualifier transformation
to determine the beginning timestamp and end timestamp for incrementally extracting data.
For example, you can create a user-defined mapping variable $$LastUpdateDateTime that
saves the timestamp of the last row the Informatica Server read in the previous session. Use
$$LastUpdateDateTime for the beginning timestamp and the built-in variable
$$$SessStartTime for the end time stamp in the source filter. Use the following filter to
incrementally extract data based on the SALES.sales_datetime column in the source:
SALES.sales_datetime > TO_DATE ($$LastUpdateDateTime) AND
SALES.sales_datetime < TO_DATE ($$$SessStartTime)
See the Informatica Webzine article Using Mapping Variables for Incremental Extraction
for more information.
Mapping Parameters
A mapping parameter represents a constant value that you can define before running a
session. A mapping parameter retains the same value throughout the entire session.
When you use a mapping parameter, you declare and use the parameter in a mapping or
mapplet. Then define the value of the parameter in a parameter file. During the session, the
Informatica Server evaluates all references to the parameter to that value.
For example, you want to use the same session to extract transaction records for each of your
customers individually. Instead of creating a separate mapping for each customer account, you
can create a mapping parameter to represent a single customer account. Then you can use the
parameter in a source filter to extract only data for that customer account. Before running the
session, you enter the value of the parameter in the parameter file.
To reuse the same mapping to extract records for other customer accounts, you can enter a
new value for the parameter in the parameter file and run the session. Or you can create a
parameter file for each customer account and start the session with a different parameter file
each time using pmcmd. By using a parameter file, you reduce the overhead of creating
multiple mappings and sessions to extract transaction records for different customer accounts.
306
When you want to use the same value for a mapping parameter each time you run the session,
use the same parameter file for each session run. When you want to change the value of a
mapping parameter between sessions you can either:
Create a different parameter file and configure the session to use the new file.
Remove the parameter file from the session properties so that the session uses the
configured initial value of the parameter in the mapping.
Mapping Variables
Unlike a mapping parameter, a mapping variable represents a value that can change through
the session. The Informatica Server saves the value of a mapping variable to the repository at
the end of each successful session run and uses that value the next time you run the session.
When you use a mapping variable, you declare the variable in the mapping or mapplet, and
then use a variable function in the mapping to automatically change the value of the variable.
At the beginning of a session, the Informatica Server evaluates references to a variable to its
start value. At the end of a successful session, the Informatica Server saves the final value of
the variable to the repository. The next time you run the session, the Informatica Server
evaluates references to the variable to the saved value. You can override the saved value by
defining the start value of the variable in a parameter file.
Use mapping variables to perform automatic incremental reads of a source. For example,
suppose the customer accounts in the mapping parameter example, above, are numbered from
001 to 065, incremented by one. Instead of creating a mapping parameter, you can create a
mapping variable with an initial value of 001. In the mapping, use a variable function to
increase the variable value by one. The first time the Informatica Server runs the session, it
extracts the records for customer account 001. At the end of the session, it increments the
variable by one and saves that value to the repository. The next time the Informatica Server
runs the session, it automatically extracts the records for the next customer account, 002. It
also increments the variable value so the next session extracts and looks up data for customer
account 003.
For more information on variable functions, see Variable Functions on page 317.
307
When you create a reusable transformation in the Transformation Developer, you can use any
mapping parameter or variable. Since a reusable transformation is not contained within any
mapplet or mapping, the Designer validates the usage of any mapping parameter or variable
in the expressions of reusable transformation. When you use the reusable transformation in a
mapplet or mapping, the Designer validates the expression again. If the parameter or variable
is not defined in the mapplet or mapping, or if it is used incorrectly in the reusable
transformation, the Designer logs an error when you validate the mapplet or mapping.
When the Designer validates a mapping variable in a reusable transformation, it treats the
variable as an Integer datatype.
You cannot use mapping parameters and variables interchangeably between a mapplet and a
mapping. Mapping parameters and variables declared for a mapping cannot be used within a
mapplet. Similarly, you cannot use a mapping parameter or variable declared for a mapplet in
a mapping.
Default Value
String
Empty string.
Numeric
Datetime
1/1/1753 A.D. or 1/1/1 when Informatica Server is configured for compatibility with 4.0.
For example, you create a new mapping using an Integer mapping variable,
$$MiscellaneousExpenses. You do not configure an initial value for the variable or define it in
a parameter file. The first time you run a session with the mapping, the Informatica Server
uses the default value for numeric datatypes, 0.
Or, suppose you create a mapping parameter $$MiscellaneousCosts to represent additional
expenses that might become relevant in the future, but do not currently exist in source data.
You configure the parameter for a Decimal datatype. Since you want $$MiscellaneousCosts to
evaluate to 0 when you do not have additional expenses, you set the initial value to 0.
308
As long as you do not define the parameter value in the parameter file, the Informatica Server
replaces $$MiscellaneousCosts with 0. When you want to include miscellaneous expenses in
mapping calculations, set $$MiscellaneousCosts to that value in the parameter file.
During the session, the Informatica Server replaces the parameter with a string. If $$State is
defined as MD in the parameter file, the Informatica Server replaces the parameter as follows:
STATE = MD
You can perform a similar filter in the Filter transformation using the Informatica
transformation language as follows:
STATE = $$State
If you surround the parameter with a single quote in the Filter transformation, the
Informatica Server reads it as the string literal, $$State, instead of replacing the parameter
with MD.
For more information on the transformation language, see the Transformation Language
Reference.
The mapping variable value that the Informatica Server saves in the repository is not
compatible with the repository code page.
Overview
309
For example, suppose your repository uses the ISO 8859-1 Latin1 code page and you
configure the Informatica Server to relax code page validation. If the mapping variable
value contains Japanese character data, such as JapanEUC, the saved mapping variable
value in the repository could be corrupt. There could be data loss converting from the
JapanEUC code page to the Latin1 code page. Make sure the saved mapping variable value
is two-way compatible with the repository code page.
Informatica recommends that you use 7-bit ASCII data for all repository metadata when
you relax code page validation.
The parameter file contains characters that are not compatible with the Informatica Server
code page.
The Informatica Server interprets the data in the parameter file using the Informatica
Server code page. For example, suppose your Informatica Server uses the ISO 8859-1
Latin1 code page and you configure the Informatica Server to relax code page validation. If
you create a parameter file and use Greek character data, such as ISO 8859-7, the value the
Informatica Server reads from the file could be corrupt. There could be data loss
converting from the ISO 8859-7 code page to the Latin1 code page. Make sure the
characters in the parameter file are a subset of the Informatica Server code page.
For more information on code page relaxation, see Globalization Overview in the
Installation and Configuration Guide.
310
Mapping Parameters
In the Designer, you can create a mapping parameter in a mapplet or mapping. After you
create a parameter, it appears in the Expression Editor. You can then use the parameter in any
expression in the mapplet or mapping. You can also use parameters in a source qualifier filter,
user-defined join, or extract override, and in the Expression Editor of reusable
transformations.
Before you run a session, define the mapping parameter value in a parameter file for the
session. You can use any constant value. During the session, the Informatica Server evaluates
all references to the parameter to the specified value. If the parameter is not defined in the
parameter file, the Informatica Server uses the user-defined initial value for the parameter. If
the initial value is not defined, the Informatica Server uses a default value based on the
datatype of the mapping parameter. For a list of default values, see Table 11-1 on page 308.
You can change the value of a mapping parameter between sessions by editing the parameter
file or by changing the parameter file used by the session.
You might use a mapping parameter instead of a database lookup. For example, you want to
perform calculations using monthly gross earnings. Instead of using a Lookup transformation
to connect to a database table for that information, you can create a gross earnings mapping
parameter and update its value in the parameter file each month to reflect current earnings.
You might also use a mapping parameter in conjunction with a session parameter to reuse a
mapping and session. For example, you have transactional data from different states stored in
the same table in different databases, and you want to perform the same calculations on all
data, while changing the state sales tax accordingly. Instead of creating a separate mapping
and session for each state, you can create a single mapping with a sales tax mapping parameter
and a session using a source database connection session parameter. You can then create a
different parameter file for each state. Before running the session, you can change the
parameter file the Informatica Server uses by entering a different parameter filename from
pmcmd or by editing the session in the Workflow Manager.
To use a mapping parameter, perform the following steps:
1.
2.
3.
Mapping Parameters
311
2.
Add Button
3.
312
Field
Required/
Optional
Name
Required
Type
Required
Datatype
Required
Precision or Scale
Required
Initial Value
Optional
Initial value of the parameter. If you do not set a value for the
parameter in the parameter file, the Informatica Server uses this value
for the parameter during sessions. If this value is also undefined, the
Informatica Server uses a default value based on the datatype of the
mapping variable.
Use any of the following formats for initial values for Date/Time
parameters:
- MM/DD/RR
- MM/DD/RR HH24:MI:SS
- MM/DD/YYYY
- MM/DD/YYYY HH24:MI:SS
Description
Optional
Description
When necessary, change the format of the datetime parameter to match the format in the
source. For details on using mapping parameters in a Source Qualifier transformation, see
Source Qualifier Transformation in the Transformation Guide.
Figure 11-1 shows how you can use a mapping parameter in the SQL Editor:
Figure 11-1. Mapping Parameters in the SQL Editor
Mapping
Parameters
You can also use mapping parameters in the Expression Editor. When using mapping
parameters in the Expression Editor, do not enclose string parameters in string identifiers.
The Informatica Server handles parameters just like any other port identifiers.
Mapping Parameters
313
Figure 11-2 shows how you can use a mapping parameter in the Expression Editor:
Figure 11-2. Mapping Parameters in the Expression Editor
Mapping
Parameters
For details on where you can enter expressions, see Working with Expressions on page 258.
You can use mapping parameters in reusable transformations. For more information on
mapping parameters in reusable transformation, see Using Mapping Parameters and
Variables on page 307.
You can also use mapping parameters in transformation overrides in the session properties in
the Workflow Manager. You can override properties such as a filter or user-defined join in a
Source Qualifier transformation. For details on configuring a mapping parameter in the
session properties, see Working with Sessions in the Workflow Administration Guide.
314
Mapping Variables
In the Designer, you can create mapping variables in a mapping or mapplet. After you create a
mapping variable, it appears in the Expression Editor. You can then use it in any expression in
the mapping or mapplet. You can also use mapping variables in a source qualifier filter, userdefined join, or extract override, and in the Expression Editor of reusable transformations.
Unlike mapping parameters, mapping variables are values that can change automatically
between sessions. The Informatica Server saves the latest value of a mapping variable to the
repository at the end of each successful session. During the next session run, it evaluates all
references to the mapping variable to the saved value. You can override a saved value with the
parameter file. You can also clear all saved values for the session in the Workflow Manager.
You might use a mapping variable to perform an incremental read of the source. For example,
you have a source table containing timestamped transactions and you want to evaluate the
transactions on a daily basis. Instead of manually entering a session override to filter source
data each time you run the session, you can create a mapping variable, $$IncludeDateTime.
In the source qualifier, create a filter to read only rows whose transaction date equals
$$IncludeDateTime, such as:
TIMESTAMP = $$IncludeDateTime
In the mapping, you can use a variable function to set the variable value to increment one day
each time the session runs. If you set the initial value of $$IncludeDateTime to 9/1/2000, the
first time the Informatica Server runs the session, it reads only rows dating 9/1/2000. During
the session, the Informatica Server sets $$IncludeDateTime to 9/2/2000. It saves 9/2/2000 to
the repository at the end of the session. The next time it runs the session, it reads only rows
from September 2, 2000.
Variable Values
Conceptually, the Informatica Server holds two different values for a mapping variable during
a session run:
Start Value
The start value is the value of the variable at the start of the session. The start value could be a
value defined in the parameter file for the variable, a value saved in the repository from the
previous run of the session, a user defined initial value for the variable, or the default value
based on the variable datatype. The Informatica Server looks for the start value in the
following order:
1.
2.
Mapping Variables
315
3.
Initial value
4.
Default value
Current Value
The current value is the value of the variable as the session progresses. When a session starts,
the current value of a variable is the same as the start value. As the session progresses, the
Informatica Server calculates the current value using a variable function that you set for the
variable. Unlike the start value of a mapping variable, the current value can change as the
Informatica Server evaluates the current value of a variable as each row passes through the
mapping. The final current value for a variable is saved to the repository at the end of a
successful session. When a session fails to complete, the Informatica Server does not update
the value of the variable in the repository. The Informatica Server states the value saved to the
repository for each mapping variable in the session log.
For details on setting variable functions, see Variable Functions on page 317.
Note: If a variable function is not used to calculate the current value of a mapping variable, the
316
Count
Max
Min
You can configure a mapping variable for a Count aggregation type when it is an Integer or
Small Integer. You can configure mapping variables of any datatype for Max or Min
aggregation types.
To keep the variable value consistent throughout the session run, the Designer limits the
variable functions you can use with a variable based on aggregation type. For example, you
can use the SetMaxVariable function for a variable with a Max aggregation type, but not with
a variable with a Min aggregation type.
Table 11-3 lists the available variable functions and the aggregation types and datatypes you
can use with each function:
Table 11-3. Variable Functions
Variable Function
Valid Datatype
SetVariable
Max or Min
SetMaxVariable
Max only
SetMinVariable
Min only
SetCountVariable
Count only
Variable Functions
Variable functions determine how the Informatica Server calculates the current value of a
mapping variable in a pipeline. You can use variable functions in an expression to set the value
of a mapping variable for the next session run. The transformation language provides the
following variable functions to use in a mapping:
SetMaxVariable. Sets the variable to the maximum value of a group of values. It ignores
rows marked for update, delete, or reject. To use the SetMaxVariable with a mapping
variable, the aggregation type of the mapping variable must be set to Max. For details, see
Variable Datatype and Aggregation Type on page 316.
SetMinVariable. Sets the variable to the minimum value of a group of values. It ignores
rows marked for update, delete, or reject. To use the SetMinVariable with a mapping
variable, the aggregation type of the mapping variable must be set to Min. For details, see
Variable Datatype and Aggregation Type on page 316.
SetCountVariable. Increments the variable value by one. In other words, it adds one to the
variable value when a row is marked for insertion, and subtracts one when the row is
marked for deletion. It ignores rows marked for update or reject. To use the
SetCountVariable with a mapping variable, the aggregation type of the mapping variable
must be set to Count. For details, see Variable Datatype and Aggregation Type on
page 316.
Mapping Variables
317
SetVariable. Sets the variable to the configured value. At the end of a session, it compares
the final current value of the variable to the start value of the variable. Based on the
aggregate type of the variable, it saves a final value to the repository. To use the SetVariable
function with a mapping variable, the aggregation type of the mapping variable must be
set to Max or Min. The SetVariable function ignores rows marked for delete or reject.
Note: You should use variable functions only once for each mapping variable in a pipeline.
When you create multiple partitions in a pipeline, the Informatica Server uses multiple
threads to process that pipeline. If you use multiple variable functions for the same variable,
the current value of a mapping variable may have indeterministic results.
The Informatica Server does not save the final current value of a mapping variable to the
repository when any of the following conditions are true:
The session runs in debug mode and is configured to discard session output.
For details on each variable function, see Functions in the Transformation Language
Reference. For information on variable functions in pipelines with multiple partitions, see
Pipeline Partitioning in the Workflow Administration Guide.
2.
3.
318
2.
Add Button
3.
Required/
Optional
Name
Required
Type
Required
Datatype
Required
Precision or Scale
Required
Aggregation
Required
Description
Mapping Variables
319
4.
Field
Required/
Optional
Initial Value
Optional
Initial value of the variable. The Informatica Server uses this value for
the variable when the variable value is not saved in the repository or
defined in the parameter file. If this value is also undefined, the
Informatica Server uses a default value based on the datatype of the
mapping variable.
Use any of the following formats for initial values for datetime
variables:
- MM/DD/RR
- MM/DD/RR HH24:MI:SS
- MM/DD/YYYY
- MM/DD/YYYY HH24:MI:SS
Description
Optional
Description
Click OK.
Enclose string variables in string identifiers, such as single quotation marks, to indicate the
variable is a string.
When necessary, change the format of the datetime variable to match the format in the
source. The Informatica Server automatically converts dates from the Informatica default
date format to the default date format of the source system. For details, see Source
Qualifier Transformation in the Transformation Guide.
320
When you use a mapping variable, you have to determine how to set the value of the mapping
variable. Use a variable function to set a variable value. You can use a variable function in any
of the following transformations:
Expression
Filter
Router
Update Strategy
Figure 11-3 shows how you can use a variable function to set the value of a mapping variable
in the Expression Editor:
Figure 11-3. Setting a Mapping Variable
Mapping
Variables
Mapping Variables
321
Tips
Enter initial values for mapping parameters and variables.
When you know a logical default value for a mapping parameter or variable, use it as the
initial value when you create the parameter or variable. This allows the Informatica Server to
use your default value instead of a datatype-based default value.
Enclose string and datetime parameters and variables in quotes in the SQL Editor.
When you use a string parameter or variable in a Source Qualifier transformation, enclose it
in string identifiers recognized by the source system, such as single quotation marks.
Save all parameter files in one of the server variable directories.
If you keep all parameter files in one of the server variable directories, such as $SourceFileDir,
you can use the server variable in the session property sheet. If you need to move the source
and parameter files at a later date, you can update all sessions by changing the server variable
to point to the new directory.
Create separate parameter files for reusable sets of parameters.
When you plan to rotate through sets of parameters for a session, create a parameter file for
each set of parameters. Use pmcmd to start the session and specify the name of the parameter
file you want to use, or edit the session to use a different parameter file.
322
Troubleshooting
I created a mapping variable for a mapping, but each time I run the session, the value of the
variable stays the same.
You might not have included a variable function in the mapping. To automatically change the
value of a variable from session to session, use a variable function.
Or you might have configured a value for the variable in the parameter file. When you define
a value for a mapping variable in the parameter file, the Informatica Server uses that value for
the variable. See the session log to determine what start value the Informatica Server uses for
each variable.
In the parameter file, I configured values for parameters in a mapplet, but they are not
being used in the session.
Mapping parameter and variable values in mapplets must be preceded by the mapplet name in
the parameter file, as follows:
mappletname.parameter=value
mappletname.variable=value
I cannot find the variable functions in the Expression Editor of the Rank or Aggregator
transformation.
You cannot use variable functions in the Rank or Aggregator transformation. Use a different
transformation for variable functions.
Troubleshooting
323
324
Chapter 12
Overview, 326
325
Overview
You can debug a valid mapping to gain troubleshooting information about data and error
conditions. To debug a mapping, you configure and run the Debugger from within the
Mapping Designer. The Debugger uses a session to run the mapping on the Informatica
Server. When you run the Debugger, it pauses at breakpoints and allows you to view and edit
transformation output data.
You might want to run the Debugger in the following situations:
Before you run a workflow. After you save a mapping, you can run some initial tests with
a debug session before you create and configure a session in the Workflow Manager.
After you run a workflow. If a session fails or if you receive unexpected results in your
target, you can run the Debugger against the session. You might also want to run the
Debugger against a session if you want the Informatica Server to process the configured
session properties.
Use an existing non-reusable session for the mapping. The Debugger uses existing source,
target, and session configuration properties. When you run the Debugger, the Informatica
Server runs the non-reusable session and the existing workflow. The Debugger does not
suspend on error.
Use an existing reusable session for the mapping. The Debugger uses existing source,
target, and session configuration properties. When you run the Debugger, the Informatica
Server runs a debug instance of the reusable session and creates and runs a debug workflow
for the session.
Create a debug session instance for the mapping. The Debugger Wizard allows you to
configure source, target, and session configuration properties. When you run the
Debugger, the Informatica Server runs a debug instance of the debug workflow and creates
and runs a debug workflow for the session.
Debug Process
Use the following process to debug a mapping:
326
1.
Create breakpoints. You create breakpoints in a mapping where you want the
Informatica Server to evaluate data and error conditions.
2.
Configure the Debugger. Use the Debugger Wizard to configure the Debugger for the
mapping. Select the session type the Informatica Server uses when it runs Debugger.
When you create a debug session, you configure a subset of session properties within the
Debugger Wizard, such as source and target location. You can also choose to load or
discard target data.
3.
Run the Debugger. Run the Debugger from within the Mapping Designer. When you
run the Debugger the Designer connects to the Informatica Server. The Informatica
Server initializes the Debugger and runs the debugging session and workflow. The
Informatica Server reads the breakpoints and pauses the Debugger when the breakpoints
evaluate to true.
4.
Monitor the Debugger. While you run the Debugger, you can monitor the target data,
transformation and mapplet output data, the debug log, and the session log. When you
run the Debugger, the Designer displays the following windows:
5.
Modify data and breakpoints. When the Debugger pauses, you can modify data and see
the effect on transformations, mapplets, and targets as the data moves through the
pipeline. You can also modify breakpoint information.
The Designer saves mapping breakpoint and Debugger information in the workspace files.
You can copy breakpoint information and the Debugger configuration to another mapping. If
you want to run the Debugger from another Informatica Client machine, you can copy the
breakpoint information and the Debugger configuration to the other Informatica Client
machine.
Security Requirements
To create or edit breakpoints, you need one of the following sets of privileges and permissions:
To run the Debugger, you must have a valid mapping and one of the following sets of
privileges and permissions:
Use Designer and Use Workflow Manager privilege with read and execute permission for
the folder
Use Designer and Workflow Operator privilege with read permission for the folder
You also need execute permissions for connection objects associated with the session. For
details on connection objects see Configuring the Workflow Manager in the Workflow
Administration Guide.
Overview
327
Figure 12-1 shows the windows in the Mapping Designer that display when you run the
Debugger:
Figure 12-1. Debugger Windows
Debugger Log
328
Session Log
Target Window
Instance Window
Creating Breakpoints
Before you run the Debugger, use the Breakpoint Editor in the Mapping Designer to create
breakpoint conditions in a mapping. You can create data or error breakpoints for
transformations or for global conditions. When you run the Debugger, the Informatica Server
pauses the Debugger when a breakpoint evaluates to true. This allows you to review and
modify transformation data, then continue the session.
Note: You cannot create breakpoints for mapplet Input and Output transformations.
A breakpoint can consist of an instance name, a breakpoint type, and a condition. When you
enter breakpoints, set breakpoint parameters in the following order:
1.
Select the instance name. Choose to create a global breakpoint or a breakpoint against a
single transformation within the mapping or mapplet.
2.
Select the breakpoint type. Choose to evaluate error or data conditions. You can also
choose the number of rows to skip for the breakpoint type.
3.
Enter the condition. Enter data conditions for global or transformation data breakpoints.
You cannot enter conditions for error breakpoints.
Data Condition
View Breakpoints
After you set the instance name, breakpoint type, and optional data condition, you can view
each parameter in the Breakpoints section of the Breakpoint Editor:
Creating Breakpoints
329
Breakpoint number. The Designer assigns a number based on the quantity of breakpoints
you create in the mapping. These numbers are sequential. If you remove a breakpoint, the
Designer renumbers them when you close and reopen the Breakpoint Editor.
Data Condition
Number of Breakpoint Rows to Skip
Data or Error Breakpoint Type
Sequential Breakpoint Number
Enable and Disable Breakpoint
330
Global instance. Select Global to configure a breakpoint condition that the Informatica
Server evaluates when it processes each transformation in the mapping.
If you want the Debugger to pause at every error, set the number of errors to zero.
If you want the Debugger to pause after a specified number of errors, set the number of
errors greater than zero. For example, if you set the number of errors to five, the Debugger
skips five errors, and pauses at every sixth error.
The Informatica Server encounters a null input value, and the port contains a user-defined
default value of ERROR ( ).
The Informatica Server encounters an output transformation error, and the port contains
the system default value of ERROR ( ). The following errors are considered transformation
errors:
The Informatica Server encounters a null input value or transformation output error, and
the port contains a user-defined default value of ABORT ( ).
Note: When the Informatica Server encounters a fatal error or an ABORT, the Debugger
breaks even if it has not reached the configured number of errors to skip.
For details on default values, see Using Default Values for Ports on page 265. For details on
ERROR and ABORT, see Functions in the Transformation Language Reference.
If you want the Debugger to pause at every row, set the number of rows to zero, and do not
set a data condition.
Creating Breakpoints
331
If you want the Debugger to pause after a specified number of rows passes through the
transformation, set the number of rows greater than zero. For example, if you set the
number of rows to three, the Debugger skips three rows of data and pauses every fourth
row.
If you want the Debugger to pause each time the data meets a data condition, enter the
data condition and set the number of rows set to zero.
If you want the Debugger to pause at designated intervals when a row meets the data
condition, you can enter the data condition and set the number of rows greater than zero.
For example, if you set the number of rows to three, the Debugger skips three breakpoint
rows that meet the condition and pauses at every fourth row.
Table 12-1 summarizes the different options you have when you set data breakpoint types and
conditions:
Table 12-1. Data Breakpoint Options
Number of
Rows
Data
Condition
Debugger Behavior
No
>0
No
Pauses after every n times the number of rows passes through the transformation.
Yes
>0
Yes
Pauses after every n times the row meets the data condition.
Use the following syntax when you check for null and default values, either globally or in a
transformation:
<port> <operator>
For a single transformation, you can enter multiple conditions within a single breakpoint if
you want the Debugger to pause when all the conditions are true. You can also enter multiple
breakpoints for a single transformation if you want the Debugger to pause when at least one
of the conditions is true.
332
The Debugger
pauses when either
condition is true.
Creating Breakpoints
333
Table 12-2 summarizes the condition parameters for transformation and global data
breakpoints:
Table 12-2. Condition Parameters for Data Breakpoints
Parameter
Transformation Options
Global Options
Port
Operator
ISNULL, ISDEFAULT.
Type
Not available.
Value
Not available.
Any port. When you choose <<ANY-PORT>>, you can enter a condition that the
Informatica Server evaluates for every port in the transformation. Use the ISNULL or
ISDEFAULT operator to test for null or error default values.
Note: For best results with port-to-port comparison, use ports that have the same datatype.
When you compare ports that have different datatypes, the Informatica Server converts the
datatype of the of the right-hand port to the datatype of the left-hand port before it compares
the ports, which might result in an invalid comparison.
334
Figure 12-6 shows the port list in the Edit Breakpoints dialog box where you choose a port or
port type for a data breakpoint condition:
Figure 12-6. Selecting a Port for Breakpoint Condition
Creating Breakpoints
335
The Informatica Server encounters an output transformation error, and the port contains a
user-defined default value of a constant value or constant expression.
The Informatica Server encounters a null input value, and the port contains a user-defined
default value of a constant value or constant expression.
For details on default values, see Using Default Values for Ports on page 265.
From within a mapping, you can open the Breakpoint Editor in one of the following
ways:
Press Alt+F9, or
Choose Mappings-Debugger-Edit Breakpoint, or
Right-click a transformation or mapplet and choose Edit Breakpoint.
Note: You can right-click any portion of an iconized transformation or mapplet. If the
transformation or mapplet is in normal view, right-click the title bar.
2.
3.
4.
5.
If you select a data breakpoint type, you can enter the condition. Enter multiple
conditions if you want the Informatica Server to evaluate multiple conditions.
6.
7.
Note: You can click OK after step 3 to create an unconditional data breakpoint. For details, see
336
Editing a Breakpoint
You might want to review breakpoints before or during a Debugger session. You can edit,
disable, or remove breakpoints within the Breakpoint Editor.
Use the following steps to edit breakpoints.
To edit breakpoints:
1.
From within a mapping, you can open the Breakpoint Editor in one of the following
ways:
Press Alt+F9, or
Choose Mappings-Debugger-Edit Breakpoint, or
Right-click over a transformation and choose Edit Breakpoint.
Note: You can right-click over any portion of an iconized transformation or mapplet. If
the transformation is in normal view, right-click over the title bar.
2.
mapping.
3.
4.
5.
Clear the checkbox by a breakpoint to disable it. You can enable the breakpoint again by
selecting the checkbox.
6.
Create a new breakpoint using the instructions above for creating breakpoints.
7.
8.
Click the Remove All button to remove all breakpoints for the selected instance. If you
want to remove all breakpoints in the mapping, select <<ALL INSTANCES>>.
Creating Breakpoints
337
Introduction. This page gives you an overview of the wizard. You do not configure any
properties on this page.
2.
Informatica Server and session type. Choose the Informatica Server to run the session.
You can also choose to run the Debugger against an existing non-reusable session, an
existing reusable session, or create a debug session instance. When you run the Debugger
against an existing session, the Informatica Server runs the session in debug mode. When
you create a debug session, you configure a subset of session properties within the
Debugger Wizard, such as source and target location.
3.
Session information. If you run the Debugger against an existing session, select the
session name. If you create a debug session, configure session parameters.
4.
Session configuration. If you create a debug session, set the session configuration.
5.
338
Informatica Server to run the session. The list displays all Informatica Servers registered in
the repository. Choose an Informatica Server that has debugging enabled.
Run the Debugger against an existing non-reusable session, an existing reusable session, or
create a debug session instance.
If you want to debug a mapping that uses session properties, such as incremental
aggregation, FTP, or pre- or post-session commands, you must run an existing session in
debug mode.
339
When you click Next, the Designer tests the connection to the Informatica Server and verifies
that debugging is enabled for the Informatica Server. If the connection fails, the Designer
prompts you to select another Informatica Server.
For details on connectivity, see Installation and Configuration Overview in the Installation
and Configuration Guide.
340
Figure 12-10 shows the Debugger Wizard page that allows you to select an existing valid
session:
Figure 12-10. Debugger Wizard Select Session
Reader/Writer. Configure readers and writers for the source and target transformations in
the mapping.
When you run a debug session, the Informatica Server uses default session properties for all
properties that you do not configure in the Debugger Wizard.
You can select source and target connections for each source and target instance in the debug
session on the Connections tab.
341
Figure 12-11 shows the Connections tab for sources and targets:
Figure 12-11. Debugger Wizard Source and Target Connections
You can choose the source reader type and target writer type for each source and target
instance in the debug session on the Reader/Writer tab.
Figure 12-12 shows the Reader/Writer tab for sources and targets:
Figure 12-12. Debugger Wizard Source Reader and Target Writer Properties
The Properties tab displays different source and target properties depending on the type of
source reader or target writer you select on the Reader/Writer tab. The Informatica Server uses
default values for all session properties you do not configure on the Properties tab.
342
Figure 12-13 shows the Properties tab for sources and targets:
Figure 12-13. Debugger Wizard Source and Target Properties
Table 12-3 describes the source and target properties for a debug session:
Table 12-3. Debug Session Source and Target Properties
Source/Target Type
Available Parameters
Relational Source
None
File Source
Relational Target
File Target
For details on session properties, see Session Properties Reference in the Workflow
Administration Guide.
Configuring the Debugger
343
344
Session Parameter
Description
Row Type
Insert, Delete, Update, or Driven. The default row type for session using an Update
Strategy is Update.
Default shared memory allocation is 12 MB. You might want to increase this to 24
MB if you run a session with large amounts of character data against an Informatica
Server configured to run in Unicode mode.
Parameter File
Enter the name and location of the parameter file if the mapping uses any mapping
parameters or variables. $PMSessionLogDir is the default location for the
parameter file.
Enter the database connection you want the Informatica Server to use for the
$Source variable.
Description
Enter the database connection you want the Informatica Server to use for the
$Target variable.
Choose to use constraint based loading. For details, see Working with Targets in
the Workflow Administration Guide.
Discard target data. You can choose to load or discard target data when you run the
Debugger. If you discard target data, the Informatica Server does not connect to the target.
Display target data. You can select the target instances you want to display in the Target
window while you run a debug session.
When you click Finish, if the mapping includes mapplets, the Debugger displays the mapplet
instance dialog box. Select the mapplets from this dialog box that you want to debug. To clear
an already selected mapplet, hold the Ctrl key and select the mapplet.
345
When you select a mapplet to debug, the Designer expands it to display the individual
transformations when the Debugger runs.
When you do not select a mapplet to debug, the Designer does not expand it in the
workspace. You cannot perform the following tasks for transformations in the mapplet:
346
Evaluate expressions.
Edit breakpoints.
Paused. The Informatica Server encounters a break and pauses the Debugger.
Note: More than one user can debug the same mapping at the same time. To do this, you must
configure different port numbers in the Tools-Options. For details on Debug options, see
Customizing Designer Default Options on page 5.
Initializing State
When you run the Debugger, the Designer connects to the Informatica Server, and the
Informatica Server initializes the session. During initialization, the Designer closes the
Navigator window and disables functions, such as switching to another tool, saving the
repository, or opening a folder. These functions remain disabled until the Debugger stops.
Running State
When initialization completes, the Debugger moves to the paused state and waits for your
command to continue processing. When you continue, the Debugger moves to the running
state. The Informatica Server transforms data and evaluates data against breakpoint
conditions. The Debugger remains in the running state until the Informatica Server
encounters a breakpoint, you issue a break command, or the session ends.
Paused State
The Debugger pauses when the Informatica Server encounters a break. The following break
conditions cause the Debugger to pause:
You instruct the Informatica Server to continue to an instance that does not have an
associated breakpoint.
The Informatica Server completes evaluation of all data. The Debugger tab displays a
message that the session is complete. When you continue the session, the Debugger clears
the Target and Transformation windows.
347
While the Debugger pauses, you can review and modify transformation output data. The
Debugger remains paused until you continue or end the session.
Debugger Tasks
You can perform multiple tasks when you run the Debugger. The type of information that
you monitor and the tasks that you perform can vary depending on the Debugger state. For
example, you can monitor logs in all three Debugger states, but you can only modify data
when the Debugger is in the paused state. You can perform the following types of tasks:
Monitor the session. While the Informatica Server runs the Debugger, the Mapping
Designer displays indicators and windows to help you monitor the session. For details on
monitoring the session, see Monitoring the Debugger on page 351.
Modify data and breakpoints. When the Debugger pauses, you can modify output data,
row indicators, and breakpoint conditions. For details on modifying data and breakpoints,
see Modifying Data on page 359.
Evaluate expressions. When the Debugger pauses, you can invoke the Expression Editor
and evaluate an expression against the current data in a transformation. The Debugger
returns the result of the expression in a message box. You can enter expressions using ports
in the selected transformation. You can also evaluate mapping variables. For details on
evaluating expressions, see Evaluating Expressions on page 361.
Issue commands to the Informatica Server. You can issue commands to the Informatica
Server, such as break, continue, or stop.
Table 12-5 describes the different tasks you can perform in each of the Debugger states:
Table 12-5. Debugger Tasks
348
Debugger
State
Task
Description
Monitor logs
Initializing
Running
Paused
Running
Paused
Monitor debug
indicators
Running
Paused
Access
Access
Task
Description
Monitor
transformation data
Paused
Modify data
Paused
Evaluate
expressions
Paused
Issue a manual
break command
Running
Edit breakpoints
Running
Paused
Refresh data
Paused
Continue processing
Paused
Initializing
Running
Paused
Status Request
Running
Paused
349
Discard persisted values. The Informatica Server does not save final values of generated
sequence numbers or mapping variables to the repository when you run a debug session or
you run a session in debug mode and discard target data.
Save persisted values. The Informatica Server saves final values of generated sequence
numbers and mapping variables to the repository when you run a session in debug mode
and do not discard target data. You can view the final value for Sequence Generator and
Normalizer transformations in the transformation properties.
Limitations
When the Debugger starts, the Designer disables the following functions:
350
During a session, the Mapping Designer displays windows and debug indicators that help you
monitor the session:
Debug indicators. Debug indicators on transformations help you follow breakpoints and
data flow.
Instance window. When the Debugger pauses, you can view transformation data and row
information in the Instance window.
Target window. View target data for each target in the mapping.
Output window. The Informatica Server writes messages to the following tabs in the
Output window.
Session Log tab. The session log displays in the Session Log tab.
While you monitor the Debugger, you might want to change the transformation output data
to see the effect on subsequent transformations or targets in the data flow. You might also
want to edit or add more breakpoint information to monitor the session more closely. For
details on modifying data, see Modifying Data on page 359.
Breakpoint indicator. After the Informatica Server completes initialization, it reads the
breakpoints in the mapping and displays a stop sign on each transformation to indicate
breakpoint conditions. You can view breakpoint indicators while the Debugger is in the
running or paused state. The Mapping Designer does not display global breakpoint
indicators.
Current source qualifier indicator. When the Informatica Server runs the Debugger, it
processes data from one source qualifier at a time. The Mapping Designer displays a
flashing arrow on the current source qualifier.
Current transformation indicator. The Debugger displays a solid yellow arrow that
indicates the transformation or mapplet that the Informatica Server was processing when it
encountered a break. This transformation is called the current transformation.
351
Debugger status. When you start the Debugger, the Mapping Designer displays a
Debugger icon by the tool bars that indicates the Debugger state. When the Debugger is
initializing or running, the icon rotates. When the Debugger is paused, the icon stops.
Current Transformation
Indicator
Breakpoint
Indicator
Debugger
Status
352
Port name. All ports display that are connected to another transformation or target.
Value. Displays the value for each port. If the port contains binary data, this column
displays <raw data>. If the port does not contain data, or if it is null, this column displays
<no data available>. For Router transformations, the values display for input ports and
output ports that meet the group condition. Output ports that do not meet the group
condition display <no data available> in the value column.
Length/Precision and scale. Displays the length/precision and scale of the port.
Null indicator. If a column contains a null value, the null indicator column is selected,
and the value displays <no data available>.
Row type. Insert, update, delete, reject, filtered, or not applicable. <<ROW TYPE>>
displays in the Port column, and the row type value displays in the Value column. The row
type does not display if it is not applicable, such as with Sequence Generator
transformations.
Port indicator. Displays one of the following indicators beside the port name:
Current row, default value. Indicates the value for the column in the current row is the
default value.
Previous row, default value. Indicates the value for the column in the previous row is the
default value.
Current row, modifiable. Indicates an output port in the current row that you can
modify.
Tip: Move the pointer across the port indicator to display tooltips about the indicator.
353
When the Instance window displays the current transformation or any transformation in
the pipeline before the current transformation, the current rows display. If you view a
transformation in the Instance window that appears in the pipeline after the current
instance, the previous rows display. An indicator also displays beside the port name to
designate the current or previous row.
For example, in the following mapping, FILTRANS is the current transformation, as
shown by the current transformation indicator. When you view the Instance window for
FILTRANS or for SQ_ORDERS, you see the current row. If you switch to EXPTRANS,
you see the previous row because the Informatica Server has not processed the current row
through EXPTRANS.
Current transformation indicator
Current and previous row indicators can also show when the Instance window displays the
default value. The Debugger uses the same rules to display the default value indicator in
the Instance window that it uses to evaluate default values for breakpoints. For details on
default values and breakpoints, see Using ISNULL and ISDEFAULT on page 336.
354
Continue to the next break. To continue to the next break, choose Continue from the
toolbar or from the Mapping-Debugger menu option. The Debugger continues running
until it encounters the next break.
Continue to the next instance. To continue to the next instance, choose Next Instance
from the toolbar or from the Mapping-Debugger menu option. The Debugger continues
running until it reaches the next transformation or until it encounters a break. If the
current instance has output going to more than one transformation instance, the Debugger
stops at the first instance it processes. If you did not select a mapplet to debug when you
completed the Debugger Wizard steps, the Debugger continues to the instance after the
mapplet.
You can step to connected transformations in the mapping, even if they do not have an
associated breakpoint. You cannot step to the following instances:
Sources
Targets
Unconnected transformations
You can view the following information for each row of target data:
Column name and value. Column name and value for each row in the cache.
If the mapping has more than one target, you can choose the target you want to display. Select
a target to view from the list in the Target window. The targets that display in the list are the
targets you selected in the Debugger Wizard. If you want to view a target that you did not
select in the wizard, you can choose Mappings-Debugger-View Target Data.
The Target window displays up to 1,000 rows. After it reaches 1,000, the Designer begins
overwriting data from the first row. You can clear the cache and the Target window by rightclicking in the Target window, and selecting Clear Data.
355
Session initialization
Debug errors
Debugger status
Session stops
When the bottom line in the Output window reads that the Server is Ready, you know the
Debugger is paused. The Informatica Server remains paused until you issue a command, such
as Continue, Step to Next, or Stop.
Note: If the Debugger does not start or if it abruptly stops, and the Informatica Server does
not write any messages to the Output window, look in the server log for more information.
Table 12-6 shows samples of debug log messages in the Output window:
Table 12-6. Sample Debug Log Messages
356
Debugger Action
The Debugger
completes.
If you want to save the log when the session completes, right-click inside the Debugger tab,
and choose Save Output As from the menu.
357
Table 12-7 describes the workflow and session names the Workflow Monitor displays for each
debug session type:
Table 12-7. Workflow Monitor Display Names for Debug Session Types
Session Type
Workflow Name
Session Name
DebugWorkflow_mappingname
DebugInst_sessionname
workflowname
sessionname
Debug session
DebugWorkflow_mappingname
DebugInst_DebugSession_mappingname
The Workflow Monitor displays the debug run mode for all debugger sessions and workflows.
Figure 12-20 shows debug mode sessions in the Task view of the Workflow Monitor:
Figure 12-20. Debugger Sessions in Workflow Monitor Task View
Run Mode
Note: You cannot use the Workflow Monitor to restart, abort, or stop a debug session, debug
358
Modifying Data
When the Debugger pauses, the current instance displays in the Instance window, and the
current instance indicator displays on the transformation in the mapping. You can make the
following modifications to the current instance when the Debugger pauses on a data
breakpoint:
Modify Output data. You can modify output data of the current transformation. When
you continue the session, the Informatica Server validates the data. It performs the same
validation it performs when it passes data from port to port in a regular session. For details
on datatype conversion, see Datatype Reference on page 487.
Change null data to not-null. Clear the null column, and enter a value in the value
column to change null data to not-null.
Change not-null to null. Select the null column to change not-null data to null. The
Designer prompts you to confirm that you want to make this change.
Modify row types. Modify Update Strategy, Filter, or Router transformation row types.
For Router transformations, you can change the row type to override the group condition
evaluation for user-defined groups. For example, if the group condition evaluates to false,
the rows are not passed through the output ports to the next transformation or target. The
Instance window displays <no data available>, and the row type is filtered. If you want to
pass the filtered row to the next transformation or target, you can change the row type to
Insert. Likewise, for a group that meets the group condition, you can change the row type
from insert to filtered.
Modifying Data
359
After you change data, you can refresh the cache before you continue the session. When you
issue the Refresh command, the Designer processes the request for the current
transformation, and you can see if the data you enter is valid. You can change the data again
before you continue the session.
Restrictions
You cannot change data for the following output ports:
360
Evaluating Expressions
When the Debugger pauses, you can use the Expression Editor to evaluate expressions using
mapping variables and ports in a selected transformation.
You can evaluate expressions in the following transformations:
Aggregator transformation
Expression transformation
Filter transformation
Rank transformation
Router transformation
When you create an expression, you can use references to ports within the transformation.
The Expression Editor does not display ports for other transformations in the mapping.
When you evaluate the expression, the Debugger returns the result of the expression in a
message box.
Figure 12-22 shows the expression and return value that evaluates the date difference between
two ports in a transformation:
Figure 12-22. Debugger Expression Evaluation
Evaluating Expressions
361
The Debugger uses the following process to determine the start value of a mapping variable:
1.
Parameter file. If you use a parameter file, the Debugger returns the value in the
parameter file.
2.
Repository. If you do not use a parameter file, the Debugger returns the value in the
repository.
3.
Initial value. If the repository does not have a stored value for the variable, the Debugger
returns the initial value configured in the mapping variable.
4.
Default value. If you do not configure an initial value for the mapping variable, the
Debugger returns the default value based on datatypes.
Figure 12-23 shows an expression and return value that evaluates the start value of a mapping
variable:
Figure 12-23. Debugger Expression Evaluation with Mapping Variables
To find the current value of a mapping variable, evaluate the mapping variable with one of the
variable functions, such as SetMaxVariable or SetCountVariable.
The Designer displays only the mapping variables associated with the transformations in the
mapping. To view mapping variables associated with a mapplet, select the transformation
within the expanded mapplet when the Debugger is running.
362
Figure 12-24 shows an expression and return value that uses the SetMaxVariable function
with a mapping variable:
Figure 12-24. Debugger Expression Evaluation with Mapping Variables
For details on mapping variables, see Mapping Parameters and Variables on page 305.
For details on variable functions, see Functions in the Transformation Language Reference.
While the Debugger pauses, select the transformation for which you want to evaluate an
expression.
2.
3.
Enter an expression in the Expression Editor that references ports in the selected
transformation.
4.
5.
For details on using the Expression Editor, see Transformations on page 251.
Evaluating Expressions
363
Open the mapping with breakpoint and configuration that you want to save.
2.
3.
4.
When you choose an existing .dcf file, the Designer appends the configuration
information to the file.
5.
If the file contains configuration information for the mapping, the Designer prompts you
to verify that you want to overwrite the configuration.
Make the .dcf file accessible to the Informatica Client machine where you want to load
configurations.
2.
3.
4.
364
If there are multiple configurations in the file, or if the Designer does not find a
matching mapping name, the Designer displays a list of mapping configurations in the
file.
5.
365
366
Chapter 13
Previewing Data
This chapter includes the following topics:
Overview, 368
367
Overview
You can preview source and target data in the Designer. You might want to preview source
data before you create a mapping. You might want to preview source or target data while you
are working with a mapping.
You can preview the following types of data:
Relational tables and views. You can preview relational sources and targets. For more
information, see Previewing Relational Data on page 369.
Fixed-width and delimited flat files. You can preview flat file sources and targets that do
not contain binary data. For more information, see Previewing Flat File Data on
page 371.
Before you create a mapping and run a workflow, you might want to verify that you extract
data from the correct source. You might also want to preview the columns in a source before
creating a mapping. For example, you have a relational source definition with 25 columns of
data. To determine which columns to use, you can preview your source data in the workspace.
You might want to preview target data before you truncate target tables or when you
implement an update strategy.
368
Source Analyzer. Preview source data in the Source Analyzer after you import the source.
Warehouse Designer. Preview target data in the Warehouse Designer after you import a
target.
Mapplet Designer. Preview source data in the Mapplet Designer while creating a mapplet.
Mapping Designer. Preview source and target data in the Mapping Designer while
creating a mapping.
You must be able to connect to the source or target database to preview relational data.
To preview relational source or target data:
1.
2.
Right-click the source or target definition in the workspace and choose Preview Data.
The Preview Data dialog box appears:
3.
4.
369
Note: The username must have read database permissions to view the object.
5.
6.
7.
Click Connect.
The contents of the table appear in the Preview Data dialog box:
370
8.
To change the number of rows you want to preview, enter a new number and click
Refresh.
9.
Click Close.
Source Analyzer. Preview flat file source data in the Source Analyzer after you import a
source.
Warehouse Designer. Preview flat file target data in the Warehouse Designer after you
import a target.
Mapplet Designer. Preview flat file source data in the Mapplet Designer while creating a
mapplet.
Mapping Designer. Preview flat file source and target data in the Mapping Designer while
creating a mapping.
You must have read permission on the file and the folder where the file is stored to preview
flat files.
To preview flat file source and target data:
1.
2.
Right-click the source or target definition in the workspace and choose Preview Data.
The Preview Data dialog box appears:
Browse Button
371
3.
4.
Locate and select the file you want to preview and click Open.
5.
6.
Enter the starting row number and the number of rows you want to preview.
The Preview Data dialog box can display up to 500 rows and up to 65,000 columns.
7.
Click Open.
The contents of the file appear in the Data Preview dialog box.
Note: The Preview Data dialog box displays shift characters display as periods . in shift-
372
To reset the number of rows you want to preview, enter a new number and click Refresh.
To reset the starting row number, enter a new number and click Refresh.
Tip: You can read rows after row 500. For example, you can start reading at row 501. If
you display 500 rows, the Preview Data dialog box displays rows 501 through 1,000.
9.
Click Close.
373
374
Chapter 14
Comparing Objects
This chapter includes the following topics:
Overview, 376
375
Overview
The Designer allows you to compare two repository objects of the same type to identify
differences between the objects. For example, you may want to use a custom target definition
in a mapping, but you have two target definitions that are similar. You can compare the target
definitions to see which one contains the columns you need. When you compare two objects,
the Designer displays their attributes side-by-side.
You can compare the following types of objects:
Sources. You can compare two sources, two source shortcuts, or a source with a source
shortcut. For more information, see Comparing Sources on page 379.
Targets. You can compare two targets, two target shortcuts, or a target with a target
shortcut. For more information, see Comparing Targets on page 380.
Mappings and Mapplets. You can compare two mappings, two mapping shortcuts, or a
mapping with a mapping shortcut. You can also compare two mapplets, two mapplet
shortcuts, or a mapplet with a mapplet shortcut. For more information, see Comparing
Mappings and Mapplets on page 384.
Instances. Within mappings and mapplets, you can compare two source instances, two
target instances, or two transformations. Within mappings, you can also compare two
mapplet instances. For more information, see Comparing Instances in Mappings and
Mapplets on page 392.
Folders. You can compare two folders. For more information, see Working with Folders
in the Repository Guide.
You cannot compare repositories or versions. Further, you cannot compare objects of different
types. For example, you cannot compare a source definition with a target definition.
You can compare objects under the following circumstances:
When both objects exist in open folders. You can compare an object in any open folder
with another object of the same type in any open folder. The folders can be in different
repositories.
When importing an object. When you import an object into a folder that already contains
an object with the same name, the Designer allows you to compare the objects to
determine whether you want to overwrite or use the existing object.
When copying an object. If you copy an object into a folder that already contains an
object of that type with the same name, the Designer allows you to compare the two
objects to determine whether you want to overwrite or use the existing object.
The Designer allows you to compare objects across folders and repositories. To do this, you
must have both folders open.
376
To compare objects, you must have read permission on each folder that contains the objects
you want to compare.
When you compare objects, the View Sources dialog box displays the results. This dialog box
contains different tabs for different types of objects.
Figure 14-1 shows a comparison of two relational sources:
Figure 14-1. Result of Comparing Two Sources
Differences
Between
Objects
Divider
Each tab in this dialog box contains two columns. The left column displays the attributes in
the first object you compare, and the right column displays the attributes in the second
object. A divider separates the two columns. Slide the divider left or right to resize the
columns.
The Designer highlights differences between the objects. Ports or columns common to both
objects appear in the same row.
Note: You cannot change the data displayed in the results dialog box.
Overview
377
Source Analyzer. You can compare two sources, two source shortcuts, or a source with a
source shortcut.
Warehouse Designer. You can compare two targets, two target shortcuts, or a target with a
target shortcut.
Transformation Developer. You can compare two reusable transformations, two reusable
transformation shortcuts, or a reusable transformation with a reusable transformation
shortcut.
Open the folders that contain the objects you wish to compare.
2.
3.
If you select one or two objects in the workspace, this dialog box displays their names. If
you do not select any object in the workspace, the fields in this dialog box are blank.
4.
If a field in this dialog box is blank or displays the name of an object you do not want to
compare, click Browse to select an object.
The dialog box now lists the two objects to compare.
5.
378
Click Compare.
A dialog box like the one in Figure 14-1 on page 377 displays the results.
Comparing Sources
When you compare two sources, the View Sources dialog box displays the results.
Figure 14-2 shows a comparison of two relational sources:
Figure 14-2. Result of Comparing Two Sources
Differences
Between
Objects
The tabs in this dialog box vary by source type. If you compare two relational sources, the
View Sources dialog box contains Table, Columns, and Metadata Extensions tabs. If you
compare a flat file source with a flat file shortcut, the View Sources dialog box contains Table,
Columns, Flat File, Properties, Shortcut, and Metadata Extensions tabs.
Table 14-1 describes the tabs in the View Sources dialog box after comparing two sources:
Table 14-1. View Sources Dialog Box Tabs After Comparing Two Sources
Tab
Source Type
Description
Table
All
Displays the table name, business name, owner name, description, database
type, and code page for each source.
Columns
All
Displays the columns in each source. Each row displays information such as
column name, datatype, precision, and scale. If a column exists in both sources,
it appears in the same row.
379
Table 14-1. View Sources Dialog Box Tabs After Comparing Two Sources
Tab
Source Type
Description
Flat File
Flat file,
COBOL file
Displays attributes such as file type, number of rows skipped, and code page.
For delimited files this tab also displays delimiters, how consecutive delimiters
are treated, optional quotes, escape character, and if the Designer removes
escape characters.
For fixed-width files, this tab also displays how the Informatica Server reads end
of column characters, null character type, null character, how the Informatica
Server reads repeat null characters, number of bytes to skip between rows, and
if the Informatica Server strips trailing blanks.
Properties
Flat file,
XML file
Displays the attributes and values for each source. For flat files, this tab displays
attributes such as date/time format, thousands separator, decimal separator, and
owner name. For XML files, this tab displays the owner name. If an attribute
exists in both sources, it appears in the same row.
Shortcut
All shortcuts
Metadata
Extensions
All
Displays the metadata extensions in each source. Each row displays the
metadata extension domain, name, datatype, value, precision, and whether the
metadata extension is reusable or non-reusable. If a metadata extension exists
in both sources, it appears in the same row.
Comparing Targets
When you compare two targets, the View Targets dialog box displays the results.
Figure 14-3 shows a comparison of two XML targets:
Figure 14-3. Result of Comparing Two Targets
Differences
Between
Targets
380
The tabs in this dialog box vary by target type. If you compare two relational targets, the View
Targets dialog box contains Table, Columns, Keywords, Indexes, and Metadata Extensions
tabs. If you compare an XML file target with an XML target shortcut, the View Targets dialog
box contains Table, Columns, Keywords, Properties, Shortcut, and Metadata Extensions tabs.
Table 14-2 describes the tabs in the View Targets dialog box after comparing two targets:
Table 14-2. View Targets Dialog Box Tabs After Comparing Two Targets
Tab
Target Type
Description
Table
All
Columns
All
Displays the columns in each target. Each row displays information such as
column name, datatype, precision, and scale. For foreign key columns, this tab
also displays the primary table and column. If a column exists in both targets, it
appears in the same row.
Key Words
All
Indexes
Relational
Displays the indexes associated with each target. For each index, this tab
displays the columns in the index, the index description, and if the index is
unique.
Flat File
Flat file
Displays attributes such as file type, number of rows skipped, and code page.
For delimited files this tab also displays delimiters, how consecutive delimiters
are treated, optional quotes, escape character, and if the Designer removes
escape characters.
For fixed-width files, this tab also displays how the Informatica Server reads end
of column characters, null character type, null character, repeat null characters,
number of bytes to skip between rows, and if the Informatica Server strips trailing
blanks.
Properties
Flat file,
XML file
Displays the attributes for each target. For flat files, this tab displays attributes
such as date/time format, thousands separator, and decimal separator. For XML
files, this tab displays attributes such as duplicate group row handling and DTD/
Schema reference. If an attribute exists in both targets, it appears in the same
row.
Shortcut
All shortcuts
Metadata
Extensions
All
Displays the metadata extensions in each target. Each row displays the
metadata extension domain, name, datatype, value, precision, and whether the
metadata extension is reusable or non-reusable. If a metadata extension exists
in both targets, it appears in the same row.
381
Differences
Between
Transformations
The tabs in this dialog box vary by transformation type. If you compare two Aggregator
transformations, the View Transformations dialog box contains Transformation, Ports,
Properties, and Metadata Extensions tabs. If you compare a Router transformation to a
Router transformation shortcut, the View Transformations dialog box contains
Transformation, Ports, Properties, Groups, Shortcut, and Metadata Extensions tabs.
Table 14-3 describes the tabs in the View Transformations dialog box after comparing two
transformations:
Table 14-3. View Transformations Dialog Box Tabs After Comparing Two Transformations
382
Tab
Transformation
Type
Description
Transformation
All
Ports
All
Table 14-3. View Transformations Dialog Box Tabs After Comparing Two Transformations
Tab
Transformation
Type
Properties
All
Displays the attributes and values specific to the transformation type. For
example, for Filter transformations, this tab displays the filter condition and
tracing level.
For Joiner transformations, this tab also displays the join condition.
Groups
Router
Displays the group names and filter conditions for each transformation.
Initialization
Properties
External Procedure,
Advanced External
Procedure
Normalizer
Normalizer
Shortcut
All shortcuts
Metadata
Extensions
All
Description
383
Mapping Designer. You can compare two mappings, two mapping shortcuts, or a
mapping with a mapping shortcut. You can also compare instances within a mapping.
Mapplet Designer. You can compare two mapplets, two mapplet shortcuts, or a mapplet
with a mapplet shortcut. You can also compare instances within a mapplet.
When you compare two mappings or two mapplets, a dialog box displays the results. The tabs
on this dialog box display the following information:
384
Summary information. You can view a summary of the differences between each mapping
or mapplet. You can also save this information to a text file. For more information, see
Viewing Summary Information on page 386.
General information. You can compare general information about each object such as
name, description, validity, and shortcut details (if applicable). For more information, see
Comparing General Information on page 387.
Instances. You can compare the source, target, and transformation instances in each
mapping or mapplet. You can select an instance in each object and compare the instances
in detail. For more information, see Comparing Instances in Mappings and Mapplets on
page 392. You can also compare the dependencies, or connections, between each object.
For more information, see Comparing Dependencies in Mappings and Mapplets on
page 396.
Parameters and variables. You can compare the parameters and variables in each object.
For more information, see Comparing Parameters and Variables on page 389.
Target load orders. You can compare the target load order in each mapping. The Designer
does not display this tab when you compare mapplets. For more information, see
Comparing Target Load Orders on page 390.
Metadata extensions. You can compare the metadata extensions in each mapping or
mapplet. For more information, see Comparing Metadata Extensions on page 391.
Differences
Between
Mappings
Open the folders that contain the objects you wish to compare.
2.
3.
4.
If one of the fields in this dialog box is blank or displays the name of an object you do not
want to compare, click Browse to select an object.
The dialog box now lists the two mappings or mapplets to compare.
Comparing Mappings and Mapplets
385
5.
Click Compare.
A dialog box like the one in Figure 14-5 on page 385 displays the results.
This tab presents a summary of the differences between the mappings or mapplets. It lists
differences in instances, parameters and variables, target load orders, and metadata extensions.
You can save this information to a plain text or rich text file. To do this, click Save to file.
386
Differences
Between
Mappings
You can compare the following items for each mapping or mapplet:
Name
Repository
Folder
Description
Repository
Folder
Original name
387
Comparing Instances
To compare the instances in each mapping or mapplet, click the Instances tab.
Figure 14-8 shows the Instances tab:
Figure 14-8. Compare Mappings Instances Tab
The mappings
contain
different target
instances.
The columns on this tab show the source and transformation instances in each mapping or
mapplet. For mappings, this tab also shows the target instances in each mapping.
You can compare instances of the same type in detail. For example, if the mappings you
compare contain instances with the same name, you can compare the instances to see if they
differ. To do this, select an instance in each mapping or mapplet and click Compare Instances.
For more information, see Comparing Instances in Mappings and Mapplets on page 392.
You can also compare the incoming and outgoing dependencies between instances of the same
type. To do this, select an instance in each mapping or mapplet and click Compare
Dependencies. For more information, see Comparing Dependencies in Mappings and
Mapplets on page 396.
388
Differences
Between
Mappings
This tab lists the parameters and variables in each mapping. For each parameter or variable,
you can view the following information:
Name
Datatype
Precision
Scale
Default value
Description
Parameters or variables that are common to both mappings appear in the same row.
For more information about parameters and variables, see Mapping Parameters and
Variables on page 305.
389
Differences
Between Target
Load Groups
You can view the target load groups for each mapping. The Designer lists the source qualifiers
in each mapping from first to last. The targets that receive data from each source qualifier
appear below the source qualifier.
For more information about target load order, see Setting the Target Load Order on
page 244.
390
Differences
Between
Metadata
Extensions
You can view the metadata extensions associated with each mapping or mapplet. For each
metadata extension, the Designer lists the domain, name, datatype, value, precision, and
whether the extension is reusable.
For details on metadata extensions, see Working with Metadata Extensions on page 30.
391
Source instances
Transformation instances
Target instances
The Designer allows you to compare instances of the same type. Therefore, you can compare
two source instances, two transformation instances, two target instances, or two mapplet
instances. You cannot compare instances of different types. For example, you cannot compare
a source instance with a transformation instance.
When you compare two instances, the Designer determines whether differences exist between
the instances. If the instances are identical, the Designer displays a message saying the
instances are identical. If the instances differ, the Designer displays the instances in a dialog
box like the one in Figure 14-12:
Figure 14-12. Result of Comparing Two Different Transformation Instances
Differences
Between
Instances
Tabs on this dialog box vary depending on the type of instance you compare.
392
Table 14-4 shows the tabs listed when you compare two source instances, two target instances,
or two mapplet instances:
Table 14-4. View Sources, Targets, or Mapplets Dialog Box Tabs After Comparing Instances
Tab
Description
Transformation
Displays the instance name, type, and description, plus the table name and description for each
instance.
Ports
Displays the ports in each instance. Each row displays information such as port name, datatype,
and precision. If a port exists in both instances, it appears in the same row.
Properties
Shortcut
Metadata
Extensions
Displays the metadata extensions in each instance. Each row displays the metadata extension
domain, name, datatype, value, precision, and whether the metadata extension is reusable or nonreusable. If a metadata extension exists in both instances, it appears in the same row.
Table 14-5 shows the tabs listed when you compare two source qualifiers. The tabs that
display depend on the source type. For example, the Normalizer tab displays only if one of the
sources is a COBOL source.
Table 14-5. View Transformations Dialog Box Tabs After Comparing Two Source Qualifiers
Tab
Source Type
Description
Transformation
All
Displays the source qualifier name, type, and description, plus the table
name and description for each source qualifier.
Ports
All
Displays the ports in each source qualifier. Each row displays information
such as port name, datatype, and precision. If a port exists in both source
qualifiers, it appears in the same row.
Properties
All
Sources
Normalizer
COBOL
Shortcut
All shortcuts
Metadata
Extensions
All
If you compare transformation instances, you see the tabs listed in Table 14-3, View
Transformations Dialog Box Tabs After Comparing Two Transformations on page 382. For
more information on comparing transformations, see Comparing Reusable Transformations
on page 382.
Comparing Instances in Mappings and Mapplets
393
The Instance 1 field displays the name of the object you selected.
2.
Select another object of the same type from the Instance 2 list.
3.
Click Compare.
A dialog box like the one in Figure 14-12 on page 392 displays the results.
394
The columns on this tab show the source, transformation, and target instances in each
mapping or mapplet. Instances with the same name appear on the same line.
To compare the instances in detail, select an instance in each mapping or mapplet and click
Compare Instances. When you do this, a dialog box like the one in Figure 14-12 on page 392
displays the results. This is the same dialog box that displays when you compare two instances
within a mapping or mapplet.
395
Incoming dependencies. The source or transformation instances linked to the input ports
of an instance.
Outgoing dependencies. The target or transformation instances linked to the output ports
of an instance.
When you compare incoming or outgoing dependencies, you can view the instance name,
incoming or outgoing dependencies, plus the ports that connect the instance to the
dependency. For details, see Comparing Incoming Dependencies on page 397 and
Comparing Outgoing Dependencies on page 398.
Figure 14-14 shows the incoming and outgoing dependencies for Router transformation
rtr_Department:
Figure 14-14. Incoming and Outgoing Dependencies for a Router Transformation
Incoming
Outgoing
Dependencies for
Dependencies for
rtr_Department
rtr_Department
When you compare dependencies in a mapping or mapplet, you must compare the mappings
or mapplets, click the Instances tab on the results dialog box, and then select an instance to
examine. The Designer displays the mapping name, name of the instance, and the incoming
or outgoing dependencies for that instance. For details on comparing mappings or mapplets,
see Comparing Mappings and Mapplets on page 384.
396
Compare
Dependencies
Button
Instance name
Incoming dependencies
You can also compare the individual ports that connect an incoming dependency to each
instance. To compare ports, select an incoming dependency for each instance. The ports
display in the Results area. If a port exists in both instances, it appears on the same line.
397
Incoming
dependencies
for selected
instances
Output ports in
incoming dependency
XMLDSQ_
EMPLOYEES
Output ports in
incoming dependency
XMLDSQ_
EMPLOYEES
398
Instance name
Outgoing dependencies
You can also compare the individual ports that connect each instance to an outgoing
dependency. To compare ports, select an outgoing dependency for each instance. The ports
display in the Results area. If a port exists in both instances, it appears on the same line.
Figure 14-17 shows the Outgoing Dependencies tab:
Figure 14-17. Outgoing Dependencies
Outgoing
dependencies
for selected
instances
Output ports in
instance XMLDSQ_
EMPLOYEES
Input ports in
outgoing dependency
rtr_Department
Output ports in
instance XMLDSQ_
EMPLOYEES
Figure 14-17 shows a comparison of two mappings. In the first mapping, XML Source
Qualifier XMLDSQ_EMPLOYEES connects to outgoing dependencies exp_TotalSalary and
rtr_Department. In the second mapping, XMLDSQ_EMPLOYEES connects to outgoing
dependencies exp_TotalSalary and ALLDEPT. If you select outgoing dependency
rtr_Department in the first mapping, the Results section on the left displays the ports
connecting XMLDSQ_EMPLOYEES with this dependency. If you select ALLDEPT in the
second mapping, the Results section on the right displays the ports connecting
XMLDSQ_EMPLOYEES with this dependency.
399
400
Chapter 15
Managing Business
Components
This chapter contains information on the following:
Overview, 402
401
Overview
Business components allow you to organize, group, and display sources and mapplets in a
single location in your repository folder. For example, you can create groups of source tables
that you call Purchase Orders and Payment Vouchers. You can then organize the appropriate
source definitions into logical groups and add descriptive names for them.
Business components let you access data from all operational systems within your
organization through source and mapplet groupings representing business entities. You can
think of business components as tools that let you view your sources and mapplets in a
meaningful way using hierarchies and directories.
A business component is a reference to any of the following objects:
Source
Mapplet
Shortcut to a source
Shortcut to a mapplet
A business component node appears in each repository folder in the Repository Manager and
the Designer. You can add an unlimited number of directories to the business component
tree.
402
Business component
directories
You create business components in the Designer. The Designer creates a business component
when you drag any source or mapplet into any directory of the business component tree. You
can use the same source or mapplet multiple times in the business component tree. Since
business components are references to another object, you can edit the object from its original
location or from the business components directory.
Dragging and dropping a single business component or an entire directory within the same
business component tree moves the business component or directory. To create a copy of a
business component, hold down the Ctrl key while dragging and dropping.
If you try to drag and drop a single business component or an entire directory to or from a
different repository folder, repository folder version, or repository, the Designer prompts you
to create a copy of the original object in the destination location. Copies of objects from other
repository folders do not inherit changes you make to the original object.
Overview
403
Drag a shortcut from the repository folder into any directory of the business component
tree.
Drag an object from a shared folder to a business component directory. You can create
shortcuts to sources and mapplets that reside in shared folders. If you try to drag an object
from a non-shared folder, the Designer creates a copy of the object instead.
If the business component tree is in a shared folder, all directories in the business component
tree are shared.
For details on shortcut behavior, see Local and Global Shortcuts in the Repository Guide.
Permissions
Business components are subject to the same permissions granted to the folder. For details, see
Working with Folders in the Repository Guide.
404
repositories. For details, see Copying a Directory or Business Component on page 409.
To create a business components directory:
1.
2.
Note: To create a business components directory under another directory, highlight the
4.
Required/Optional
Description
Name
Required
Comment
Optional
Click OK.
The directory appears in the Navigator.
405
2.
Open the repository folder in which you want to create a business component.
3.
From the Navigator in this repository folder, select the source or mapplet to which you
want to create a reference.
4.
Drag and drop the source or mapplet into the desired directory in the business
component tree.
You can use the same source or mapplet more than once in the business component tree.
406
2.
3.
4.
407
2.
3.
Click Yes to delete the directory and all business components and subdirectories in it.
Tip: You can also delete a directory by selecting it in the Navigator and pressing the Delete
key.
To delete a business component:
1.
2.
3.
408
In the Designer, connect to the source database and open the folder from which you want
to copy the directory or business component.
Note: You must open the folder before copying the directory or business component.
2.
3.
4.
If you want to copy the object to a different repository, connect to the target repository.
5.
If you want to copy the object to a different folder, open the destination folder.
6.
In the Navigator, select the business components directory location where you want to
paste the directory or business component.
7.
409
410
Chapter 16
Overview, 412
Tips, 428
411
Overview
The Warehouse Designer provides an interface to let you create and edit cubes and
dimensions.
Multi-dimensional metadata refers to the logical organization of data used for analysis in
online analytical processing (OLAP) applications. This logical organization is generally
specialized for the most efficient data representation and access by end users of the OLAP
application. The following sections provide an overview of the concepts relevant to the multidimensional features of PowerCenter and PowerMart.
412
Definition
Aggregate
Pre-stored summary of data or grouping of detailed data which satisfies a specific business
rule. Example rules: sum, min, count, or combinations of them.
Level
Cube
A set of related factual measures, aggregates, and dimensions for a specific dimensional
analysis problem. Example: regional product sales.
Dimension
A set of level properties that describe a specific aspect of a business, used for analyzing
the factual measures of one or more cubes which use that dimension. Examples:
geography, time, customer and product.
Drilling
Drilling is the term used for navigating through a cube. This navigation is usually performed
to access a summary level of information or to provide more detailed properties of a
dimension in a hierarchy.
Fact
A fact is a time variant measurement of quantitative data in a cube; for example, units sold,
sales dollars, or total profit.
Hierarchy
The hierarchy concept refers to the level of granularity represented by the data in a
particular dimension of a cube. For example, state, county, district, and city represent
different granularity in the hierarchy of the geography dimension.
Measure
The means for representing quantitative data in facts or aggregates. Example measures
are total sales or units sold per year.
Normalization
A process used for reducing redundancies and removing anomalies in related dimension
tables in various hierarchies.
Redundancy
The term used for referring to duplication of data among related tables for the sake of
improving the speed of query processing.
Star Schema
SnowFlake Schema
Overview
413
Creating a Dimension
Before you can create a cube, you need to create dimensions. Complete each of the following
steps to create a dimension:
1.
2.
3.
4.
2.
3.
Description. Enter a description for the dimension. This description appears in the
Repository Manager.
Database type. The database type of a dimension must match the database type of the
cube.
Note: You cannot change the database type after you create the dimension.
4.
414
Click OK.
2.
Creating a Dimension
415
4.
Select a source table from which you want to copy columns to the level.
The columns display in the Source Fields section.
Source Table
Source
Columns
416
6.
7.
Click the Copy Columns button to add source columns to the level.
8.
Click the Add Columns button to add a new column to the level.
9.
Creating a Dimension
417
2.
3.
418
From the Dimension Editor, drill down to view the levels in the dimension.
2.
Drag the level you want to define as the root level in the hierarchy.
4.
Click OK.
A window displays a listing of all the objects affected by the new level.
5.
Click OK.
The new level displays under the hierarchy.
Creating a Dimension
419
Creating a Cube
After you create dimensions, you can create a cube.
To create a cube:
1.
2.
3.
420
Database type. The database type for the cube must match the database type for the
dimensions in the cube.
Click Next.
4.
5.
Click Next.
6.
You can copy columns from source tables or add new columns.
Measure names must be unique within a fact. Level names must be unique within each
cube.
Creating a Cube
421
7.
8.
Click Finish.
The Designer adds the cube and fact tables to the workspace.
Next, you need to generate the SQL for the tables.
422
Editing a Cube
You can edit a cube in the Warehouse Designer.
You cannot edit a fact table or dimension table directly. If you want to change a column in a
fact table or dimension table, you need to edit the cube or dimension.
To edit a cube:
1.
2.
You can modify any settings in the dimension except the following:
3.
Database type
Click Close.
Editing a Cube
423
Editing a Dimension
You can edit dimensions in the Warehouse Designer. You cannot, however, change the
database type once you create a dimension.
When you edit a dimension, the Designer marks all mappings with the dimension invalid.
To edit a dimension:
1.
2.
You can modify any settings in the dimension except the following:
3.
424
Database type
Click Close.
2.
3.
Press Delete.
A message prompts you to verify if you want to delete the cube or dimension.
4.
425
2.
3.
4.
426
2.
3.
427
Tips
Consider the following tips when working with cubes and dimensions:
428
If you want to copy a cube, you need to copy the folder that stores the cube.
To view the levels of a cube or dimension, you can either edit the cube or dimension or use
the Navigator in the Repository Manager.
You cannot delete cubes and dimensions from the Warehouse Designer workspace.
If you want to change a column in a fact table or dimension table, you need to edit the
cube or dimension. You cannot edit a fact table or dimension table directly.
If you delete a level, the Designer deletes the associated level instances in hierarchies. The
Designer also removes the level instance from any associated cubes.
A primary key is generated for each fact and dimension table. The format is
GK_TABLE_NAME.
A foreign key is added to the appropriate fact table when you associate a dimension level
instance to the fact table.
You can drag and drop a cube to the workspace and then edit the cube and cardinality (by
double-clicking the links).
You cannot delete or create a link between fact and dimension tables in the workspace. You
can only delete and create links in the Cube and Dimension Editors. You can create a
graph in the hierarchy.
Chapter 17
429
Dimension
Table
Primary key
Fact Table
Foreign key
Foreign key
Foreign key
Foreign key
Dimension
Table
Primary key
Dimension
Table
Primary key
When you implement a star schema, you decide how to handle updates to your fact and
dimension tables. Fact tables change regularly as new information collects. Do you need to
keep all existing data in your fact table, or do you want only the most recent version or
snapshot?
If you do not need any historical fact information, you can drop or truncate the existing fact
table before using a new session in a workflow. To keep historical information in a fact table,
you usually append the latest snapshot to the existing table, using a flag such as a load date or
session number to identify the most recent snapshot.
Although dimension tables are typically static lists, most dimension tables do change over
time. For example, you might need to update an inventory dimension once a month to reflect
new or changed part numbers. Since these changes are smaller in magnitude compared to
changes in fact tables, these dimensions are known as slowly growing or slowly changing
dimensions.
Slowly growing dimensions are dimension tables that have slowing increasing dimension data,
without updates to existing dimensions. You maintain slowly growing dimensions by
appending new data to the existing table.
Slowly changing dimensions are dimension tables that have slowly increasing dimension data, as
well as updates to existing dimensions. When updating existing dimensions, you decide
430
whether to keep all historical dimension data, no historical data, or just the current and
previous versions of dimension data.
When you do not need historical information in a slowly growing or slowly changing
dimension table, you can drop or truncate the existing table before using a new session in a
workflow. However, in some cases, inserting new dimensions and updating existing
dimensions can be more efficient than reloading the entire table.
When you need historical information in a dimension table, you decide how to differentiate
between current and historical data in the target:
To keep a partial history, you might keep a current version and a previous version in a
single row. You could also enter a timestamp to indicate the most recent update.
431
Getting Started Wizard. Creates mappings to load static fact and dimension tables, as well
as slowly growing dimension tables.
After using a mapping wizard, you can edit the generated mapping to further customize it.
Simple Pass Through. Loads a static fact or dimension table by inserting all rows. Use this
mapping when you want to drop all existing data from your table before loading new data.
Slowly Growing Target. Loads a slowly growing fact or dimension table by inserting new
rows. Use this mapping to load new data when existing data does not require updates.
432
History
Data Handling
Static Fact or
Dimension
None
Slowly Growing
Fact or Dimension
Full
Type 1 Dimension mapping. Loads a slowly changing dimension table by inserting new
dimensions and overwriting existing dimensions. Use this mapping when you do not want
a history of previous dimension data.
Type 3 Dimension mapping. Loads a slowly changing dimension table by inserting new
dimensions and updating values in existing dimensions. Use this mapping when you want
to keep the current and previous dimension values in your dimension table.
Target Table
History
Data Handling
Type 1 Dimension
Slowly Changing
Dimension
None
Type 2 Dimension/
Version Data
Slowly Changing
Dimension
Full
Type 2 Dimension/
Flag Current
Slowly Changing
Dimension
Full
Type 2 Dimension/
Effective Date Range
Slowly Changing
Dimension
Full
Type 3 Dimension
Slowly Changing
Dimension
Partial
433
Flat file
Relational
Application
You cannot use COBOL or XML sources with the mapping wizards.
When you select a source for a mapping, the mapping wizards display all available sources by
source name. The Designer can optionally display sources and target definitions by business
name, rather than source and target name. Even when this option is selected, mapping
wizards display sources by source name.
The mapping wizards also perform the following based on the selected source:
434
Use the source name to name the source qualifier as follows: SQ_SourceName for file or
relational sources, or ASQ_SourceName for Application sources.
Figure 17-2 shows a mapping the Getting Started Wizard creates when you select the Simple
Pass Through option:
Figure 17-2. Simple Pass Through Mapping
A single data flow passes from a source definition, through a source qualifier and an
Expression transformation, to the target. By default, the Expression transformation passes
data directly to the target without changes.
435
Transformation
Type
SQ_SourceName
Source Qualifier or
Application Source
Qualifier
Selects all rows from the source you choose in the Mapping
Wizard.
EXP_TransformData
Expression
T_TargetName
Target Definition
Description
2.
Enter a mapping name and select Simple Pass Through, and click Next.
The naming convention for mapping names is m_MappingName.
3.
436
All available source definitions appear in the Select Source Table list. This list can include
shortcuts, flat file, relational, and Application sources.
4.
Enter a name for the mapping target table and click Finish.
The new mapping appears in the workspace. The naming convention for target
definitions is T_TARGET_NAME.
You can edit the mapping as necessary.
5.
437
For details on truncating target tables, see Working with Targets in the Workflow
Administration Guide.
For details on creating pre-session shell commands, see Working with Sessions in the
Workflow Administration Guide.
438
Handling Keys
When you use the Slowly Growing Target option, the Designer creates an additional column
in the mapping target, PM_PRIMARYKEY. In this column, the Informatica Server generates
a primary key for each row written to the target, incrementing new key values by 1.
Compares logical key columns in the source against corresponding columns in the target
lookup table
439
Figure 17-3 shows a mapping the Getting Started Wizard creates when you select the Slowly
Growing Target option:
Figure 17-3. Slowly Growing Target Mapping
The Slowly Growing Target mapping uses a Lookup and an Expression transformation to
compare source data against existing target data. When you step through the Getting Started
Wizard you enter the logical key columns in the source to compare against the existing target.
When the Expression transformation detects source rows without matching key columns in
the target, it flags the row new.
A Filter transformation passes only new rows to the Update Strategy transformation. The
Update Strategy transformation marks new rows for insert and a Sequence Generator creates a
new primary key value for each row written to the target.
Transformation
Type
SQ_SourceName
Source Qualifier or
Application Source
Qualifier
Selects all rows from the source you choose in the Mapping
Wizard.
LKP_GetData
Lookup
EXP_DetectChanges
Expression
Description
IIF(ISNULL(PM_PRIMARYKEY),TRUE,FALSE)
440
FIL_InsertNewRecord
Filter
Uses the following filter condition to filter out any rows from
EXP_DetectChanges that are not marked new (TRUE): NewFlag.
Passes new rows to UPD_ForceInserts.
UPD_ForceInserts
Update Strategy
Table 17-4. Function of Each Transformation in the Slowly Growing Target Mapping
Transformation
Name
Transformation
Type
SEQ_GenerateKeys
Sequence Generator
T_TargetName
Target Definition
Instance of the target definition for new rows to be inserted into the
target.
Description
2.
Enter a mapping name and select Slowly Growing Target, and click Next.
The naming convention for mapping names is m_MappingName.
3.
441
All available source definitions appear in the Select Source Table list. This list includes
shortcuts, flat file, relational, and Application sources.
4.
5.
Select the column or columns from the Target Table Fields list that you want the
Informatica Server to use to look up data in the target table. Click Add.
The wizard adds selected columns to the Logical Key Fields list.
Tip: The columns you select should be a key column in the source.
When you run a workflow containing the session, the Informatica Server performs a
lookup on existing target data. The Informatica Server returns target data when Logical
Key Fields columns match corresponding target columns.
To remove a column from Logical Key Fields, select the column and click Remove.
442
Note: The Fields to Compare for Changes field is disabled for the Slowly Growing Targets
mapping.
6.
Click Finish.
The new mapping appears in the workspace. You can edit the mapping as necessary.
7.
In the session properties, click the General Options settings on the Properties tab. Set
Treat Source Rows As to Data Driven.
2.
In the session properties, click the Properties settings on the Targets tab. To ensure the
Informatica Server loads rows to the target properly, select Insert for each relational
target.
443
Handling Keys
When you use the Type 1 Dimension option, the Designer creates an additional column in
the mapping target, PM_PRIMARYKEY. In this column, the Informatica Server generates a
primary key for each row written to the target, incrementing new key values by 1.
444
Compares logical key columns in the source against corresponding columns in the target
lookup table
Compares source columns against corresponding target columns if key columns match
Creates two data flows: one for new rows, one for changed rows
Figure 17-4 shows a mapping the Slowly Changing Dimensions Wizard creates when you
select the Type 1 Dimension option:
Figure 17-4. Type 1 Dimension Mapping
Data Flow for New Rows
The Type 1 Dimension mapping uses a Lookup and an Expression transformation to compare
source data against existing target data. When you step through the Slowly Changing
Dimensions Wizard, you enter the lookup conditions (source key columns) and source
columns that you want the Informatica Server to compare against the existing target.
For each source row without a matching primary key in the target, the Expression
transformation marks the row new. For each source row with a matching primary key in the
target, the Expression compares user-defined source and target columns. If those columns do
not match, the Expression marks the row changed. The mapping then splits into two separate
data flows.
The first data flow uses the Filter transformation, FIL_InsertNewRecord, to filter out existing
rows. The Filter transformation passes only new rows to the UPD_ForceInserts Update
Strategy transformation. UPD_ForceInserts inserts new rows to the target, and a Sequence
Generator creates a primary key for each row.
In the second data flow, the FIL_UpdateChangedRecord Filter transformation allows only
changed rows to pass to the Update Strategy transformation, UPD_ChangedUpdate.
UPD_ChangedUpdate replaces existing rows in the target with the updated source rows.
445
Transformation
Type
SQ_SourceName
Source Qualifier or
Application Source
Qualifier
Selects all rows from the source you choose in the Mapping
Wizard.
LKP_GetData
Lookup
EXP_DetectChanges
Expression
Uses the following expression to flag source rows that do not have
matching keys in the target. The expression returns TRUE if a
matching key does not exist in the target, indicating the row is new:
Description
IIF(ISNULL(PM_PRIMARYKEY),TRUE,FALSE)
446
Transformation
Name
Transformation
Type
FIL_InsertNewRecord
Filter
Uses the following filter condition to filter out any rows from
EXP_DetectChanges that are not marked new (TRUE): NewFlag.
Passes new rows to UPD_ForceInserts.
UPD_ForceInserts
Update Strategy
Description
Transformation
Type
SEQ_GenerateKeys
Sequence Generator
T_TargetName
Target Definition
Instance of the target definition for new rows to be inserted into the
target.
Description
Transformation
Type
FIL_InsertChangedRecord
Filter
Uses the following filter condition to filter out any rows from
EXP_DetectChanges that are not marked changed (TRUE):
ChangedFlag. Passes changed rows to
UPD_ChangedUpdate.
UPD_ChangedUpdate
Update Strategy
T_TargetName1
Target Definition
Description
2.
Enter a mapping name and select Type 1 Dimension, and click Next.
447
3.
4.
448
Select the column or columns you want to use as a lookup condition from the Target
Table Fields list and click Add.
The wizard adds selected columns to the Logical Key Fields list.
Tip: The columns you select should be a key column in the source.
When you run the workflow containing the session, the Informatica Server performs a
lookup on existing target data. The Informatica Server returns target data when Logical
Key Fields columns match corresponding target columns.
To remove a column from Logical Key Fields, select the column and click Remove.
6.
Select the column or columns you want the Informatica Server to compare for changes,
and click Add.
The wizard adds selected columns to the Fields to Compare for Changes list.
When you run the workflow containing the session, the Informatica Server compares the
columns in the Fields to Compare for Changes list between source rows and the
corresponding target (lookup) rows. If the Informatica Server detects a change, it marks
the row changed.
To remove a column from the list, select the column and click Remove.
7.
Click Finish.
The new mapping appears in the workspace. You can edit the mapping as necessary.
8.
449
Note: In the Type 1 Dimension mapping, the Designer uses two instances of the same target
definition to enable inserting and updating data in the same target table. Generate only one
target table in the target database.
450
1.
In the session properties, click the General Options settings on the Properties tab. Set
Treat Source Rows As to Data Driven.
2.
In the session properties, click the Properties settings on the Targets tab. To ensure the
Informatica Server loads rows to the target properly, select Insert and Update as Update
for each relational target.
PM_PRIMARYKEY. The Informatica Server generates a primary key for each row written
to the target.
Handling Keys
In a Type 2 Dimension/Version Data mapping, the Informatica Server generates a new
primary key value for each new dimension it inserts into the target. An Expression
transformation increments key values by 1,000 for new dimensions.
When updating an existing dimension, the Informatica Server increments the existing
primary key by 1.
For example, the Informatica Server inserts the following new row with a key value of 65,000
since this is the sixty-fifth dimension in the table.
PM_PRIMARYKEY
ITEM
STYLES
65000
Sandal
The next time you run the workflow containing the session, the same item has a different
number of styles. The Informatica Server creates a new row with updated style information
and increases the existing key by 1 to create a new key of 65,001. Both rows exist in the
target, but the row with the higher key version contains current dimension data.
PM_PRIMARYKEY
ITEM
STYLES
65000
Sandal
65001
Sandal
14
451
When you run the workflow again, the Informatica Server again increments the key. The
highest key version contains current dimension data. Notice, the target keeps a full history of
the item as well as the order in which the versions occurred.
PM_PRIMARYKEY
ITEM
STYLES
65000
Sandal
65001
Sandal
14
65002
Sandal
17
Numbering Versions
In addition to versioning the primary key, the Informatica Server generates a matching
version number for each row inserted into the target. Version numbers correspond to the final
digit in the primary key. New dimensions have a version number of 0.
For example, in the data below, the versions are 0, 1, and 2. The highest version number
contains the current dimension data.
PM_PRIMARYKEY
ITEM
STYLES
PM_VERSION_NUMBER
65000
Sandal
65001
Sandal
14
65002
Sandal
17
452
Compares logical key columns in the source against corresponding columns in the target
lookup table
Compares source columns against corresponding target columns if key columns match
Creates two data flows: one for new rows, one for changed rows
Increments the primary key and version number for changed rows
The Type 2 Dimension/Version Data option in the Slowly Changing Dimensions Wizard
creates the following mapping:
Figure 17-5. Type 2 Dimension/Version Data Mapping
Data Flow for New Rows
453
Transformation
Type
SQ_SourceName
Source Qualifier or
Application Source
Qualifier
Selects all rows from the source you choose in the Mapping
Wizard.
LKP_GetData
Lookup
EXP_DetectChanges
Expression
Uses the following expression to flag source rows that do not have
matching keys in the target. The expression returns TRUE if a
matching key does not exist in the target, indicating the row is new:
Description
IIF(ISNULL(PM_PRIMARYKEY),TRUE,FALSE)
454
Transformation
Name
Transformation
Type
FIL_InsertNewRecord
Filter
Uses the following filter condition to filter out any rows from
EXP_DetectChanges that are not marked new (TRUE): NewFlag.
Passes new rows to UPD_ForceInserts.
UPD_ForceInserts
Update Strategy
SEQ_GenerateKeys
Sequence Generator
Description
Transformation
Type
EXP_KeyProcessing_
InsertNew
Expression
T_TargetName
Target Definition
Instance of the target definition for new rows to be inserted into the
target.
Description
Transformation
Type
FIL_InsertChangedRecord
Filter
Uses the following filter condition to filter out any rows from
EXP_DetectChanges that are not marked changed (TRUE):
ChangedFlag. Passes changed rows to UPD_ChangedInserts.
UPD_ChangedInserts
Update Strategy
EXP_KeyProcessing_Insert
Changed
Expression
T_TargetName1
Target Definition
Description
2.
455
3.
4.
456
Select the column or columns you want to use as a lookup condition from the Target
Table Fields list and click Add.
The wizard adds selected columns to the Logical Key Fields list.
Tip: The columns you select should be a key column in the source.
When you run the workflow containing the session, the Informatica Server performs a
lookup on existing target data. The Informatica Server returns target data when Logical
Key Fields columns match corresponding target columns.
To remove a column from Logical Key Fields, select the column and click Remove.
6.
Select the column or columns you want the Informatica Server to compare for changes,
and click Add.
The wizard adds selected columns to the Fields to Compare for Changes list.
When you run the workflow containing the session, the Informatica Server compares the
columns in the Fields to Compare for Changes list between source rows and the
corresponding target (lookup) rows. If the Informatica Server detects a change, it marks
the row changed.
To remove a column from the list, select the column and click Remove.
457
7.
8.
Click Finish.
The new mapping appears in the workspace. You can edit the mapping as necessary.
9.
Note: In the Type 2 Dimension/Version Data mapping, the Designer uses two instances of the
same target definition to enable the two separate data flows to write to the same target table.
Generate only one target table in the target database.
458
1.
2.
3.
Click in the far right corner of the Expression field of the PM_PRIMARYKEY port.
4.
Delete the existing value, 1,000, and enter the value you want the Informatica Server to
use when incrementing the primary key. Click Validate to validate your change.
5.
6.
Choose Repository-Save.
In the session properties, click the General Options settings on the Properties tab. Set
Treat Source Rows As to Data Driven.
2.
In the session properties, click the Properties settings on the Targets tab. To ensure the
Informatica Server loads rows to the target properly, select Insert for each relational
target.
459
PM_CURRENT_FLAG. The Informatica Server flags the current row 1 and all
previous versions 0.
PM_PRIMARYKEY. The Informatica Server generates a primary key for each row written
to the target.
STYLES
PM_CURRENT_FLAG
Sandal
Boot
25
When these dimensions change, the Informatica Server inserts the updated versions with the
current flag of 1. The Informatica Server also updates the existing rows in the target: it finds
the previous current version (where the current flag is set to 1) and updates the current flag to
0.
460
ITEM
STYLES
PM_CURRENT_FLAG
Sandal
Boot
25
Sandal
12
Boot
15
Handling Keys
When you use the Flag Current option, the Informatica Server generates a primary key value
for each row written to the target, incrementing key values by one. An Expression
transformation increments key values by 1,000 for new dimensions.
When updating an existing dimension, the Informatica Server increments the existing
primary key by 1.
For example, the following dimensions are current dimension data (current flags set to one).
Their primary keys are multiples of 1,000. This indicates they are both the first version of a
dimension.
PM_PRIMARYKEY
ITEM
STYLES
PM_CURRENT_FLAG
3000
Sandal
4000
Boot
25
When the Informatica Server inserts updated versions of these dimensions into the target, it
sets the current flag to 1. It also creates a new primary key for the updated row by
incrementing key of the existing dimension by one. The Informatica Server indicates the
existing dimension is no longer current by resetting its current flag to 0.
PM_PRIMARYKEY
ITEM
STYLES
PM_CURRENT_FLAG
3000
Sandal
4000
Boot
25
3001
Sandal
12
4001
Boot
15
Compares logical key columns in the source against corresponding columns in the target
lookup table
Compares source columns against corresponding target columns if key columns match
Creates two data flows: one for new rows, one for changed rows
Increments the existing primary key and sets the current flag for changed rows
461
Updates existing versions of the changed rows in the target, resetting the current flag to
indicate the row is no longer current
Figure 17-6 illustrates a mapping that the Type 2 Dimension/Flag Current option in the
Slowly Changing Dimensions Wizard creates:
Figure 17-6. Type 2 Dimension/Flag Current Mapping
Data Flow for New Rows
Transformation
Type
SQ_SourceName
Source Qualifier or
Application Source
Qualifier
Selects all rows from the source you choose in the Mapping
Wizard.
LKP_GetData
Lookup
EXP_DetectChanges
Expression
Uses the following expression to flag source rows that do not have
matching keys in the target. The expression returns TRUE if a
matching key does not exist in the target, indicating the row is new:
Description
IIF(ISNULL(PM_PRIMARYKEY),TRUE,FALSE)
463
Transformation
Type
FIL_InsertNewRecord
Filter
Uses the following filter condition to filter out any rows from
EXP_DetectChanges that are not marked new (TRUE): NewFlag.
Passes new rows to UPD_ForceInserts.
UPD_ForceInserts
Update Strategy
SEQ_GenerateKeys
Sequence Generator
EXP_KeyProcessing_
InsertNew
Expression
T_TargetName
Target Definition
Instance of the target definition for new rows to be inserted into the
target.
Description
464
Transformation Name
Transformation
Type
FIL_InsertChangedRecord
Filter
Uses the following filter condition to filter out any rows that are
not marked changed: ChangedFlag. Passes changed rows to
UPD_ChangedInserts.
UPD_ChangedInserts
Update Strategy
EXP_KeyProcessing_Insert
Changed
Expression
T_TargetName2
Target Definition
Description
Transformation
Type
FIL_UpdateChangedRecord
Filter
Uses the following filter condition to filter out any rows from
EXP_DetectChanges that are not marked changed (TRUE):
ChangedFlag.
For each changed row, passes the primary key of the previous
version to UPD_ChangedUpdate.
UPD_ChangedUpdate
Update Strategy
EXP_KeyProcessing_Update
Changed
Expression
T_TargetName3
Target Definition
Description
2.
3.
4.
5.
Select the column or columns you want to use as a lookup condition from the Target
Table Fields list and click Add.
The wizard adds selected columns to the Logical Key Fields list.
Tip: The columns you select should be a key column in the source.
When you run the session, the Informatica Server performs a lookup on existing target
data. The Informatica Server returns target data when Logical Key Fields columns match
corresponding target columns.
Creating a Type 2 Dimension/Flag Current Mapping
465
To remove a column from Logical Key Fields, select the column and click Remove.
6.
Select the column or columns you want the Informatica Server to compare for changes,
and click Add.
The wizard adds selected columns to the Fields to Compare for Changes list.
When you run the session, the Informatica Server compares the columns in the Fields to
Compare for Changes list between source rows and the corresponding target (lookup)
rows. If the Informatica Server detects a change, it marks the row changed.
To remove a column from the list, select the column and click Remove.
466
7.
Click Next. Select Mark the Current Dimension Record with a Flag.
8.
Click Finish.
The new mapping appears in the workspace. You can edit the mapping as necessary.
9.
Note: In the Type 2 Dimension/Flag Current mapping, the Designer uses three instances of
the same target definition to enable the three separate data flows to write to the same target
table. Generate only one target table in the target database.
In the session properties, click the General Options settings on the Properties tab. Set
Treat Source Rows As to Data Driven.
2.
In the session properties, click the Properties settings on the Targets tab. To ensure the
Informatica Server loads rows to the target properly, select Insert and Update as Update
for each relational target.
467
PM_BEGIN_DATE. For each new and changed dimension written to the target, the
Informatica Server uses the system date to indicate the start of the effective date range for
the dimension.
PM_END_DATE. For each dimension being updated, the Informatica Server uses the
system date to indicate the end of the effective date range for the dimension.
PM_PRIMARYKEY. The Informatica Server generates a primary key for each row written
to the target.
ITEM
STYLES
PM_BEGIN_DATE
4325
Sock
13
9/1/98
5401
Boot
20
10/1/98
PM_END_DATE
When the Informatica Server finds updated versions of these dimensions in the source, it
inserts them into the target, using the system date to indicate the beginning of their effective
date ranges and leaving the end dates null.
468
The Informatica Server also updates the existing versions in the target, entering the system
date to end the effective date range.
PM_PRIMARYKEY
ITEM
STYLES
PM_BEGIN_DATE
PM_END_DATE
4325
Sock
13
9/1/98
6/1/99
5401
Boot
20
10/1/98
6/1/99
6345
Sock
18
6/1/99
6346
Boot
25
6/1/99
Handling Keys
When you use the Effective Date Range option, the Informatica Server generates a primary
key value for each row written to the target, incrementing key values by one.
Compares logical key columns in the source against corresponding columns in the target
lookup table
Compares source columns against corresponding target columns if key columns match
Creates three data flows: one for new rows, one for changed rows, one for updating
existing rows
Generates a primary key and beginning of the effective date range for new rows
Generates a primary key and beginning of the effective date range for changed rows
Updates existing versions of the changed rows in the target, generating the end of the
effective date range to indicate the row is no longer current
469
Figure 17-7 illustrates a mapping that the Type 2 Dimension/Effective Date Range option in
the Slowly Changing Dimensions Wizard creates:
Figure 17-7. Type 2 Dimension/Effective Date Range Mapping
Data Flow for New Rows
The Type 2 Dimension/Effective Date Range mapping uses a Lookup and an Expression
transformation to compare source data against existing target data. When you step through
the Slowly Changing Dimensions Wizard, you enter the lookup conditions (source key
columns) and source columns that you want the Informatica Server to compare against the
existing target.
For each source row without a matching primary key in the target, the Expression
transformation marks the row new. For each source row with a matching primary key in the
target, the Expression compares user-defined source and target columns. If those columns do
not match, the Expression marks the row changed. The mapping then splits into three
separate data flows.
The first data flow uses the Filter transformation, FIL_InsertNewRecord, to filter out existing
rows. The Filter transformation passes only new rows to the UPD_ForceInserts Update
Strategy transformation. UPD_ForceInserts inserts new rows to the target. A Sequence
Generator creates a primary key for each row. The Expression transformation,
EXP_KeyProcessing_InsertNew, uses the system date to indicate the start of the effective date
range. The transformation leaves the end date null, which indicates the new row contains
current dimension data.
In the second data flow, the FIL_InsertChangedRecord Filter transformation allows only
changed rows to pass to the Update Strategy transformation, UPD_ChangedInserts.
UPD_ChangedInserts inserts changed rows to the target. The Expression transformation,
EXP_KeyProcessing_InsertChanged, uses the system date to indicate the start of the effective
date range. The transformation leaves the end date null, which indicates the changed row
contains current dimension data.
470
In the third data flow, for each changed row written to the target, the Filter transformation,
FIL_UpdateChangedRecord, passes the primary key of the previous version to the Update
Strategy transformation, UPD_ChangedUpdate. UPD_ChangedUpdate updates existing
rows in the target. The Expression transformation, EXP_UpdateChanged, updates the end
date column with the system date. This changes the status of the existing dimension from the
current version to a previous version.
Transformation
Type
SQ_SourceName
Source Qualifier or
Application Source
Qualifier
Selects all rows from the source you choose in the Mapping
Wizard.
LKP_GetData
Lookup
EXP_DetectChanges
Expression
Uses the following expression to flag source rows that do not have
matching keys in the target. The expression returns TRUE if a
matching key does not exist in the target, indicating the row is new:
Description
IIF(ISNULL(PM_PRIMARYKEY),TRUE,FALSE)
471
Transformation
Type
FIL_InsertNewRecord
Filter
Uses the following filter condition to filter out any rows from
EXP_DetectChanges that are not marked new (TRUE): NewFlag.
Passes new rows to UPD_ForceInserts.
UPD_ForceInserts
Update Strategy
SEQ_GenerateKeys
Sequence Generator
EXP_KeyProcessing_
InsertNew
Expression
T_TargetName
Target Definition
Instance of the target definition for new rows to be inserted into the
target.
Description
472
Transformation Name
Transformation
Type
FIL_InsertChangedRecord
Filter
Uses the following filter condition to filter out any rows from
EXP_DetectChanges that are not marked changed (TRUE):
ChangedFlag. Passes changed rows to
UPD_ChangedInserts.
UPD_ChangedInserts
Update Strategy
SEQ_GenerateKeys (same
Sequence Generator as
above)
Sequence Generator
Description
Transformation
Type
Description
EXP_KeyProcessing_Insert
Changed
Expression
T_TargetName2
Target Definition
Transformation
Type
FIL_UpdateChangedRecord
Filter
Uses the following filter condition to filter out any rows from
EXP_DetectChanges that are not marked changed (TRUE):
ChangedFlag.
For each changed row, passes the primary key of the
previous version to UPD_ChangedUpdate.
UPD_ChangedUpdate
Update Strategy
EXP_CalcToDate
Expression
T_TargetName3
Target Definition
Description
2.
3.
473
4.
5.
Select the column or columns you want to use as a lookup condition from the Target
Table Fields list and click Add.
The wizard adds selected columns to the Logical Key Fields list.
Tip: The columns you select should be a key column in the source.
When you run the session, the Informatica Server performs a lookup on existing target
data. The Informatica Server returns target data when Logical Key Fields columns match
corresponding target columns.
To remove a column from Logical Key Fields, select the column and click Remove.
6.
Select the column or columns you want the Informatica Server to compare for changes,
and click Add.
The wizard adds selected columns to the Fields to Compare for Changes list.
When you run the session, the Informatica Server compares the columns in the Fields to
Compare for Changes list between source rows and the corresponding target (lookup)
rows. If the Informatica Server detects a change, it marks the row changed.
To remove a column from the list, select the column and click Remove.
474
7.
Click Next. Select Mark the Dimension Records with their Effective Date Range.
8.
Click Finish.
The new mapping appears in the workspace. You can edit the mapping as necessary.
9.
Note: In the Type 2 Dimension/Effective Date Range mapping, the Designer uses three
instances of the same target definition to enable the three separate data flows to write to the
same target table. Generate only one target table in the target database.
In the session properties, click the General Options settings on the Properties tab. Set
Treat Source Rows As to Data Driven.
2.
In the session properties, click the Properties settings on the Targets tab. To ensure the
Informatica Server loads rows to the target properly, select Insert and Update as Update
for each relational target.
475
PM_PRIMARYKEY. The Informatica Server generates a primary key for each row written
to the target.
PM_EFFECT_DATE. An optional field. The Informatica Server uses the system date to
indicate when it creates or updates a dimension.
476
PM_PRIMARYKEY
ITEM
STYLES
6345
Sock
20
6346
Boot
25
PM_PREV_STYLES
When the Informatica Server updates these rows, it writes the existing values in the STYLES
column (20 and 25) into PM_PREV_STYLES, and then replaces the existing style data with
new style data (14 and 31).
PM_PRIMARYKEY
ITEM
STYLES
PM_PREV_STYLES
6345
Sock
14
20
6346
Boot
31
25
Handling Keys
In the Type 3 Dimension mapping, the Informatica Server generates a primary key value for
each new row written to the target, incrementing key values by one. Updated rows retain their
original key values.
Compares logical key columns in the source against corresponding columns in the target
lookup table
Compares source columns against corresponding target columns if key columns match
Creates two data flows: one for new rows, one for updating changed rows
Generates a primary key and optionally notes the effective date for new rows
Writes previous values for each changed row into previous columns and replaces previous
values with updated values
Optionally uses the system date to note the effective date for inserted and updated values
477
Figure 17-8 illustrates a mapping that the Type 3 Dimension option in the Slowly Changing
Dimensions Wizard creates:
Figure 17-8. Type 3 Dimension Mapping
The Type 3 Dimension mapping uses a Lookup and an Expression transformation to compare
source data against existing target data. When you step through the Slowly Changing
Dimensions Wizard, you enter the lookup conditions (source key columns) and source
columns that you want the Informatica Server to compare against the existing target. The
Designer creates additional columns for the change columns to hold historic data.
For each source row without a matching primary key in the target, the Expression
transformation marks the row new. For each source row with a matching primary key in the
target, the Expression compares user-defined source and target columns. If those columns do
not match, the Expression marks the row changed. The mapping then splits into two separate
data flows.
The first data flow uses the Filter transformation, FIL_InsertNewRecord, to filter out existing
rows. The Filter transformation passes only new rows to the UPD_ForceInserts Update
Strategy transformation. UPD_ForceInserts inserts new rows to the target. A Sequence
Generator creates a primary key for each row. If you select the Effective Date option in the
mapping wizard, the Designer creates an Expression transformation,
EXP_EffectiveDate_InsertNew. The Informatica Server uses the system date to indicate when
it creates a new row.
In the second data flow, the FIL_UpdateChangedRecord Filter transformation allows only
changed rows to pass to the Update Strategy transformation UPD_ChangedInserts. In
addition, the Filter transformation updates the changed row: it takes the new versions of data
from the source qualifier, and uses existing versions of dimension data (passed from the
Lookup transformation) to populate the previous column fields. UPD_ChangedInserts inserts
changed rows to the target. If you select the Effective Date option in the mapping wizard, the
Designer creates an Expression transformation, EXP_EffectiveDate_InsertChanged. The
Informatica Server uses the system date to indicate when it updates an existing row.
478
Transformation
Type
SQ_SourceName
Source Qualifier or
Application Source
Qualifier
Selects all rows from the source you choose in the Mapping
Wizard.
LKP_GetData
Lookup
EXP_DetectChanges
Expression
Uses the following expression to flag source rows that do not have
matching keys in the target. The expression returns TRUE if a
matching key does not exist in the target, indicating the row is new:
Description
IIF(ISNULL(PM_PRIMARYKEY),TRUE,FALSE)
Transformation
Type
FIL_InsertNewRecord
Filter
Uses the following filter condition to filter out any rows from
EXP_DetectChanges that are not marked new (TRUE): NewFlag.
Passes new rows to UPD_ForceInserts.
UPD_ForceInserts
Update Strategy
Description
479
Transformation
Type
SEQ_GenerateKeys
Sequence Generator
EXP_KeyProcessing_
InsertNew
Expression
Created only when you select the Effective Date option in the
Mapping Wizard.
Passes generated values to the target to populate the
PM_PRIMARYKEY column in the target.
Uses SYSDATE to populate the PM_EFFECT_DATE column in the
target, indicating when the row is created.
T_TargetName
Target Definition
Instance of the target definition for new rows to be inserted into the
target.
Description
480
Transformation Name
Transformation
Type
FIL_UpdateChangedRecord
Filter
Uses the following filter condition to filter out any rows from
EXP_DetectChanges that are not marked changed
(TRUE): ChangedFlag.
Uses values returned from LKP_GetData to populate
previous columns.
Passes changed rows to UPD_ChangedUpdate.
UPD_ChangedUpdate
Update Strategy
EXP_EffectiveDate_InsertChanged
Expression
T_TargetName2
Target Definition
Description
2.
3.
4.
5.
Select the column or columns you want to use as a lookup condition from the Target
Table Fields list and click Add.
The wizard adds selected columns to the Logical Key Fields list.
Tip: The columns you select should be a key column in the source.
When you run the session, the Informatica Server performs a lookup on existing target
data. The Informatica Server returns target data when Logical Key Fields columns match
corresponding target columns.
To remove a column from Logical Key Fields, select the column and click Remove.
481
6.
Select the column or columns you want the Informatica Server to compare for changes,
and click Add.
The wizard adds selected columns to the Fields to Compare for Changes list.
When you run the session, the Informatica Server compares the columns in the Fields to
Compare for Changes list between source rows and the corresponding target (lookup)
rows. If the Informatica Server detects a change, it marks the row changed.
Note: Select the columns for which you want to keep previous values. To keep previous
values in the target, the Designer creates an additional column for each column in this
list. It names the columns PM_PREV_ColumnName.
To remove a column from the list, select the column and click Remove.
7.
Click Next. If you want the Informatica Server to timestamp new and changed rows,
select Effective Date.
The wizard displays the columns the Informatica Server compares and the name of the
column to hold historic values.
8.
Click Finish.
The new mapping appears in the workspace. You can edit the mapping as necessary.
9.
Note: In the Type 3 Dimension mapping, the Designer uses two instances of the same target
definition to enable the two separate data flows to write to the same target table. Generate
only one target table in the target database.
482
In the session properties, click the General Options settings on the Properties tab. Set
Treat Source Rows As to Data Driven.
2.
In the session properties, click the Properties settings on the Targets tab. To ensure the
Informatica Server loads rows to the target properly, select Insert and Update as Update
for each relational target.
483
The same column names, definitions, descriptions, and key restrictions as the source
definition.
After a wizard creates a target definition for your mapping, use the Warehouse Designer to
create the target table in your target database before running the session.
If your repository and target database types differ, be sure to change the database type of your
target definition to match your target database before generating the target.
For details, see Creating a Target Table on page 86.
484
Place all dimension sessions in the workflow before the fact session.
2.
3.
4.
Place the fact session in the workflow after the Decision task, and link the Decision task
to the fact session.
5.
Configure the following link condition from the Decision task to the fact session:
$<Decision_name>.Status = TRUE
For example, suppose you create three sessions that load data to dimension tables, and one
session that loads data to a fact table. You can create the workflow in Figure 17-9:
Figure 17-9. Workflow for Loading Dimension and Fact Tables
Dimension Sessions
Decision Task
Fact Session
Link Condition
Define the following decision condition for the sess_successful Decision task:
$s_dimension1.Status = SUCCEEDED AND $s_dimension2.Status = SUCCEEDED AND
$s_dimension3.Status = SUCCEEDED
Define the following link condition for the link from the Decision task to the fact session:
$sess_successful.Status = TRUE
485
You can improve overall workflow performance by running the dimension sessions
concurrently by arranging them in the workflow to start at the same time. If the Informatica
Server cannot start and run all dimension sessions concurrently due to your existing session
load, you can run the dimension sessions sequentially by arranging the dimension sessions
sequentially in the workflow.
If you have a dimension table that does not need to reload each time you run the workflow,
you can disable that individual session.
486
Appendix A
Datatype Reference
This appendix includes the following topics:
Overview, 488
487
Overview
When you create a mapping, you create a set of instructions for the Informatica Server to read
data from the source table, transform it, and write it to a target table. The Informatica Server
transforms data based on dataflow in the mapping (starting at the first transformation in the
mapping) and the datatype assigned to each port in a mapping.
The Designer displays two types of datatypes:
Native datatypes. Specific to the source and target databases, flat files, or ERP systems.
Native datatypes appear in the Source Analyzer and Warehouse Designer. They also appear
in source and target definitions in the Mapping Designer and in source definitions in the
Mapplet Designer.
Transformation datatypes. Set of datatypes that appear in the transformations. They are
internal datatypes based on ANSI SQL-92 generic datatypes, which the Informatica Server
uses to move data across platforms. Because the transformation datatypes are generic, you
can use different source and target platforms. For example, you can read information from
an Oracle source and write it to a Sybase target. Likewise, you can read information from a
flat file and write it to a Microsoft SQL Server database. The transformation datatypes
appear in the Source Qualifier and Normalizer as well as all other transformations in a
mapping.
When the Informatica Server reads data from a source, it converts the native datatypes to the
comparable transformation datatypes. When you run a workflow, the Informatica Server
performs transformations based on the transformation datatypes. For example, if you import
an Oracle Char column, it displays in the Source Qualifier transformation as a String
datatype. The datatype in a Source Qualifier transformation must exactly match the source
datatype. The Source Qualifier datatypes determine how the source database binds data when
you import it to transform it in a mapping. If the datatypes do not match, you cannot save
the mapping. The same is true for the Normalizer transformation. However, unlike the
Source Qualifier transformation, you cannot change the datatype in a Normalizer
transformation.
When you specify a multibyte character set, the datatypes allocate additional space in the
database to store characters of up to three bytes.
To write data to a target table, the Informatica Server converts the data based on native
datatypes in the target table definition.
488
Transformation Datatypes
Table A-1 lists the transformation datatypes available in PowerCenter and PowerMart:
Table A-1. Transformation Datatypes
Datatype
Size in Bytes
Description
Binary
Precision
1 to 65,535 bytes
PowerCenter and PowerMart support raw binary data for
Oracle, Sybase, and Microsoft SQL Server only. You can pass
binary data from a source to a target, but you cannot perform
transformations on binary data.
Date/Time
16 bytes
Decimal
Double
8 bytes
Precision of 15 digits
Double-precision floating-point numeric value.
Integer
4 bytes
Nstring
1 to 65,535 characters
Fixed-length or varying-length string.
Ntext
1 to 65,535 characters
Fixed-length or varying-length string.
Real
8 bytes
Small Integer
4 bytes
String
1 to 65,535 characters
Fixed-length or varying-length string.
Text
1 to 65,535 characters
Fixed-length or varying-length string.
Note: The Informatica Server needs the Ntext and Text datatypes to correctly bind to source
Ntext and Text columns. Do not change the Ntext and Text datatypes in the Source Qualifier,
Lookup, and Stored Procedure transformations. You can, however, use Ntext, Text, Nstring,
and String interchangeably in any other transformation.
Transformation Datatypes
489
Numeric Datatypes
The following notes describe how the Informatica Server handles numeric datatypes.
Oracle Number(P,S)
PowerCenter and PowerMart support Number(P,S) values with negative scale. However, they
do not support Number(P,S) values with scale greater than precision 28 or a negative
precision.
Note: If you import a table with an Oracle Number with a negative scale, the Mapping
Designer displays it as a Decimal datatype, but the Informatica Server converts it to a double.
Informix Money
On UNIX platforms, to prevent the Informatica Server from reading fields with a money
datatype as 0.00 when using high precision, you must set the following environment variable:
DBMONEY=' .'
You can set the DBMONEY environment variable so Informix does not prefix the data with
the dollar sign ($) for money data types.
Using a Bourne Shell:
DBMONEY=' .'
export DBMONEY
Using a C-shell:
setenv DBMONEY=' .'
On Windows, you must set this environment variable in the profile of the person under
whose name the Informatica service is started.
490
This expression moves the decimal place two digits to the left, as shown in the following
example:
Number
Return Value
34500
345.00
12340
123.40
23450
234.50
Precision
Server Treats As
Decimal
0-28
Decimal
Decimal
Over 28
Double
Decimal
Negative scale
Double
Decimal Disabled: Table A-3 shows the results when you use the Decimal datatype in a
mapping and do not select Enable High Precision when you configure the session:
Table A-3. Decimal Disabled Port Datatypes
Port Datatype
Precision
Server Treats As
Decimal
0-28
Double
Decimal
Over 28
Double
Decimal
Negative scale
Double
Transformation Datatypes
491
The Designer displays any range you assign to a Decimal datatype, but the Informatica Server
supports precision only up to 28.
Note: PowerCenter and PowerMart do not support decimal values with scale greater than
Date/Time Datatypes
PowerCenter and PowerMart handle years from 1753 A.D. to 9999 A.D. in the Gregorian
Calendar system. Years beyond 9999 A.D. cause an error during a workflow. Years before
1753 work as long as they are expressed in the Gregorian Calendar System.
The Date/Time datatype supports dates with precision to the second. If you import a date/
time value that includes milliseconds, the Informatica Server truncates to seconds. If you
write a date/time value to a target column that supports milliseconds, the Informatica Server
inserts zero for the millisecond portion of the date.
492
An element of type timeInstant or timePeriod must use only one of these datatype within a
session. The format of the first of the element determines the format of all subsequent values
of the element.
For example, if the first value of a timeInstant element uses the format
CCYY-MM-DDThh:mm:ss
then all the subsequent values for the same element must follow the same format.
If the Informatica Server reads in a value for the same element with a different format, even if
it is a valid timeInstant format, it rejects the row.
In this example, if the Informatica reads in a subsequent value with a different format
CCYY-MM-DD
then it rejects the row even if the new format is also a valid timeInstant format.
String Datatypes
The transformation datatypes include the following string datatypes:
Nstring
Ntext
String
Text
Although the Nstring, Ntext, String, and Text datatypes support the same precision (up to
65,535 characters), the Informatica Server uses String to move string data from source to
target and Text to move text data from source to target. Because some databases store text data
differently than string data, the Informatica Server needs to distinguish between the two types
of character data. If the Source Qualifier displays String, set the target column to String.
Likewise, if the Source Qualifier displays Text, set the target column to Text, Long, or Long
Varchar (the actual datatype depends on your RDBMS).
In general, the smaller string datatypes (such as Char and Varchar) display as String in the
Source Qualifier, Lookup, and Stored Procedure transformations, while the larger text
datatypes (such as Text, Long, and Long Varchar) display as Text in the Source Qualifier.
Transformation Datatypes
493
You can use Nstring, Ntext, String, and Text interchangeably within transformations.
However, in the Source Qualifier, Lookup, and Stored Procedure transformations, the target
datatypes must match. The database drivers need to match the string datatypes with the
transformation datatypes, so that the data passes accurately. For example, Nchar in a lookup
table must match Nstring in the Lookup transformation.
Binary Datatypes
PowerCenter and PowerMart support raw binary data for Oracle, Microsoft SQL Server, and
Sybase only. You can pass binary data from a source to a target, but you cannot perform
transformations on binary data.
PowerCenter and PowerMart do not support binary datatypes for Informix, COBOL, or
ODBC sources, such as Microsoft Access, Excel, and Teradata.
If a mapping includes binary data, set the precision for the transformation binary datatype so
that the Informatica Server can allocate enough memory to move the data from source to
target.
494
Range
Transformation
Range
Char(L)
1 to 2,000 bytes
String
1 to 65,535 characters
Date
Date/Time
Long
Up to 2 GB
String
1 to 65,535 characters
If you include Long data in a
mapping, the Informatica Server
converts it to the transformation
String datatype, and truncates it to
65,535 characters.
Long Raw
Up to 2 GB
Binary
1 to 65,535 characters
Nchar
1 to 2,000 bytes
Nstring
1 to 65,535 characters
Number
Precision of 1 to 38
Double
Precision of 15
Number(P,S)
Precision of 1 to 38;
scale of 0 to 38
Decimal
Nvarchar2
1 to 4,000 bytes
Nstring
1 to 65,535 characters
Raw(L)
1 to 2,000 bytes
Binary
1 to 65,535 bytes
Varchar(L)
1 to 4,000 bytes
String
1 to 65,535 characters
Varchar2(L)
1 to 4,000 bytes
String
1 to 65,535 characters
Unsupported Datatypes
PowerCenter and PowerMart do not support the following Oracle datatypes:
Bfile
Blob
495
Clob
Mslabel
Nclob
Raw Mslabel
Rowid
Timestamp
496
Microsoft SQL
Range
Transformation
Range
Binary(L)
1 to 8,000 bytes
Binary
1 to 65,535 bytes
Bit
1 bit
String
1 to 65,535 characters
Char(L)
1 to 8,000 characters
String
1 to 65,535 characters
Datetime
Date/Time
Decimal(P,S)
Decimal
Float
-1.79E+308 to 1.79E+308
Double
Precision 15
Image
1 to 2,147,483,647 bytes
Binary
1 to 65,535 bytes
Int
-2,147,483,648 to
2,147,483,647
Integer
Money
-922,337,203,685,477.5807 to
922,337,203,685,477.5807
Decimal
Nchar
1 to 4,000 characters
Nstring
1 to 65,535 characters
Ntext
1 to 1,073,741,823 characters
Nstring
1 to 65,535 characters
Numeric(P,S)
Decimal
Numeric Identity
1 to 9,999
Integer
Range
Transformation
Range
Nvarchar
1 to 4,000 characters
Nstring
1 to 65,535 characters
Real
-3.40E+38 to 3.40E+38
Real
Precision 7; scale 0
Smalldatetime
Date/Time
Smallint
-32,768 to 32,768
Small Integer
Precision 5; scale 0
Smallmoney
-214,748.3648 to 214,748.3647
Decimal
Sysname
1 to 128 characters
Nstring
1 to 65,535 characters
Text
1 to 2,147,483,647 characters
Text
1 to 65,535 characters
Timestamp
8 bytes
Binary
1 to 65,535 bytes
Tinyint
0 to 255
Small Integer
Precision 5; scale 0
Varbinary(L)
1 to 8,000 bytes
Binary
1 to 65,535 bytes
Varchar(L)
1 to 8,000 characters
String
1 to 65,535 characters
Date/Time Datatype
The transformation Date/Time datatype supports dates with precision to the second. If you
import a date/time value with precision in the milliseconds, the Informatica Server truncates
to seconds. If you write a date/time value to a target column that supports fractions of
seconds, the Informatica Server inserts zeros for the millisecond portion of the date.
Datatype Synonyms
Table A-6 compares Microsoft SQL Server synonyms to transformation datatypes:
Table A-6. Microsoft SQL Server and Transformation Datatype Synonyms
Synonym
Transformation
Binary Varying
Binary
Character
String
Character Varying
String
Dec
Decimal
Double Precision
Double
Integer
Integer
497
Unsupported Datatypes
PowerCenter and PowerMart do not support the following Microsoft SQL Server datatypes:
Bigint
Sql_variant
Uniqueidentifier
498
Sybase
Range
Transformation
Range
Binary(L)
1 to 255 bytes
Binary
1 to 65,535 bytes
Bit
0 or 1
String
1 to 65,535 characters
Char(L)
1 to 255 characters
String
1 to 65,535 characters
Datetime
Date/Time
Decimal(P,S)
Decimal
Double Precision
Double
Precision 15
Float
Double
Precision 15
Int
-2,147,483,648 to 2,147,483,647
Integer
Money
-922,337,203,685,477.5807 to
922,337,203,685,477.5807
Decimal
Nchar(L)
1 to 255 characters
Nstring
1 to 65,535 characters
Numeric(P,S)
Decimal
Numeric Identity
1 to 9999
Integer
Nvarchar
1 to 255 characters
Nstring
1 to 65,535 characters
Real
Precision 7; scale 0
Real
Precision 7; scale 0
Smalldatetime
Date/Time
Smallint
-32,768 to 32,768
Small Integer
Precision 5; scale 0
Smallmoney
-214,748.3648 to 214,748.3647
Decimal
Range
Transformation
Range
Text
1 to 2,147,483,647 characters
Text
1 to 65,535 characters
Timestamp
8 bytes
Binary
1 to 65,535 bytes
Tinyint
0 to 255
Small Integer
Precision 5; scale 0
Varbinary(L)
1 to 255 bytes
Binary
1 to 65,535 bytes
Varchar(L)
1 to 255 characters
String
1 to 65,535 characters
Note: The Date/Time datatype supports dates with precision to the second. If you import a
date/time value that includes milliseconds, the Informatica Server truncates to seconds. If you
write a date/time value to a target column that supports milliseconds, the Informatica Server
inserts zeros for the millisecond portion of the date.
Datatype Synonyms
Table A-8 compares Sybase synonyms to Transformation datatypes:
Table A-8. Sybase and Transformation Datatype Synonyms
Synonym
Transformation
Char Varying
String
Character(L)
String
Character Varying
String
Dec
Decimal
Integer
Small Integer
National Char
Nstring
Nstring
National Character
Nstring
Nstring
Nchar Varying
Nstring
Unsupported Datatypes
PowerCenter and PowerMart do not support the following Sybase 11 datatypes:
Image
Sysname
User-defined
499
Qualifier, Lookup, and Stored Procedure transformations. However, you can use the
transformation datatypes Text and String interchangeably.
Table A-9. Informix and Transformation Datatypes
Informix
Range
Transformation
Range
Char(L)
1 to 32,767 characters
String
1 to 65,535 characters
Date
Date/Time
Datetime
Date/Time
Decimal(P,S)
Decimal
Float(P)
Precision 1 to 14
Double
Precision 15
Integer
-2,147,483,647 to 2,147,483,647
Integer
Money(P,S)
Decimal
Nchar
1 to 32,767 characters
Nstring
1 to 65,535 characters
Nvarchar
1 to 255 characters
Nstring
1 to 65,535 characters
Serial(L)
-2,147,483,647 to 2,147,483,647
Integer
Smallfloat
Precision 1 to 7; scale 0
Real
Precision 7; scale 0
Smallint
-32,767 to 32,767
Small Integer
Precision 5; scale 0
Text
Text
1 to 65,535 characters
Varchar(M,R)
1 to 255 characters
String
1 to 65,535 characters
Datatype Synonyms
Table A-10 compares Informix synonyms to transformation datatypes:
Table A-10. Informix and Transformation Datatype Synonyms
500
Synonym
Transformation
Character(L)
String
Character Varying(m,r)
String
Transformation
Dec
Decimal
Double Precision
Double
Int
Integer
Numeric
Decimal
Real
Real
Unsupported Datatypes
PowerCenter and PowerMart do not support the following Informix datatypes:
Byte
Interval
Range
Transformation
Range
Blob
1 to 2,147,483,647 bytes
Binary
1 to 65,535 bytes
Char(L)
1 to 254 characters
String
1 to 65,535 characters
1 to 254 bytes
Binary
1 to 65,535 bytes
Date
0001 to 9999 AD
(precision to the day)
Date/Time
Decimal(P,S)
Decimal
Float
Precision 1 to 15
Double
Precision 15
Graphic
1 to 127 bytes
String
1 to 65,535 characters
Integer
-2,147,483,648 to
2,147,483,647
Integer
Long Varchar
1 to 32,700 characters
String
1 to 65,535 characters
Numeric(P,S)
Decimal
Smallint
-32,768 to 32,767
Small Integer
Precision 5; scale 0
501
Range
Transformation
Range
Time
Date/Time
Timestamp
26 bytes
(precision to microsecond)
Date/Time
Varchar
Up to 4,000 characters
String
1 to 65,535 characters
Vargraphic
Up to 16,336 bytes
String
1 to 65,535 characters
Unsupported Datatypes
PowerCenter and PowerMart do not support the following DB2 datatypes:
Dbclob
Clob
Real
502
Datatype
Transformation
Range
Bigint
Integer
Bit
String
1 to 65,535 characters
Char(L)
String
1 to 65,535 characters
Date
Date/Time
Decimal(P, S)
Decimal
Double
Double
Precision 15
Float
Double
Precision 15
Integer
Integer
Long Varchar
String
1 to 65,535 characters
Nchar
Nstring
1 to 65,535 characters
Nvarchar
Nstring
1 to 65,535 characters
Ntext
Ntext
1 to 65,535 characters
Transformation
Range
Numeric
Decimal
Real
Real
Precision 7; scale 0
Smallint
Smallint
Precision 5; scale 0
Time
Date/Time
Timestamp
Date/Time
Tinyint
Small Integer
Precision 5; scale 0
Varchar(L)
String
1 to 65,535 characters
Unsupported Datatypes
PowerCenter and PowerMart do not support the following ODBC datatypes:
Binary
Long Varbinary
Varbinary
Transformation
Range
Nstring
String
1 to 65,535 bytes
Number
Decimal
String
String
1 to 65,535 characters
503
Transformation
Range
Nstring
String
1 to 65,535 bytes
Number
Decimal
String
String
1 to 65,535 characters
Datetime
Date/Time
Note: When the Informatica Server reads non-numeric data in a numeric column from a flat
file, it drops the row and writes a message in the session log. Also, when the Informatica
Server reads non-date/time data in a date/time column from a flat file, it drops the row and
writes a message in the session log.
504
You can change XML datatypes in the Source Analyzer and Warehouse Designer. You cannot
change the transformation datatypes for XML sources within a mapping.
Table A-15. XML and Transformation Datatypes
Datatype
Transformation
Range
binary
String
1 to 65,535 characters
boolean
String
1 to 65,535 characters
byte
Small Integer
Precision 5; scale 0
century
String
1 to 65,535 characters
date
String
1 to 65,535 characters
decimal
Decimal
double
Double
ENTITIES
String
1 to 65,535 characters
ENTITY
String
1 to 65,535 characters
float
Double
ID
String
1 to 65,535 characters
IDREF
String
1 to 65,535 characters
IDREFS
String
1 to 65,535 characters
int
Integer
integer
Integer
language
String
1 to 65,535 characters
long
Decimal(28,0)
month
String
1 to 65,535 characters
name
String
1 to 65,535 characters
NCName
String
1 to 65,535 characters
negativeInteger
String
1 to 65,535 characters
NMTOKEN
String
1 to 65,535 characters
NMTOKENS
String
1 to 65,535 characters
nonNegativeInteger
String
1 to 65,535 characters
nonPositiveInteger
String
1 to 65,535 characters
NOTATION
String
1 to 65,535 characters
positiveInteger
String
1 to 65,535 characters
QName
String
1 to 65,535 characters
recurringDate
String
1 to 65,535 characters
505
Transformation
Range
recurringDay
String
1 to 65,535 characters
recurringDuration
String
1 to 65,535 characters
short
Small Integer
Precision 5; scale 0
string
String
1 to 65,535 characters
time
String
1 to 65,535 characters
timeDuration
String
1 to 65,535 characters
timeInstant
Date/Time
timePeriod
Date/Time
unsignedByte
Small Integer
Precision 5; scale 0
unsignedInt
Decimal(28,0)
unsignedLong
Decimal(28,0)
unsignedShort
Integer
uriReference
String
1 to 65,535 characters
year
String
1 to 65,535 characters
In addition to the XML datatypes, PowerCenter and PowerMart allow you to use the
following flat file datatypes in your XML source definition:
506
Datatype
Transformation
Range
nstring
String
1 to 65,535 characters
number
Decimal
Converting Data
You can convert data from one datatype to another by using the following methods:
Using transformation functions to convert data. For details, see Functions in the
Transformation Language Reference.
Using transformation arithmetic operators to convert data. For details, see Operators in
the Transformation Language Reference.
Decimal
Double,
Real
String, Text
Nstring,
Ntext
Date/Time
Binary
Integer,
Small Integer
Yes
Yes
Yes
Yes
Yes
No
No
Decimal
Yes
Yes
Yes
Yes
Yes
No
No
Double, Real
Yes
Yes
Yes
Yes
Yes
No
No
String, Text
Yes
Yes
Yes
Yes
Yes
Yes
No
Nstring, Ntext
Yes
Yes
Yes
Yes
Yes
Yes
No
Date/Time
No
No
No
Yes
Yes
Yes
No
Binary
No
No
No
No
No
No
Yes
Datatype
Converting Data
507
508
String
Converts to Decimal
Double, Real
18e-3
18
0.018
18
18-e-3abc
18
0.018
18
123abc
123
123
123
A123cb
abc
Index
A
ABORT function
See also Transformation Language Reference
using 269
absolute cardinality (XML)
definition 135
active transformations
See also transformations
mapplets 296
overview 252
adding
comments to expressions 260
repository 24
sources to mappings 231
target update statement 238
targets to mappings 70
aggregate
definition (metadata) 413
Aggregator transformation
using variables 261
Application Source Qualifier transformation
definition 231
ASCII
See also flat files
See also Installation and Configuration Guide
See also Workflow Administration Guide
updating flat file source definitions 103
attributes
XML 212
autolink
by name 278
by position 277
by prefix 280
by suffix 281
B
binary datatypes
overview 494
breakpoints
.dcf files 364
copying 364
creating 326, 329
data conditions 331, 332
Debugger 326
error conditions 331
global 330
ISDEFAULT 336
ISNULL 336
steps for entering 336
transformation 330
transformation in mapplets 330
business components
adding shortcuts 404
copying 403, 409
creating 405
509
definition 402
deleting 408
directories 402
linking to documentation 404
local vs. global shortcuts 404
locking 404
moving 403
overview 402
permissions 404
business components directory
copying 409
creating 405
deleting 408
editing 407
business documentation
creating links 40
for expressions 40
for repository objects 40
root 40
viewing 42
business documentation links
adding to mappings 50, 226
business names
adding to sources 37
adding to target definitions 81, 104
adding to targets 37
as source column names 38
as target column names 38
display sources 7
display targets 7
displaying in Navigator 37
in Source Qualifier 38
renaming imported sources 47
using 37
C
calculations
using variables with 262
cardinality (XML)
absolute 135
relative 137
character sets
Flat File Wizard 93
child element (XML)
overview 132
circular references (XML)
limitations 165
overview 153
COBOL
510
Index
Index
511
custom tools
configuring 15
custom XML groups
overview 157
D
data
converting port-to-port 504
converting strings to numbers 504
converting types of 504
handling truncated and overflow 236
previewing 369
previewing data 369
storing temporary 261
data breakpoints
global options 332
transformation options 332
data mart
See Repository Guide
data movement mode
datatypes 488
data preview
flat file sources 371
relational sources 369, 371
relational targets 369
XML sources 173
XML targets 199
data warehouse
See also Repository Guide
See also Repository Manager
database type
for cubes 420
for dimensions 414
datatypes
binary 494
comparing native and transformation 495
Date/Time 492, 497
Decimal 491
mapping variables 316
Microsoft SQL Server 496
native datatypes 488
numeric 490
overview 488
reading flat file sources 504
string 493
transformation 488, 489
unsupported 495, 498, 502, 503
XML metadata 134
Date/Time datatypes
512
Index
customizing toolbars 14
date display format 24
exporting objects 27
importing objects 27
Instance Data window 2
Mapping Designer 2
Mapplet Designer 2
Navigator 2
opening and closing a folder 25
output window 2
overview 2
overview window 2
port validation 277
printing mappings 24
shortcut keys 29
Source Analyzer 2
SQL DDL commands 87
status bar 2
Target Data window 2
tasks 24
time display format 24
tools 2
Transformation Developer 2
Warehouse Designer 2
windows 2
working with business components 403
workspace window 2
zoom 22
dimension tables
levels 415
metadata 412
non-normalized models 412
reasons for 430
sources 416
dimensions
creating 414
database type for 414
definition (metadata) 413
deleting 425
editing 424
overview 412
slowly changing 430
slowly growing 430
tips 428
viewing metadata 427
directories
grouping business components 402
display
date 24
iconized 20
time 24
Index
513
toolbars 13
zoom 22
documentation
conventions xxxii
description xxix
online xxxi
path 40
drilling
definition (metadata) 413
dropping
indexes 87
DTD
definition 132
metadata from 140
DTD/schema reference
description 244
DTM (Data Transformation Manager)
See Workflow Administration Guide
duplicate group row handling
overview 242
E
editing
business components directory 407
cubes 423
dimensions 424
mappings 226
mapplets 297
relational source definitions 51
relational target definitions 78
XML sources 177
XML targets 194, 204
enclosure element (XML)
importing XML sources 171, 174
importing XML targets 198
XML hierarchy 132
entering
description 25
expressions 258, 259
ERROR function
See also Transformation Language Reference
using 269
error handling
misalignment, flat file 94
error logs
See Workflow Administration Guide
errors
handling 272
port 283
514
Index
F
fact table
adding to cubes 422
definition 430
definition (metadata) 413
with metadata 412
FD Section
COBOL source definitions 57
field attributes
COBOL source definitions 61
fields
COBOL source definitions 57
deleting 27
moving 27
Find in Workspace tool
overview 18
Find Next tool
overview 17
fixed-width files
See also flat files
advanced settings 109
importing sources 107
Flat File Wizard
delimited file column settings 102
delimited file options 99, 100
G
general options
configuring 5
Getting Started Wizard
creating targets 484
description 432
scheduling sessions 485
Simple Pass Through mapping 432, 435
Slowly Growing Target mapping 432, 439
sources 434
global repositories
See also Repository Guide
business components
globalization
See also Installation and Configuration Guide
sources 44
group link keys (XML)
overview 209
Groups At element (XML)
overview 158
H
hierarchy
adding to dimensions 417
definition (metadata) 413
schema example 412
hierarchy (XML)
overview 135
historical data
differentiating from current 431
maintaining 430
I
IBM DB2
comparing to transformation datatypes 500
importing
See also Repository Guide
COBOL sources 54
delimited flat file source definitions 112
fixed-width flat file source definitions 107
flat files 93
mappings 226
mapplets 298
Microsoft Excel source definitions 63
objects 27
relational source definitions 47
relational target definitions 72
XML groups from PowerCenter.e 174, 186
XML sources 169
XML targets 194, 196
XML targets from relational sources 200
indexes
creating for target tables 84
defining on target 84
dropping for target tables 87
recreating for target tables 87
Informatica
documentation xxix
Webzine xxxiii
Informatica Server
Index
515
J
Joiner transformation
load order bypass 245
K
keys
516
Index
L
Layout toolbar
overview 12
leaf element (XML)
overview 132
levels
adding to dimensions 415
adding to hierarchy 418
definition (metadata) 413
dimension tables 415
limitations
XML sources and targets 165
linking
business component documentation 404
local repositories
See Repository Guide
local variables
See variables
locking
business components 404
log files
See session logs
M
maintaining
historical data 430
star schemas 430
many-to-many relationship (XML)
relative cardinality 138
Mapping Designer
See also Designer
See also mappings
adding reusable transformation 288
creating mappings 223
creating ports 256
usage for 2
mapping parameters
Index
517
518
Index
dimension 413
drilling 413
fact table 413
from DTD 134
from XML 134
from XML Schema 134
hierarchy 413
levels 413
measure 413
multi-dimensional 412
normalization 413
redundancy 413
snowflake schema 413
star schema 413
viewing cubes and dimensions 427
metadata exchange
See Metadata Exchange SDK User Guide
metadata extensions
comparing across mappings 391
creating 30
deleting 33
editing 32
in XML sources 181
in XML targets 207
overview 30
metadata.xml
overview 186
Microsoft Access97
See also Installation and Configuration Guide
datatypes 502
Microsoft Excel
See also Installation and Configuration Guide
datatypes 502
formatting numeric data 64
importing source 63
importing source definitions 65
preparing data for import 63
Microsoft SQL Server
comparing to transformation datatypes 496
datatypes 496
misalignment
flat file 94
modifying data
Debugger 359
monitoring
debug indicators 351
debug log 356
Debugger 351, 357
target data 355
MQSeries
See also PowerConnect for IBM MQSeries User and
Administrator Guide
multi-dimensional metadata
See also cubes
See also dimensions
overview 412
multiple-occurring element (XML)
overview 132
MX (Metadata Exchange API) views
See Repository Guide
MX2 (Metadata Exchange API)
See Metadata Exchange SDK User Guide
N
namespaces (XML)
overview 165
naming conventions
for mappings 223
native datatypes
overview 488
Navigator
deleting mappings from 227
usage for 2
new line character
XML attributes 212
Next Instance
Debugger 354
non-normalized
cube attribute 420
dimension tables 412
Normal tracing level
overview 276
normalization
definition (metadata) 413
normalized
cube attribute 420
multi-dimensional schema 412
XML default groups 148
XML groups 145
Normalizer transformation
debugging 360
definition 231
null character
fixed-width source 109
flat file 110
null constraint (XML)
overview 135
null values
replacing with a constant 268
skipping 270
Number(P,S) values
Oracle 490
numeric datatypes
overview 490
numeric operations
converting strings to dates 507
converting strings to numbers 508
O
object dependencies
See also Repository Guide 34
viewing 34
OCCURS statement
COBOL source definitions 57
ODBC (Open Database Connectivity)
See also Installation and Configuration Guide
comparing datatypes to transformation 502
importing targets 72
requirement importing source definitions 47
OLAP applications
metadata 412
one-to-many relationship (XML)
overview 138
one-to-one relationship (XML)
overview 137
opening
mappings 224
options
default 5
Oracle
comparing to transformation datatypes 495
Number(P,S) values 490
output groups
connecting to output ports in mapplets 301
definition 293
ports 300
output ports
See also ports
default values 265
error handling 265
mapplets 293
overview 230, 257
Output transformation
configuring 300
in mapplets 293, 300
ports 300
Output window
Debugger tab 351
example of mapping validation 247
Index
519
P
parameters
mappings 306
parent chain (XML)
overview 132
parent element (XML)
overview 132
passive transformations
mapplets 296
overview 252
PeopleSoft
See PowerConnect for PeopleSoft User and Administrator
Guide
performance
using variables to improve 261
permissions
business components 404
persisted values
Debugger 350
pipeline partitioning
mapplets 302
pivoting
rules 162
XML groups 162
port description
retaining when re-importing a source 52
ports
See also input ports
See also input/output ports
See also output ports
See also variable ports
adding to Input/Output transformations 300
configuring 255
connecting 277
connecting to mapplet input 301
connecting to multiple transformations 282
creating 255, 256
creating in mapplets 300
default values overview 265
deleting 27
520
Index
errors 283
evaluation order 263
linking 277
linking by name 278
linking by position 277
linking by prefix 280
linking by suffix 281
overview 230
renaming 28
source dependencies 228
variables ports 261
XML targets 209
port-to-port data conversion 507
PowerCenter
installing See Installation and Configuration Guide
repository See Repository Guide
upgrading See Installation and Configuration Guide
PowerCenter.e
creating XML source groups 174, 186
PowerMart
installing See Installation and Configuration Guide
repository See Repository Guide
upgrading See Installation and Configuration Guide
powrmart.ini
default tab size 55
pre- and post-session SQL
target instances 241
precision
definition 106, 116
flat files 129
relational targets 84
previewing data
overview 368
source 369
target 369
XML sources 173
XML targets 199
printing
mappings 24
promoting
standard transformations 287
R
Rank transformation
debugging 360
using variables 261
record sets
COBOL source definitions 58
records
S
SAP Business Warehouse (BW)
See PowerConnect for SAP BW User and Administration
Guide
importing source tables 44
saving
historical data 430
scale
definition 106, 116
relational targets 84
scheduling
sessions for mapping wizards 485
selecting
multiple records within a folder 48
Sequence Generator transformation
debugging 360
Session Log tab
Output window 351
session logs
tracing levels 276
session reject file
using for overflow data 236
using for truncated data 236
sessions
configuring Simple Pass Through 437
configuring Slowly Growing Target 443
configuring Type 1 Dimension 450
configuring Type 2 Dimension/Effective Date Range
475
configuring Type 2 Dimension/Flag Current 467
configuring Type 2 Dimension/Version 459
configuring Type 3 Dimension 483
improving performance through variables 261
invalidating 227
running in debug mode 340
scheduling for star schemas 485
skipping errors 269
updates from source definitions 50
shared folder
copying mappings to 225
shift-sensitive
consecutive shift characters 126
flat files 126
requirements 126
shortcut keys
keyboard 29
shortcuts
See also Repository Guide
as business components 404
creating 25
Index
521
in mapplets 293
Simple Pass Through mapping
creating 435
customizing 437
description 432
overview 435
repository objects created 435
session options 437
single-occurring element (XML)
overview 132
Slowly Changing Dimensions Wizard
creating targets for 484
description 433
scheduling sessions 485
sources 434
Type 1 Dimension mapping 444
Type 2 Dimension/Effective Date Range mapping
433, 468
Type 2 Dimension/Flag Current mapping 433, 460
Type 2 Dimension/Version Data mapping 433, 451
Type 3 Dimension mapping 433, 476
Slowly Growing Target mapping
creating 439
description 432
handling keys 439
overview 439
repository objects created 439
session options 443
snowflake schema
definition 412
Source Analyzer
editing source definitions 50, 51
importing source definitions 47
usage for 2
source definitions
adding to mappings 231
changing database type 51
COBOL 58
connecting to ports 230
editing COBOL 58
editing fixed-width 103
editing relational 51
for mapping wizards 434
importing delimited flat file 112
importing Microsoft Excel 63
importing relational 47
in mapplets 293
overview 44, 92
previewing data 369
re-importing 52
renaming 51
522
Index
T
tables
See also target definitions
See also target tables
options 7
Target Data
window 2
target definitions
adding columns 84, 107
adding to mappings 231
connecting to ports 230
creating 74
creating from source definitions 74
creating indexes 84
creating keys 80
creating new 77
creating, overview 70
editing relational 78
generating target tables from 86
importing relational targets 72
overview, relational 70
previewing data 369
renaming 79
setting options 78
special character handling 71
troubleshooting 89
updating, relational 79
target instance
pre- and post-session SQL 241
target load order
comparing across mappings 390
setting 244
when using a Joiner transformation 245
target SQL override
overview 237
target tables
creating 86
previewing data 369
recreating 88
target update override
overview 237
using with Joiner transformations 245
Index
523
overriding 276
overview 276
session 276
Terse 276
Verbose Data 276
Verbose Init 276
transformation data
monitoring 352
transformation datatypes
comparing to COBOL 503
comparing to flat file 504
comparing to IBM DB2 500
comparing to Informix 500
comparing to ODBC 502
comparing to Oracle 495
comparing to SQL Server 498
list of 489
Microsoft SQL Server 496
overview 488
Transformation Developer
usage for 2
transformation language
See also Transformation Language Reference
transformations
See also active transformations
See also connected transformations
See also passive transformations
See also unconnected transformations
active and passive 252
adding to mappings 254
comparing 249, 382, 392
connected 252
connecting 277
copying 26
creating 254, 277
definition 252
descriptions 252
handling errors 272
in mapplets 293
Input transformation 300
making reusable 287
metadata extensions in 30
Output transformation 300
overview 252
promoting to reusable 287
reusable transformations 285
reusing in mapplets 292
Simple Pass Through mapping 436
Slowly Growing Target mapping 440
toolbar 13
tracing levels 276
524
Index
U
Update Strategy transformation
use with Target Update option 245
updating
flat file source definitions 103
modifying SQL statement 238
relational source definitions 50
relational targets 79
rules for target updates 239
targets 245
upgrading
See Installation and Configuration Guide
URL
adding through business documentation links 260
V
valid XML groups
rules 144
Validate button
transformations 275
validating
default values 275
expressions 260
mappings 246
mapplets 297
values
mapping variables 315
variable ports
See also ports
overview 261
variables
capturing stored procedure results 262
initializations 263
mappings 307
overview 261
port evaluation order 263
variance
See also Transformation Language Reference
Verbose Data tracing level
overview 276
Verbose Init tracing level
overview 276
versions
reverting to previous mappings 226
view
business documentation 42
full screen 22
metadata for cubes and dimensions 427
View toolbar
overview 12
viewing
source column dependencies 228
W
Warehouse Designer
creating cubes and dimensions in 412
usage for 2
using 70
web links
adding to expressions 260
webzine xxxiii
wizards
Cube Wizard 420
Flat File Wizard 93
Getting Started Wizard 432
overview of mapping types 432
Slowly Changing Dimensions Wizard 433
word storage
COBOL 59
Workflow Manager
See also Workflow Administration Guide
Workflow Monitor
monitoring Debugger 357
workspace
full screen view 22
iconizing 20
navigating 17
printing 24
restoring 20
searching 17
usage for 2
zoom 22
workspace objects
iconizing 20
restoring 20
X
XML
attributes 212
character encoding 164
Index
525
526
Index
Z
zoom 22
Index
527
528
Index