You are on page 1of 36

FME Extension for Informatica Tutorial

Safe Software Inc. makes no warranty either expressed or implied, including, but not limited to, any implied warranties of
merchantability or fitness for a particular purpose regarding these materials, and makes such materials available solely on
an “as-is” basis.
In no event shall Safe Software Inc. be liable to anyone for special, collateral, incidental, or consequential damages in
connection with or arising out of purchase or use of these materials. The sole and exclusive liability of Safe Software Inc.,
regardless of the form or action, shall not exceed the purchase price of the materials described herein. This manual
describes the functionality and use of the software at the time of publication. The software described herein, and the
descriptions themselves, are subject to change without notice.

Copyright
© 2008 Safe Software Inc. All rights are reserved.
Revisions
Every effort has been made to ensure the accuracy of this document. Safe Software Inc. regrets any errors and omissions
that may occur and would appreciate being informed of any errors found. Safe Software Inc. will correct any such errors and
omissions in a subsequent version, as feasible. Please contact us at:
Safe Software Inc.
Fax: 604-501-9965
docs@safe.com
www.safe.com

Safe Software Inc. assumes no responsibility for any errors in this document or their consequences, and reserves the right
to make improvements and changes to this document without notice.

Trademarks
FME is a registered trademark of Safe Software Inc. Informatica and PowerCenter are registered trademarks of Informatica
Corporation. All brand or product names are trademarks or registered trademarks of their respective companies or
organizations.

Document Name: FME Extension for Informatica Tutorial


Version: FME 2008
March 2008
S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Contents
Getting Started.................................................................................................................................................... 1
Install FME Extension .................................................................................................................................... 1
License FME Extension .................................................................................................................................. 1
Configure FME Extension ............................................................................................................................... 1
Extend with FME Administrator ............................................................................................................... 1
Register FME Extension in Repository Server ............................................................................................ 2
Install Samples ............................................................................................................................................ 2
Basic Concepts............................................................................................................................................. 6
Specify Inputs and Outputs for the FME Transformation ............................................................................. 6
Specify FME Workspace Service for the FME Transformation ....................................................................... 6
Configure FME Workspace in FME Workbench ........................................................................................... 6

Section 1 ............................................................................................................................................................. 7

Transformation with FME Source and FME Target ............................................................................................... 7


Objective .................................................................................................................................................... 7
Mapping...................................................................................................................................................... 7
Create Mapping .................................................................................................................................... 7
Create FME Transformation .................................................................................................................... 7
Create Source ...................................................................................................................................... 9
Create Target......................................................................................................................................10
Create Link between Source and Transformation ......................................................................................10
Create Link between Transformation and Target ......................................................................................11
Save Mapping .....................................................................................................................................11
Workspace Service ......................................................................................................................................11

Contents iii
S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Sample FME Workspace Service.............................................................................................................11


Workflow ...................................................................................................................................................11
Create Workflow..................................................................................................................................11
Create Workflow Task ..........................................................................................................................12
Create Workflow Link ...........................................................................................................................12
Configure Task ....................................................................................................................................12
Save Workflow ....................................................................................................................................13
Run Workflow .....................................................................................................................................13
Check Results .....................................................................................................................................13

Section 2 ........................................................................................................................................................... 14

Transformation with Informatica Source and Informatica Target ..................................................................... 14


Objective ...................................................................................................................................................14
Mapping.....................................................................................................................................................14
Create Source .....................................................................................................................................14
Create Target......................................................................................................................................15
Create Mapping ...................................................................................................................................15
Create FME Transformation ...................................................................................................................16
Create Link between Source and Transformation ......................................................................................16
Create Link between Transformation and Target ......................................................................................17
Save Mapping .....................................................................................................................................17
Workspace Service ......................................................................................................................................17
Sample FME Workspace Service.............................................................................................................17
Workflow ...................................................................................................................................................18
Create Workflow..................................................................................................................................18
Run Workflow .....................................................................................................................................18
Check Results .....................................................................................................................................18

Contents iv
S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Section 3 ........................................................................................................................................................... 19

Transformation with Informatica Source and FME Target ................................................................................. 19


Objective ...................................................................................................................................................19
Mapping.....................................................................................................................................................19
Create Mapping ...................................................................................................................................19
Save Mapping .....................................................................................................................................21
Workspace Service ......................................................................................................................................21
Sample FME Workspace Service.............................................................................................................21
Workflow ...................................................................................................................................................21
Create Workflow..................................................................................................................................21
Run Workflow .....................................................................................................................................22
Check Results .....................................................................................................................................22

Section 4 ........................................................................................................................................................... 23

Transformation with FME Source and Informatica Target ................................................................................. 23


Objective ...................................................................................................................................................23
Mapping.....................................................................................................................................................23
Create Mapping ...................................................................................................................................23
Save Mapping .....................................................................................................................................24
Workspace Service ......................................................................................................................................24
Sample FME Workspace Service.............................................................................................................24
Workflow ...................................................................................................................................................25
Create Workflow..................................................................................................................................25
Run Workflow .....................................................................................................................................25
Check Results .....................................................................................................................................25

