SSIS Flat File source

  • Hi I'm new to SSIS.

    I need suggestions in order to find a solution to the above question.

    I have two flat file sources and need to replace part of text in one flat file with all text in second flat file.

    Soren

  • If I were using SSIS, and since I'm reasonable new at SSIS, I would load both files into SQL tables and then generate a new file from these 2 tables.

    However, I believe you should be able to do this in the dataflow. You should be able to split each file to isolate the parts you want then merge the needed data from both files into a file. I haven't done anything like this yet so I cannot go into more details at this time.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • You _could_ do this in ssis but it seems more a job for an application though.

    There needs to be more info provided though as to what you want to do. Some sample data would be good.

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • I agree with Crispin. That's why I started my reply with "If were using SSIS...".

    I'd much rather to this in VB.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • okay here comes an example

    flat file 1:

    a

    b

    c

    a unique string, identifying start block to be replaced

    aaaa

    bbbb

    cccc

    ....

    ....

    ....

    a unique string, identifying end block to be replaced

    a

    b

    c

    Flat file :2

    replace with this block

    aaaa

    bbbb

    cccc

    end block

  • Not a job for ssis. You could do it but it would be a convoluted way. Look at using VB / c#. You could do that from within ssis even.

    Not a job for the data flow task though.

    btw, how big is file1?

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • Soren-543040 (8/20/2008)


    okay here comes an example

    flat file 1:

    a

    b

    c

    a unique string, identifying start block to be replaced

    aaaa

    bbbb

    cccc

    ....

    ....

    ....

    a unique string, identifying end block to be replaced

    a

    b

    c

    Flat file :2

    replace with this block

    aaaa

    bbbb

    cccc

    end block

    Hi Soren

    There is a tool called Conditional Split under Data Flow Transformations in the tool box, connect that to your flat file source and then to the destination.

    Then you can use the conditional split to filter your records, in the Conditional Split Transformation Editor you will see 3 columns (order,Output name, Condition). output name will be a name that you give for your filter (any name), Condition will be your filter (RecordType =="10") where recordType is a name of a Column in my data that I want to insert in a SQL Server.

    Bests

Viewing 7 posts - 1 through 6 (of 6 total)

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