Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamic Source Header

Status
Not open for further replies.

ljang

Programmer
May 6, 2005
1
US
I am new to informatica and any insight would help. I am recieving delimited flat files that hold the same type of data, only the columns move around.
file 1 - Name, State, City, Zip
file 2 - City, Zip, State, Name

and I want the target to be
Name, City, State, Zip.

How can I re-map this in informatica? The file will always have a header row that cooresponds to that file layout and the target layout is static.

Thanks for the help.
 
Don't think you can dynamically change assignment of ports, but let us be creative in this.

Build mappings for each of the possible flatfile-types.
Create 3 tables will all possible occurences of State,City and Zip. Use this three tables in 3 joiners in the mappings.

Create sessions on all mappings and use this in one workflow.

Now, the joiners (inner join) will only allow data to be written to the target if ALL 3 of them pass the data. This will only be the case with the version that matches the structure of the flatfile loaded.

So, every session but one will fail to load any data and the one that succeeds will write the correct columns to the target-table.

Okay, this seems pretty far-fetched, but for now this my 2 cents...

Ties Blom
Information analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top