Appendix ........................................................................................................................................................... 26

Contents v
S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

FME Workbench................................................................................................................................................. 26
Opening FME Workbench ..............................................................................................................................26
Importing an FME Source And FME Destination ................................................................................................26
Importing an Informatica Source and Destination ............................................................................................27
Export Informatica Mapping ..................................................................................................................27
Add Informatica Source ........................................................................................................................28
Add Informatica Destination ..................................................................................................................29

Tips and Troubleshooting .................................................................................................................................. 30

Contents vi
S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Getting Started
The FME® Extension for Informatica extends Informatica®
PowerCenter® with spatial data integration capabilities.
License FME Extension
This document contains all the information you need to An FME Extension for Informatica license is required. Once
start evaluating the FME Extension for Informatica. The licensed, the FME Extension for Informatica will be an
common tasks that a PowerCenter user would perform option available from the FME Administrator.
using the FME Extension are described and sample
mappings, workspaces and data have been provided.
Steps on how to create various FME workspaces with Configure FME Extension
Informatica and FME sources and destinations are
described in the appendices. For detailed instruction in Informatica 7.x
FME please contact Safe Software about the Introduction
to FME course. Extend with FME Administrator

Install FME Extension 1. Open the FME Administrator from Start > All Programs
> FME > FME Adminstrator. Extend the FME
Before you get started, you will need the following Extension for Informatica PowerCenter Server by
software installed and licensed on the evaluation selecting it in the Applications list and clicking on the
computer: Extend button. Do the same for the FME Extension for
Informatica PowerMart Client. The Current State for
• Informatica PowerCenter 7.x, or 8.x each Application should read Extended.
• FME 2007 Build 4102 or higher

Please refer to the Informatica PowerCenter installation


documentation for instructions on installing and licensing
PowerCenter. For information on installing and licensing
FME, please refer to the FME Tutorial which can be
downloaded at http://www.safe.com/downloads.

Getting Started 1
S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

5. On the Register Plugin screen, select the repository on


2. Click Close to dismiss the FME Administrator. which to register the plug-in. In this example we
already have a repository called FME. Enter a
username and password and select OK.
Register FME Extension in Repository Server

3. Open the Informatica Repository Server


Administration Console. Expand the Informatica
Repository Servers node and select the Repository
Server. Right-click and click on Connect. Enter the
connection information and click on OK.

6. Expand the Repositories node, then expand the


repository on which the plug-in was registered.
Expand the Registered Packages node under the FME
node. Click on FME and confirm that FME
4. Using Windows Explorer, browse to the FME Configuration and FME Transformation are registered.
installation directory, then to \application_
extenders\informatica\powercenter7\ and locate the
file fmeintegration.xml. Copy the file into the
Informatica installation directory under
\RepositoryServer\bin\Plugin\. After this is complete,
Return to the Repository Server Administration
Console and click on the Available Packages node.
Right-click on the newly-copied fmeintegration.xml
and select Register.

Informatica 8.x

Extend with FME Administrator


1. Open the FME Administrator from Start > All Programs
> FME > FME Adminstrator.

Getting Started 2
S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

8. Select Yes when asked to Restart Repository Service

2. Select FME Extension for Informatica PowerCenter


Server 8 and click Extend

3. Select FME Extension for Informatica PowerMart Client 9. Choose Complete or Abort (depending on your
8 and click Extend preferences)

Register FME Extension with Admin Console

4. You will also have to register the plug-in in the


repository service. Select Launch Admin Console from
Start > All Programs > Informatica PowerCenter 8 >
Services > Launch Admin Console.

5. Select the repository service in the sidebar

6. Under General Properties click Edit 10. If the service is not automatically re-enabled, click
Enable to restart it once it has been stopped.
7. Change OperatingMode to Exclusive, and then click OK
11. Select the Plug-ins tab and click Register Repository
Service plug-in

Getting Started 3
S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

13. Enter the Repository Username and Password and


click OK

14. A log of the action should appear. You can choose to


Save this log, or just Close

12. Click Browse and navigate to C:\Program Files\FME


(or the directory you installed FME in), then go to
\application_extenders\informatica\powercenter8\ and
select fmeintegration.xml.

15. The plug-in should now be installed and you should


see it in the list of Registered plug-ins and security
modules

Getting Started 4
S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Install Samples

Mappings, workspaces and sample data have been


provided for this guide. It’s recommended that these are
installed if you plan to try out the examples in this guide.

1. Go back to the Properties tab (or select the repository All FME workspaces and data have been provided in the
service again) and Edit the General Properties to zip file TutorialData.zip. This guide assumes that the
change the OperatingMode back to Normal and contents of this zip file are extracted to the C drive,
complete the process. creating the following directories under
C:\InformaticaDemoWorkspaces:

ƒ FMESourceAndFMEDestination
ƒ FMESourceAndInformaticaDestination
ƒ InformaticaSourceAndFMEDestination
ƒ InformaticaSourceAndInformaticaDestination

An Access database has been provided (C:\Informatica


DemoWorkspaces\TestData.mdb) that contains a table
called Addresses. Import this database into SQL Server
using the SQL Server Management Studio. First create
the TestData database by clicking on Databases > New
Database. Then, right-click on the database and go to
Tasks > Import Data and follow the instructions in the
SQL Server Import and Export wizard to import the data
into the TestData database. Please contact your database
administrator if you need assistance with this step.

Getting Started 5
S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Basic Concepts Configure FME Workspace in FME Workbench


In FME Workbench, you can configure the FME Workspace
to read and write from Informatica formats, read and
write from over 100 supported FME spatial formats,
After installing and licensing the required software, you
transform data with over 150 FME spatial transforms,
can start to design mappings in PowerCenter that utilize
visualize spatial data in the FME Universal Viewer, and
the capabilities of the FME Extension.
many other things.

For more detailed information on using FME, please refer


Specify Inputs and Outputs for the FME
to the FME Tutorial or Introduction to FME course.
Transformation
Normally from within the PowerCenter Designer, you will
begin by creating a mapping and configuring an FME
Transformation by specifying all the available input and
output groups, and the associated input and output ports.

Specify FME Workspace Service for the FME


Transformation
Once you’ve done that, you need to specify property
values to associate the FME Transformation with an FME
Workspace service. The FME Workspace service is
represented on the file system as a folder containing an
FME Workspace file. FME Workspace files can be easily
identified with the extension .fmw and can be opened with
the FME Workbench Spatial ETL designer.

Getting Started 6
S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Section 1
Transformation with FME Source and FME Target

Objective 3. Click on Mappings > Create to create a new mapping.


Call this mapping FMESourceAndDestination.
In this example we will create an Informatica mapping
that has an FME Transformation that reads from an FME
spatial format and writes to an FME spatial format. In
particular, the FME Transformation will read from the ESRI
Shape format, apply a transform that counts the number
of rows, and write to the MapInfo TAB spatial format.
Since both are spatial formats, this is an example of
creating a pure spatial data flow within Informatica. Create FME Transformation

4. Click on the FME Transformation tool on the toolbar


and click once on the canvas to add the FME
Mapping Transformation to the canvas.

Create Mapping
1. Open the Informatica PowerCenter Designer and
connect to your repository.

2. Click on Tools > Mapping Designer to bring up the


Mapping Designer canvas.

Section 1: Transformation with FME Source and FME Target 7


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

9. Click on the Add a new port to this transformation tool


again to add a new output port named Terminate.

Note: In this example, we are creating an FMEInit and


FMETerminate group to pass in a single row from a flat file
to simply initialize and terminate the FME Transformation
because a transform in a PowerCenter mapping requires
an Informatica Source and Informatica Target to execute.

When the reserved FMEInit input group name is used, the


5. Double-click (or right-click and select Edit) to bring up FME Transformation ignores all input data and only utilizes
the Edit Transformations screen. Click on the Ports it to initialize the FME Transformation. When the reserved
tab. FMETerminate output group is specified, the FME
Transformation sends a 1 character row to signal the
completion of the FME Transformation so that downstream
components can execute. If data from an Informatica
Source is to be used, then FMEInit should not be used.

10. At this point, the Edit Transformations dialog should


appear as follows:

6. Click on the Create Input Group tool to add a new


Input Group. Call it FMEInit.

7. Select the Add a new port to this transformation tool


to add a new input port named Init. Accept the
default values for the other columns.
An FME Transformation must point to an FME
8. Click on the Create Output Group tool to add a new workspace. The workspace for this mapping is called
Output Group named FMETerminate. demo.fmw and resides in C:\InformaticaDemoWorksp

Section 1: Transformation with FME Source and FME Target 8


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

aces\FMESourceAndFMEDestination. To refer to this Create Source


workspace, first click on the Metadata Extensions tab.
Click once on the Value field for the Workspace
12. The FME Transformation must be launched. In order
Directory extension. Click once on the arrow and
to do this Informatica will read a text file called
enter the path to the larger directory holding all of the
FMEInit.txt, which contains one line (“StartFME”) that
FME workspaces (C:\InformaticaDemoWorkspaces\).
spawns FME. We must import this file as a source.
Click on Tools > Source Analyzer to bring up the
Source Analyzer canvas. Click on Sources > Import
from File and navigate to C:\InformaticaDemoWorksp
aces\FMESourceAndFMEDestination\SourceData, then
select Files of Type: All Files (*.*). Select FMEInit.txt
and click OK. The Flat File Import Wizard is launched:

11. The Workspace Service is analogous to the folder


containing the FME workspace to be executed in this
particular mapping. Enter a value of
FMESourceAndFMEDestination under the Workspace
Service’s Value column. Click OK. The FME
Transformation has now been configured:

Section 1: Transformation with FME Source and FME Target 9


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

13. Click Next to go to Step 2, then again to go to Step 3.


The column name can be anything, but we will call it
Init with a Length/Prec. of 10.e Click Finish to proceed.

Create Link between Source and Transformation

15. Go back to the Mapping Designer by clicking on Tools


Create Target > Mapping Designer. We will now connect our source
file to the FME Transformation container. Drag the
FMEInit source from the Sources > Flat File node in
14. The FME Transformation must also be terminated in
the Repository Navigator to the canvas. Connect the
the same fashion it was launched. We will have
Init field of the Source Qualifier to the Init field in the
Informatica read a text file called FMETerminate.txt,
FME Transformation as shown below.
which contains one line (“endFME”) that terminates
FME. We will import this file as a target. In
Informatica 7.x click on Tools > Warehouse Designer
to bring up the Warehouse Designer canvas. In
Informatica 8.x click on Tools > Target Designer to
bring up the Target Designer canvas. Click on Targets
> Import from File and navigate to C:\Informatica
DemoWorkspaces\FMESourceAndFMEDestination\Outp
ut, then select Files of Type: All Files (*.*). Select
FMETerminate.txt and click OK. The Flat File Import
Wizard is launched. Continue clicking on Next until
Step 3. Enter Terminate for the name of the column
with a Length/Prec. of 10.

Section 1: Transformation with FME Source and FME Target 10


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Create Link between Transformation and Target

Workspace Service
16. Now connect the target file to the FME Transformation
container. Drag the FMETerminate target from the
Targets folder in the Repository Navigator to the Sample FME Workspace Service
canvas. Connect the Terminate field of the FME
Transformation container to the Terminate field of 1. A sample FME workspace service has been provided
FMETerminate container. for this example. Please refer to the Install Samples
section in the Getting Started section.

2. If you followed the instructions in the Install Samples


section, you should have a folder called
C:\InformaticaDemoWorkspaces\FMESourceAndFMEDe
stination which represents the FME Workspace Service.
This folder contains an FME workspace which contains
an FME source and FME destination. For more
information on how to import an FME source and FME
17. Rearrange the icons by right-clicking on the canvas destination, please refer to the Appendix. To view the
and selecting Arrange All Iconic. FME Workspace, double click on the FME Workspace
demo.fmw file to automatically open it in FME
Workbench. This workspace takes city parks data in
ESRI Shape format, calculates the area of each park,
tests for parks greater than 250,000 sq. ft and writes
them out to MapInfo TAB format.

Save Mapping
Workflow
18. A mapping that uses an FME Source and an FME
Destination has now been configured. Save the Create Workflow
repository by clicking on Repository > Save.

1. This mapping can be run by creating a workflow in the


Workflow Manager. Start the Informatica Workflow
Manager in Informatica 7.x or PowerCenter Workflow
Manager in Informatica 8.x and connect to your

Section 1: Transformation with FME Source and FME Target 11


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

repository. In the Workflow Manager click once on the Tasks > Link Task, then drag the cursor from the Start
folder under your repository in the Repository icon to the FMESourceAndFMEDestination session:
Navigator. Click on Tools > Workflow Designer to
bring up the Workflow Designer canvas. Click on
Workflows > Create to bring up the Create Workflow
screen. Call the new workflow MyWorkflow and click
OK:

Configure Task

5. Now configure the task. Double-click on the


Create Workflow Task FMESourceAndFMEDestination task to bring up the Edit
Tasks screen. In the Mapping tab select SQ_FMEInit
2. Click on Tools > Task Developer, then Tasks > Create. under the Sources folder. Under Properties, set the
In the Create Task screen enter FMESourceAndFME Source File Directory to where FMEInit.txt resides
Destination for the name of the new task. Click on (C:\InformaticaDemoWorkspaces\FMESourceAndFMED
Create. estination\SourceData\). Set the source filename to
FMEInit.txt (if necessary). Click OK.

3. Select the FMESourceAndDestination mapping to


associate with this session. Click OK, then Done.

Create Workflow Link

4. Click on Tools > Workflow Designer. Drag the


FMESourceAndFMEDestination from the Sessions folder
in the Repository Navigator to the canvas. Click on

Section 1: Transformation with FME Source and FME Target 12


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Save Workflow Task Update: MyWorkflow (Succeeded) Start time: 2008-03-28 9:30:23
AM End time: 2008-03-28 9:30:39 AM

6. Click on Repository > Save to first save the Repository


in the Workflow Manger.
Check Results

Run Workflow 9. Verify that the translation was successful by checking


two things:
7. Right-click on the canvas and click Start Workflow.
The Informatica PowerCenter Workflow Monitor First, right-click on the FMESourceAndFMEDestination
appears. task in the Workflow Monitor and click on Get Session
Log. In the log scroll to the *****START LOAD
8. When the Workflow has executed a Status of SESSION*****. A few lines below this should be the
Succeeded should appear as shown below. (You may following line:
need to connect to the repository and the service and
restart the workflow) =======================================================
DLL Logged Msg: FME: Completed successfully for custom
transformation: 'FME'
=======================================================

Second, navigate to C:\InformaticaDemoWorkspaces\


FMESourceAndFMEDestination\Output in Windows
Explorer and verify that the MapInfo TAB data was
written. Four files should exist: city_parks_big.dat,
Keep an eye on the log window. The final message city_parks_big.id, city_parks_big.map and
will say something similar to: city_parks_big.tab.

