0% found this document useful (0 votes)
179 views4 pages

Informatica PowerCenter - Flat Files

This document describes using Informatica PowerCenter to identify extra records between two flat file sources and load them into a target table. It involves importing the file definitions, creating a mapping with a joiner and filter transformation, specifying the join condition on EMP_ID, using a master outer join to pass all rows from one file and matching rows from the other, and filtering on null EMP_ID values to extract the extra rows and load them into the target.

Uploaded by

nelrick1984
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
179 views4 pages

Informatica PowerCenter - Flat Files

This document describes using Informatica PowerCenter to identify extra records between two flat file sources and load them into a target table. It involves importing the file definitions, creating a mapping with a joiner and filter transformation, specifying the join condition on EMP_ID, using a master outer join to pass all rows from one file and matching rows from the other, and filtering on null EMP_ID values to extract the extra rows and load them into the target.

Uploaded by

nelrick1984
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Informatica PowerCenter - Scenario

Informatica PowerCenter is an ETL tool widely used in most data warehousing projects\

To illustrate this scenario, the two sources considered are two comma separated flat files -
EMPLOYEE_FILE_1.txt and EMPLOYEE_FILE_2.txt. The EMPLOYEE_FILE_2.txt has some
extra records that need to be reported or loaded into the target which is a relational table having
the same definition as the sources. The difference rows between the two flat files are highlighted
in red as shown below.

Import the two flat file definitions using the Source Analyzer in Informatica PowerCenter
Designer client tool as shown below.

Create a new mapping in the Mapping Designer and drag the two source definitions into the
workspace.
Now, to identify the extra records from EMPLOYEE_FILE_2, a Joiner transformation followed
by a Filter transformation is used.

The illustration discussed below uses an unsorted Joiner Transformation and since both the
sources are having few records, any one of the sources can be treated as the "Master" source.
Here the EMPLOYEE_FILE_1 source is designated as the "Master" source. In practice,
however, to improve performance for an unsorted joiner transformation, the source with fewer
rows is treated as the "Master" source while for a sorted joiner transformation, the source with
fewer duplicate key values is assigned as the "Master" source.

First drag all the ports from the source qualifier SQ_EMPLOYEE_FILE_2 into the joiner
transformation. Notice the ports created in the joiner transformation are designated as the
"Detail" source by default. Drag only the EMP_ID port from SQ_EMPLOYEE_FILE_1 into the
joiner transformation as shown below.
Double-click the joiner transformation to open up the Edit view of the transformation. Click on
the Condition tab and specify the condition shown below.

Since, we need to pass all the rows from the EMPLOYEE_FILE_2, the Join Type used is
"Master Outer Join" in the Properties tab as shown below. This will ensure that all the rows from
the "Detail" source and only the matching rows from the "Master" source will pass from the
joiner transformation.
The Join types supported in the joiner transformation are described below.

The rows passed by the joiner transformation are shown below. For the missing rows in the
"Master" source, the EMP_ID1 value is NULL.

Now, a filter transformation can be used ahead to pass only the records having EMP_ID1 as
NULL since these rows correspond to the difference rows from EMPLOYEE_FILE_2 source.
Pass all the rows from the joiner transformation into the filter transformation and add the Filter
condition shown below in the Properties tab of the filter transformation.

The records passed by the filter transformation are shown below.


Link the EMP_ID, EMP_NAME and CITY ports to the target definition. The complete mapping
is shown below.

Create a session task and a workflow. After running the workflow, the difference rows loaded
into the target relational table are shown below.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy