SSIS variable added to import file

  • I am new to SSIS and I have created a package that loops through files in a directory and imports them into a table. The package works fine but I would like to add the file name that the data came from and add it to a column in the import file or into the table that it was imported into. I have tried adding a derived column but cannot seem to get the value from the variable into it.

  • A derived column is the right path. What are you using to loop through the directory? A For-Each-Loop?

    Also, why don't you add a data-viewer to see what is in the pipeline immediately following the derived column task.

    CEWII

  • I was able to finally get it to work. I had to Cast the variable and allow for a longer string. Thank you for your suggestion.

  • Wonderful, glad to hear it..

    CEWII

  • bob_kudulis (4/16/2010)


    I am new to SSIS and I have created a package that loops through files in a directory and imports them into a table. The package works fine but I would like to add the file name that the data came from and add it to a column in the import file or into the table that it was imported into. I have tried adding a derived column but cannot seem to get the value from the variable into it.

    Check this post.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply