How to dynamically change the Source connection of Bulk insert Task

  • Hi all,

    I am using Bulk insert task to insert large amount of data into a table.

    The table where data has to be inserted should be created dynamically..I have done this by getting the table name thru input box and passing the name as expression(destination tablename) in bulk insert.I have used Execute SQL task to create the table.

    everything works fine till these steps.

    The problem am facing is the input file(source connection of bulk insert) which has got headers(ie field names) at the top,data at the middle and Number of rows affected at the bottom.

    i have deleted the fieldnames and the no of rows affected and created another file (say new file) and saved the data alone dynamically.

    This new file has to be given as input to Bulk insert task..

    So how to pass this new file as source connection to bulk insert dynamically ..

    any idea??

    Thanks in advance,

    Ramya

  • You need to do the following:

    - Save the name of the new file in a variable (@myNewFile) at the time you are creating it.

    - Open the Expressions of your Flat File Source connection manager (source of BULK INSERT task).

    - Select File and assign the varaible (@myNewFile) to the value.

    - Vikas Bindra

    Sr. Software Engineer - BI

    -Vikas Bindra

Viewing 2 posts - 1 through 1 (of 1 total)

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