Informatica – Working with Fixed Width Flat Files

Informatica – Importing Fixed Width Flat Files

— Fixed-width flat files are byte-oriented (measured in bytes).
— It can also be line sequential, which means each row ends with a newline character.
— Use Flat File Wizard to create, move, or delete column breaks.
— ‘Start Import At Row’ Indicates the row number at which the Flat File Wizard starts reading when it imports the
file.
— ‘Import Field Names From First Line’ if selected the Designer uses data in the first row for column names.

Here is the steps …

1. Sources >> Import from File.
2. Complete the flat file import wizard and create the source in ‘source analyzer’.
3. Preview the data in the source and make sure all looks correct.
4. Create the target table in ‘Target Designer’.
5. Create the mapping in ‘Mapping Designer’
6. Create the workflow and session to run the mapping.
7. Edit the session and give …
    — Source file directory
    — Target file connections
    — Enable ‘Line sequential file format’ in ‘Set File Properties’.
8. Run the workflow and review the result.

FIxed-width-flat-file-source
Fixed width source file layout

 

FIxed-width-flat-file-wizard
Create the break lines for each column
FIxed-width-flat-file-wizard
Give the name and datatype for each column
FIxed-width-flat-file-source-preview-data
Imported the file into the source analyzer, You can preview the data by right click on source definition
FIxed-width-flat-file-target
Define the target, Here its a oracle table with same layout as source file
FIxed-width-flat-file-mapping
Create the mapping, here its a basic mapping reading from a flat file and loading to a table
FIxed-width-flat-file-session
Create workflow, and session, edit the session and give source file directory
FIxed-width-flat-file-line-sequential
Important !! In ‘set file properties’ >> Advanced, enable ‘Line sequential file format’ to avoid data truncate Issues in target table
FIxed-width-flat-file-session-log
Run the workflow and see the session log, All 4 records are read and loaded to target
FIxed-width-flat-file-target-table
Validate the result in the target table, now we have all the record from source file.



***

If you have any further questions, please do send an e-mail to kvtinformatica@gmail.com.

You May Also Like

About the Author: kvt

Leave a Reply

Your email address will not be published. Required fields are marked *