locked
dynamic column creation for flat fi RRS feed

  • Question

  • I need to load the data into  tables from flat file source. But we do not know flat file contains how many columns (dynamic columns). could you please provide the right way to complete the task.
    Wednesday, November 13, 2013 9:57 AM

Answers

  • Hi Ramaraju,

    SSIS doesn’t support dynamic columns natively. To achieve your goal, you can use a Script Task. The overview of the solution is that read the names and number of columns in the first row of the flat file each time and store it in a variable, then create a staging table dynamically based on this variable, and then use the staging table to load the main table. For the detailed information, please see:
    http://www.citagus.com/citagus/blog/importing-from-flat-file-with-dynamic-columns/

    Regards,


    Mike Yin
    TechNet Community Support

    • Proposed as answer by SathyanarrayananS Friday, November 15, 2013 4:38 PM
    • Marked as answer by Mike Yin Sunday, November 24, 2013 3:31 PM
    Friday, November 15, 2013 4:36 PM

All replies