Section 1: Transformation with FME Source and FME Target 13


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Section 2
Transformation with Informatica Source and
Informatica Target

Objective
In this section we will create a mapping that has an FME
Transformation that transforms data from an Informatica
Source and then outputs the transformed data to an
Informatica Target.

Mapping

Create Source

1. Set up a connection to the TestData SQL Server 2. Open the Informatica PowerCenter Designer if it is not
database. Open the Informatica Workflow Manager in already open. Connect to your repository.
Informatica 7.x or PowerCenter Workflow Manager in
Informatica 8.x and connect to your repository. Click 3. Expand your folder and click on Tools > Source
on Connections > Relational to open the Relational Analyzer to bring up the Source Analyzer canvas.
Connection Browser. For Select Type, select Microsoft
SQL Server. Click the New button to open the 4. Add an Informatica source by clicking on Sources >
Connection Object Definition screen. Fill in the Import from Database to bring up the Import Tables
parameters for your SQL Server connection to the screen. Connect to the TestData (SQLServer) ODBC
TestData database. An example is shown below. data source. Select the dbo.Addresses table and click
on OK to add the metadata to the Source Analyzer
canvas.

Section 2: Transformation with Informatica Source and Informatica Target 14


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Create Mapping

6. Now that the Informatica source and destination have


been added it is time to create the mapping. Click on
Tools > Mapping Designer. Click on Mappings >
Create Target Create to bring up the New Mapping screen. Enter
InformaticaSourceAndInformaticaDestination as the
name of the new mapping.
5. In Informatica 7.x click on Tools > Warehouse
Designer. In Informatica 8.x click on Tools > Target
Designer. Add an Informatica destination by clicking
on Targets > Import from Database to bring up the
Import Tables screen. Again, connect to the TestData
(SQLServer) ODBC data source. Select dbo.Output_
Addresses (you may need to create this table in 7. Navigate to the Sources folder in the Repository
SQLServer first. It should have the same schema as Navigator and drag the Addresses source onto the
the source Addresses table). Click OK to add the canvas. Do the same for the Output_Addresses
metadata to the canvas. metadata in the Targets folder.

Section 2: Transformation with Informatica Source and Informatica Target 15


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Create FME Transformation

8. Click on the FME Transformation tool and click once


on the canvas to add an FME Transformation container
to the canvas.

9. Double-click (or right-click and select Edit) to bring up


the Edit Transformations screen. Click on the
Metadata Extensions tab. Click once on the Value field
for the Workspace Directory extension. Click on the
arrow and enter the path holding all the FME
13. These fields really need to be under the AddressesIn
workspaces (C:\InformaticaDemoWorkspaces\).
port. To move these fields to the AddressesIn port,
bring up the Edit Transformation screen by double-
10. For the Workspace Service enter InformaticaSource
clicking on the FME Transformation container. Click on
AndInformaticaDestination. This folder contains a
the Ports tab and select the AddressesOut row. Click
workspace called demo.fmw. Click OK, then OK again.
on the Move the Selected Port Down tool and
continue clicking until AddressesOut is below the
11. Now configure the input and output groups for the FME
Longitude field.
Transformation. Double-click on the FME
Transformations container to bring up the Edit
Transformations screen. Click on the Ports tab, then
on the Create Input Group tool . Name the Input
Group AddressesIn. Click on the Create Output Group
tool and name the Output Group AddressesOut (the
input and output groups appear as “feature types” in
FME). Click OK.

Create Link between Source and Transformation

12. Select all the fields in SQ_Addresses and drag them


underneath the AddressesOut section in the FME
Transformation container to connect them.

Section 2: Transformation with Informatica Source and Informatica Target 16


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Create Link between Transformation and Target

14. The output port will contain the same schema as the
input for this simple transformation. In the Ports tab
of the Edit Transformation screen, copy each field
and paste them underneath the AddressesOut port,
then checkmark the O (output) column for each and
uncheck the I (input) column (the output column
needs to be checked before the input column is
unchecked). Also make sure to add a “1” to the end of
each port name so that there is no duplication. Click
OK.
Save Mapping

16. Save the Repository by clicking on Repository > Save.

Workspace Service

Sample FME Workspace Service

15. On the Mapping Designer canvas, the SQ_Addresses 1. A sample FME workspace service has been provided
fields have already been mapped to the input ports of for this example. Please refer to the Install Samples
the FME Transformation. Now select the AddressesOut section in the Getting Started section.
fields and map them to the input ports of the
Output_Addresses container. 2. If you followed the instructions in the Install Samples
section, you should have a folder called C:\Informatica
DemoWorkspaces\InformaticaSourceAndInformatica
Destination which represents the FME Workspace
Service. This folder contains an FME workspace which
contains an Informatica source and Informatica

Section 2: Transformation with Informatica Source and Informatica Target 17


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

destination. For more information on how to import an InformaticaSourceAndInformaticaDestination session


Informatica source and Informatica destination, please onto the canvas. Link the session to the Start arrow
refer to the Appendix. To view the FME Workspace, using Tasks > Link Task.
double click on the FME Workspace demo.fmw file to
automatically open it in FME Workbench. This
workspace takes the AddressesIn Informatica source,
sorts the records by city (in ascending order), then
writes them to the AddressesOut Informatica
destination.

4. Save the repository by clicking Repository > Save.


Workflow
Run Workflow

Create Workflow
5. Right-click on the canvas and select Start Workflow. A
Status of Succeeded should appear in the Workflow
1. Create a new workflow to run this mapping in the Monitor for this workflow.
Workflow Manager. Open the Workflow Manager and
connect to your repository.
Check Results
2. Click on Tools > Task Developer, then Tasks > Create.
In the Create Task screen enter InformaticaSourceAnd
6. Verify the translation was successful by checking the
InformaticaDestination for the name of the new task.
session log. Right-click on the InformaticaSourceAnd
Click Create. Select the InformaticaSourceAnd
InformaticaDestination task in the Workflow Monitor
InformaticaDestination mapping to associate with the
and click on Get Session Log. In the log scroll to the
session. Click Done.
SESSION LOAD SUMMARY section. Verify that 661
rows were affected in the Source Load Summary and
3. Click on Tools > Workflow Designer. From the
661 rows were affected in the Target Load Summary.
Sessions folder in the Repository Navigator, drag the

Section 2: Transformation with Informatica Source and Informatica Target 18


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Section 3
Transformation with Informatica Source and FME
Target

Objective 3. Select Mappings > Copy As and type in Informatica


SourceAndFMEDestination for the name of the new
mapping.
In this section we will create a mapping that has an FME
Transformation that transforms data from an Informatica 4. Right-click on the canvas and select Arrange All Iconic:
Source and then outputs the transformed data to an FME
destination. This example begins by modifying the
mapping from Section 2.

Mapping
Informatica 7.x Icons
Create Mapping

1. Open the Designer. We will use one of the existing


mappings (InformaticaSourceAndInformatica
Destination) and modify it to use an FME destination.

2. Select Tools > Mapping Designer. If the Informatica


SourceAndInformaticaDestination is not shown on the Informatica 8.x Icons
canvas, drag it onto the canvas from the Mappings
folder in the Repository Navigator.

Section 3: Transformation with Informatica Source and FME Target 19


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

5. Select and delete the Output_Addresses (Microsoft


SQL Server) container since we will be replacing this
Informatica target with an FME target.

Informatica 7.x Icons

7. Drag FMETerminate from the Targets folder in the


Repository Navigator onto the canvas. This will
terminate the FME Transformation, so place it after the
FME Transformation container and connect them
together through the Terminate column.
Informatica 8.x Icons

6. Double-click on the FME Transformation container,


then double-click again to bring up the Edit
Transformations screen. Navigate to the Ports tab and
delete all but one (it does not matter which one) of the
rows listed under AddressesOut. Since we are writing
out to FME, change AddressesOut to FMETerminate.
Rename the remaining port to Terminate and set its
precision to 10. 8. Double-click on the FME Transformation container
again and click on the Metadata Extensions tab.
Change the Workspace Service to reflect the folder the
workspace for this section resides in (Informatica
SourceAndFMEDestination). Click OK, then OK again.

Section 3: Transformation with Informatica Source and FME Target 20


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

demo.fmw file to automatically open it in FME


Workbench. This workspace takes the AddressesIn
data from Infomatica, creates points using the latitude
and longitude columns, then writes them out to ESRI
Shape format.

Workflow
Create Workflow

Save Mapping 1. Open the Workflow Manager. Create a new task for
this mapping. Click on Tools > Task Developer, then
Tasks > Create. In the Create Task screen enter
9. In the Designer, click on Repository > Save to save
InformaticaSourceAndFMEDestination for the name of
the new mapping.
the new task. Click on Create. Select the Informatica
SourceAndFMEDestination mapping to associate with
Workspace Service the session. Click OK, then Done.

2. Click on Tools > Workflow Designer. From the


Sample FME Workspace Service
Sessions folder in the Repository Navigator, drag the
InformaticaSourceAndFMEDestination session onto the
1. A sample FME workspace service has been provided canvas.
for this example. Please refer to the Install Samples
section in the Getting Started section. 3. Rather than linking this session to the Start arrow, we
will chain all three sessions together. Link this session
2. If you followed the instructions in the Install Samples to the FMESourceAndFMEDestination session. Delete
section, you should have a folder called the existing link between this latter session and the
C:\InformaticaDemoWorkspaces\InformaticaSource Start arrow.
AndFMEDestination which represents the FME
Workspace Service. This folder contains an FME 4. Create a link between the InformaticaSourceAnd
workspace which contains an Informatica source and InformaticaDestination session and the FMESource
FME destination. For more information on how to AndFMEDestination session.
import an Informatica source and FME destination,
please refer to the Appendix. To view the FME
Workspace, double click on the FME Workspace

Section 3: Transformation with Informatica Source and FME Target 21


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Workspaces\InformaticaSourceAndFMEDestination\Out
put\AddressesIn.shp for Dataset. The points are
displayed in the Universal Viewer:

5. Click on Repository > Save.

Run Workflow

6. Start the workflow by right-clicking on the canvas and


selecting Start Workflow.

7. Each task is run in succession in the Workflow Monitor.

Check Results

8. When all three tasks have succeeded executing, verify


that the output files were created in C:\Informatica
DemoWorkspaces\InformaticaSourceAndFMEDestinatio
n\Output. There should be three files here:
AddressesIn.shp, AddressesIn.shx and
AddressesIn.dbf. To view the ESRI Shape data open
the FME Universal Viewer (Start Menu > All Programs
> FME > FME Universal Viewer). Click on File > Open
Dataset. In the Select Dataset to View screen enter
ESRI Shape for Format. Enter C:\InformaticaDemo

Section 3: Transformation with Informatica Source and FME Target 22


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Section 4
Transformation with FME Source and Informatica
Target

Objective an FME source. Begin by removing the existing


Infomatica source containers (Addresses and
SQ_Addresses).
In this section we will create a mapping that has an FME
Transformation that transforms data from an FME source 4. From the Sources folder in the Repository Navigator,
and then outputs the transformed data to an Informatica drag the FMEInit source onto the canvas.
destination. This example begins by modifying the
mapping from Section 2.

Mapping
Create Mapping
Informatica 7.x Icons
1. In the Designer, click Tools > Mapping Designer. Drag
the InformaticaSourceAndInformaticaDestination
mapping onto the canvas from the Mappings folder in
the Repository Navigator.

2. Click on Mappings > Copy As and name the new


Informatica 8.x Icons
mapping FMESourceAndInformaticaDestination.
5. Double-click on the FME Transformation container to
3. There is already an Informatica target in this mapping
bring up the Edit Transformations screen. Click on the
(AddressesOut); the source needs to be modified to be
Ports tab. Remove all but one of the ports underneath

Section 4: Transformation with FME Source and Informatica Target 23


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

the AddressesIn group. Rename the remaining port to


Init (with a data type of string and a precision of 10).
Also rename the AddressesIn port to FMEInit.

9. Click on the Metadata Extensions tab. The Workspace


Directory is already set. Change the Workspace
Service to FMESourceAndInformaticaDestination. Click
OK.

Save Mapping

10. Save the repository by clicking Repository > Save.


6. Click OK to close the Edit Transformations screen.

7. Link the Init column from SQ_FMEInit to the Init


column underneath the FMEInit port of the FME
Workspace Service
Transformation.

Sample FME Workspace Service

1. A sample FME workspace service has been provided


for this example. Please refer to the Install Samples
section in the Getting Started section.

2. If you follow the instructions in the Install Samples


section, you should have a folder called
C:\InformaticaDemoWorkspaces\ FMESourceAnd
8. Double-click the FME Transformation again to bring up InformaticaDestination which represents the FME
the Edit Transformations screen. Rename the Workspace Service. This folder contains an FME
transformation and call it FMESourceAndInformatica workspace which contains an FME source and
Destination. Informatica destination. For more information on how
to import an FME source and Informatica destination,
please refer to the Appendix. To view the FME

Section 4: Transformation with FME Source and Informatica Target 24


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Workspace, double click on the FME Workspace the Mapping tab select SQ_FMEInit under the Sources
demo.fmw file to automatically open it in FME folder. Under Properties, set the Source File Directory
Workbench. This workspace takes some NJ and NY to C:\InformaticaDemoWorkspaces\FMESourceAnd
address data in CSV format, filters out the NJ address InformaticaDestination\SourceData\. Set the Source
records and writes them out to Informatica. Filename to FMEInit.txt (if necessary). Click OK.

4. Click on Repository > Save.

Workflow Run Workflow

5. Right-click on the canvas and select Start Workflow.


Create Workflow Wait for all the sessions to finish executing in the
Workflow Monitor.
1. Now create a workflow in the Workflow Manager for
this new mapping. Open the Workflow Manager and
Click Tools > Task Developer. Click on Tasks > Create
and name the new task FMESourceAndInformatica
Destination, then click Create. Select the FMESource
AndInformaticaDestination mapping, then click Done.

2. Click on Tools > Workflow Designer. Drag the


FMESourceAndInformaticaDestination session from the
Sessions folder in the Repository Navigator onto the Check Results
canvas. Link this session to the InformaticaSourceAnd
FMEDestination session.

6. When the FMESourceAndInformaticaDestination


session has succeeded, right-click on the session and
select Get Session Log. Navigate to the bottom of the
log (Session Load Summary) to confirm that rows
were written to Output_Addresses.

MAPPING> TM_6253 Target Load Summary.


MAPPING> CMN_1740 Table: [Output_Addresses]
(Instance Name: [Output_Addresses])
3. Double-click on the FMESourceAndInformatica Output Rows [593], Affected Rows [593],
Destination task to bring up the Edit Tasks screen. In Applied Rows [593], Rejected Rows [0]

Section 4: Transformation with FME Source and Informatica Target 25


S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

Appendix
FME Workbench

For more detailed information, please refer to the FME


Tutorial at http://www.safe.com/downloads.

Opening FME Workbench


Start FME Workbench from Start > All Programs > FME >
FME Workbench.

