• Barkingdog (3/13/2013)


    I figured out a way. I used the Import\Export Wizard under SSMS to export the contents of an empty table to an empty file and Saved the resultant package. (Unfortunately this needs to be done one table at a time.Arrgh) Then I copied\pasted the "Flat File Destination" connection, created by the Import\Export wizard, into my new SSIS Package. Done. A bit clumsy but a lot better than parsing each import file.

    barkingdog

    Ha, that's clever, but not at all what it sounded like you were wishing SSIS could do. I am assuming these are fixed-width files which is why you were looking for a shortcut? You never said or confirmed.

    Just to be clear, for you and future readers alike, you may have found a simpler way to get a Wizard to generate a Flat File Connection Manager you can take with you and use in a package that imports data but you are in no way circumventing the requirement that the flat file structure be defined ahead of time, i.e. you're still satisfying the SSIS requirement that says you must define the flat file structure at design time when using the built-in Flat File Connection Manager in its generic form, you just found a quicker way to generate the Connection Manager.

    For next time, most people will spend the time defining the Flat File Connection Manager first and then use the "New" button in the OLE DB Destination Component to have SSIS generate a CREATE TABLE statement for a new table that mimics the incoming file structure.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato