locked
dynamic data flow task RRS feed

  • Question

  • Hi, I have .csv files which needs to be populated into a staging table. The number of columns keep changing from file to file and all this has to be handled within SSIS data flow task without having to change the SSIS package. I am using SSIS 2008. Please guide me.

    Thanks in advance.............

    Wednesday, March 28, 2012 6:16 AM

Answers

  • Simple answer is no as data flow task does not work with dynamic meta data.

    You would need to create the package programatically else create multiple data flow task for each file (or one data flow with multiple source and destinations.)


    My Blog    |      Ask Me     |      SSIS Basics     

    • Proposed as answer by Koen VerbeeckMVP Wednesday, March 28, 2012 6:46 AM
    • Marked as answer by Challen Fu Friday, April 6, 2012 8:23 AM
    Wednesday, March 28, 2012 6:27 AM
  • Hi,

    Please try to use script task, in this script task you have to do it using code (Connection to your CSV file and the destination table) There is an important thing you must consider the number of columns so you must create your base column which can handle all different CSV columns or for each check if this table is capable of holding this data or not if yes insert it other wise create new table (Or column).

    GoodLuck

    I hope this is helpful.

    Elmozamil Elamir

    MyBlog


    Please Mark it as Answered if it answered your question
    OR mark it as Helpful if it help you to solve your problem
    Elmozamil Elamir Hamid
    http://elmozamil.blogspot.com

    • Proposed as answer by Challen Fu Thursday, March 29, 2012 8:20 AM
    • Marked as answer by Challen Fu Friday, April 6, 2012 8:23 AM
    Wednesday, March 28, 2012 6:33 AM

All replies

  • Simple answer is no as data flow task does not work with dynamic meta data.

    You would need to create the package programatically else create multiple data flow task for each file (or one data flow with multiple source and destinations.)


    My Blog    |      Ask Me     |      SSIS Basics     

    • Proposed as answer by Koen VerbeeckMVP Wednesday, March 28, 2012 6:46 AM
    • Marked as answer by Challen Fu Friday, April 6, 2012 8:23 AM
    Wednesday, March 28, 2012 6:27 AM
  • Hi,

    Please try to use script task, in this script task you have to do it using code (Connection to your CSV file and the destination table) There is an important thing you must consider the number of columns so you must create your base column which can handle all different CSV columns or for each check if this table is capable of holding this data or not if yes insert it other wise create new table (Or column).

    GoodLuck

    I hope this is helpful.

    Elmozamil Elamir

    MyBlog


    Please Mark it as Answered if it answered your question
    OR mark it as Helpful if it help you to solve your problem
    Elmozamil Elamir Hamid
    http://elmozamil.blogspot.com

    • Proposed as answer by Challen Fu Thursday, March 29, 2012 8:20 AM
    • Marked as answer by Challen Fu Friday, April 6, 2012 8:23 AM
    Wednesday, March 28, 2012 6:33 AM