Delete Columns from TSV

  • I have a TSV File which has around 500+ columns.I want to import data from 20 columns (among 500) using SSIS. How should I handle this in SSIS..?

    Appreciate your help..!!

    thanks

    demin

  • demin99 (9/22/2015)


    I have a TSV File which has around 500+ columns.I want to import data from 20 columns (among 500) using SSIS. How should I handle this in SSIS..?

    Appreciate your help..!!

    thanks

    demin

    Not sure how much you know about SSIS, but here is an overview:

    1) Create a Flat File Connection Manager which points at the source file. All of the source file columns will be defined here.

    2) Add a data flow to your package.

    3) Add a flat file source to the data flow, using the connection manager you defined.

    4) Edit the flat file source, using the Advanced Editor.

    5) Expand Flat File Source Output and the Output Columns node.

    6) Select the columns you don't want and click on 'Remove Column'.

    7) Add a destination and join it to the source.

    8) Create your column mappings.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • @Phil,

    So does that mean that you have to manually click on 480 columns in step 6?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • Jeff Moden (9/23/2015)


    @Phil,

    So does that mean that you have to manually click on 480 columns in step 6?

    Good question, and one which also went through my mind as I was writing that stuff out.

    I've just checked and, at least in VS2013, it is possible to select and deselect a range of columns in the ordinary (not advanced) editor, under the 'Columns' node.

    In the advanced editor, it's a one-at-a-time task.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

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

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