userguide_2251

3
Please rate this solution and share your feedback on Marketplace Website. Name of Solution: Separating Header, Footer from Flat file Source Business Requirement: This mapping example demonstrates how to segregate header, footer and the rest of the data from flat file source and write them to different output files. Solution URL: https://community.informatica.com/solutions/2251 Supported Versions: PowerCenter 9.1 and 9.5 Description: Flat files are one of the popular formats of source data in any data integration or data warehousing projects. More than often, you receive flat files with more information than you actually need. For example, getting header, footer, summary information along with actual data. You may want to omit or separate extra information from the flat file source and process only source records. The mapping sample given here does the same. In the example given here, mapping separates header, footer and records and writes them to three separate target files. Download file contents: 1. Workflow 2. Source File 3. Script Steps to implement the solution: 1. Place source file in $PMSourceFileDir folder. 2. Import workflow using the Repository Manager. Select the appropriate folder from the repository and resolve the conflicts by choosing suitable option.

Upload: r-j

Post on 15-Apr-2016

217 views

Category:

Documents


3 download

DESCRIPTION

Usrgd

TRANSCRIPT

Page 1: Userguide_2251

Please rate this solution and share your feedback on Marketplace Website.

Name of Solution:

Separating Header, Footer from Flat file Source

Business Requirement:

This mapping example demonstrates how to segregate header, footer and the rest of the

data from flat file source and write them to different output files.

Solution URL:

https://community.informatica.com/solutions/2251

Supported Versions:

PowerCenter 9.1 and 9.5

Description:

Flat files are one of the popular formats of source data in any data integration or data

warehousing projects. More than often, you receive flat files with more information than you

actually need. For example, getting header, footer, summary information along with actual

data.

You may want to omit or separate extra information from the flat file source and process

only source records. The mapping sample given here does the same.

In the example given here, mapping separates header, footer and records and writes them

to three separate target files.

Download file contents:

1. Workflow

2. Source File

3. Script

Steps to implement the solution:

1. Place source file in $PMSourceFileDir folder.

2. Import workflow using the Repository Manager. Select the appropriate folder from

the repository and resolve the conflicts by choosing suitable option.

Page 2: Userguide_2251

Please rate this solution and share your feedback on Marketplace Website.

3. In the PowerCenter Designer, observe the router transformation which separates the

header as shown below.

The same logic is applied to separate footer. Router transformation accepts the descendingly

sorted input so footer can read first. Remaining data has been passed as details output after

sorting again.

4. Open the workflow in Workflow Manager. Assign the integration service in Workflow -

> Edit -> Integration Service

5. Edit session and assign valid connection object for the source and target.

6. For more details of importing object please visit our YouTube link.

7. Execute the workflow and observe the target files.

Page 3: Userguide_2251

Please rate this solution and share your feedback on Marketplace Website.

YouTube Video on Importing and Configuring Workflows:

http://www.youtube.com/playlist?list=PLLRreK2jjjgWBQ4NPfp0QWTxYDvlnEqSJ

Other Useful links:

Bundle: Useful PowerCenter Script files

Bundle: Advanced Workflow Techniques

Bundle: PowerCenter Mapping Templates

Bundle: Informatica Debugging Tools

Bundle: Informatica Productivity Tools

Bundle: Regular Expression

Bundle: Java Transformation.