Importing an FME Source And


FME Destination
1. Click on Open the Workspace Dialog then click on OK.
2. When the New Workspace screen appears, click on the
browse button next to Format under the Source
section. Navigate to ESRI Shape format in the
Formats Gallery, select it and click on OK.

Appendix 26
S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

3. For Dataset, navigate to C:\InformaticaDemo


Workspaces\FMESourceAndFMEDestination\SourceDat
a and select city_parks.shp

4. For the Destination format, select MapInfo TAB using


the browse button. Click OK.

Importing an Informatica
Source and Destination

Export Informatica Mapping

1. In order to use an Informatica source/destination in an


5. The ESRI Shape to MapInfo TAB translation is shown FME workspace, a mapping that uses an FME
on the canvas. Save the workspace. Transformation must first be exported from
Informatica. We will work with the InformaticaSource
AndInformaticaDestination mapping in this example.

From the Designer, export the InformaticaSourceAnd


InformaticaDestination mapping by navigating to this
folder under the Mappings folder in the Repository
Navigator, right-clicking and selecting Export Objects.

Appendix 27
S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

2. Save the XML to C:\InformaticaDemoWorkspaces\


InformaticaSourceAndInformaticaDestination\SourceD
ata\InformaticaSourceandInformaticaDestination.XML.

3. Click on Close when the Exported Objects screen


appears:

Informatica 7.x Repository Navigator

Add Informatica Source

1. Start FME Workbench from Start > All Programs > FME
> FME Workbench.

2. Click on Create a Blank Workspace then click on OK.

3. Add an Informatica source dataset. Click on Source


Data > Add Dataset to bring up the Add Source
dataset screen. Using the Browse button select
Informatica as the source format.

4. Click on the Settings button and enter C:\Informatica


DemoWorkspaces\InformaticaSourceAndInformaticaDe
stination\SourceData\Informatica_Source_and_Inform
Informatica 8.x Repository Navigator atica_Destination.XML for the metadata file. Click on
the Browse button next to Custom Transformation.

Appendix 28
S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

The name of the FME Transformation from the The two automatically published parameters are
mapping will be listed (“FME”) in the Informatica published with the names SourceHost_INFA and
Transformation List screen. Select this and click on SourcePortService_INFA. These names must not be
OK. changed or else the integration will not work.

Add Informatica Destination

1. Add a destination Informatica dataset. Click on


5. Click OK again in the Add Source Dataset screen. The Destination Data > Add Dataset. Select Informatica as
Informatica dataset, with the AddressesIn source from the destination format and click on OK. Click on No
the mapping, has been added to the canvas. when prompted to add a new feature type.

2. We will import the destination feature type


(AddressesOut). Click on Destination Data > Import
Feataure Type Definitions. Click on the Settings
button on the Import Feature Type Definitions screen.
When the Informatica Input Settings screen appears
notice the fields are already populated from the last
time (step 7). Click on OK, then OK again.
AddressesOut is added to the canvas.

3. At this point, any number of FME transformers can be


added between the source and destination to
6. Anytime an Informatica source is added, certain
transform the data. In C:\InformaticaDemo
Source parameters MUST be published. These are:
Workspaces\InformaticaSourceAndInformaticaDestinat
ion\demo.fmw a Sorter transformer has been added to
ƒ Source Dataset (must be published by right-
sort the data based on City name. For now, simply
clicking the parameter in the Navigation Pane and
connect the source AddressesIn feature type to the
clicking Publish Parameter)
destination AddressesOut feature type by connect the
ƒ Source Establishing Host (automatically published yellow arrow on the source the red arrow on the
by default) destination:
ƒ Source Port or Service to Use (automatically
published by default)

Appendix 29
S a f e S o f t w a r e I n c . F M E I n f o r m a t i c a T u t o r i a l

The two automatically published parameters are


published with the names DestHost_INFA and
DestPortService_INFA and these names must not be
changed or else the integration will not work.

6. Save the workspace. An FME workspace with an


Informatica source and an Informatica destination has
4. Notice the source and destination fields are not now been created.
connected. FME would have automatically mapped
them had the field names matched, but since they
don’t, manually connect each source field to the
corresponding destination field.

Tips and
Troubleshooting

5. Anytime an Informatica destination is added, certain


Destination parameters MUST be published. These 1. If a session with an Informatica source or an
are: Informatica destination fails check the session log for a
line similar to:
ƒ Destination Dataset (automatically published by
default) EP_13248 DLL Error Msg: FME: Failure due to
required parameter 'SourceHost_INFA' not
ƒ Destination Establishing Host published in FME workspace
ƒ Destination Port or Service to Use
This means that the parameters in the FME workspace
ƒ Destination Dataset (must be published by right- being executed were not properly published. Please
clicking the parameter in the Navigation Pane and refer to the Add Informatica Source and Add
clicking Publish Parameter) Informatica Destination sections in the Appendix for
ƒ Destination Establishing Host (automatically details on how and what source and destination
published by default) Informatica parameters to publish.

ƒ Destination Port or Service to Use (automatically


published by default)

Appendix 30

You might also like