How to create uniqueid(identity column) while importing one text file to another text file with SSIS?

Can you please tell me how to create unique id like identity column value with seed 1 while importing one text file to another text file with SSIS package?

Files has 40 columns and around 50000 records. But these files doesn't have any unique column. So i need to create unique column like identity column with seed 1 before loading into database.  So i plan to create another flat file (destination file) along with identity column . Can you please advise me how to do this? My destination database is Netezza and cureent version doesn't have identity column concept.Thanks.
PKTGAsked:
Who is Participating?
 
PedroCGDCommented:
OK..
Here you have.
Create a new SSIS Project
Add the attached dtsx package to the solution
Update connection to excel (cmExcel)
And test it!
helped?
regards,
Pedro
www.pedrocgd.blogspot.com


SSIS-Interface.JPG
Package-EE85-dtsx.txt
SourceData.xls
0
 
PedroCGDCommented:
Add inside your dataflow, a Script component as transformation to increment a SSIS Variable with 1 for each row.
You need to create SSIS variable
Add a dataflow and inside:
Add a source
Add a derived column
Add a Script as transform
Add a destination

helped?
Regards,
pedro
0
 
PKTGAuthor Commented:
Thanks. I am new for SSIS . So can you please explain little bit more or if you have any example script please send me. Thanks again.
0
 
PedroCGDCommented:
ok.. just a moment!
0
 
PKTGAuthor Commented:
Thanks so much. I will try and let you know ASAP.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.