SSIS - basic question

  • I have a task to import the data from the csv file to the sql database and rightaway create a csv file from that database.

    I have included the following steps in Data Flow to import the data into the database from the csv file

    Flat File Source

    |

    OLEDB Destiation

    My questions is now to do the "export" to a csv file can I add a connector ( OLEDB Source) right after the OLEDB destiantion? However I cannot connect the two connectors

  • Add a new data flow. In that flow, pull in the data from the database you just created and then connect that to a flat file destination.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • You may not add an output after the OLEDB destination. It is the end of the pipeline for successful records.

    However, may I ask a dumb question. You are importing from a CSV and then eventually exporting a CSV file. How are they different, why is this the process? It seems odd..

    CEWII

  • Elliott Whitlow (12/13/2011)


    However, may I ask a dumb question. You are importing from a CSV and then eventually exporting a CSV file. How are they different, why is this the process? It seems odd..

    CEWII

    It seems like HW to me...

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Hm, maybe.. He could multi-cast it but I'd like to understand the process before I really offer a solution.

    CEWIII

  • Elliott Whitlow (12/13/2011)


    You may not add an output after the OLEDB destination. It is the end of the pipeline for successful records.

    However, may I ask a dumb question. You are importing from a CSV and then eventually exporting a CSV file. How are they different, why is this the process? It seems odd..

    CEWII

    The csv data has to be dumped in the database so that in the output file I can massage the data ( through some SQL queries) and include some more information from other tables for each records that were there in the input CSV file.

  • Elliott Whitlow (12/13/2011)


    Hm, maybe.. He could multi-cast it but I'd like to understand the process before I really offer a solution.

    CEWIII

    --and this is a "SHE" 😉

  • I apologize, in the absence of gender specific identifiers I assume "he". This time I was mistaken.

    I would like to understand the process more, because it seems odd, with that understanding I'll be able to offer better advice.

    CEWII

  • Elliott Whitlow (12/13/2011)


    I apologize, in the absence of gender specific identifiers I assume "he". This time I was mistaken.

    I would like to understand the process more, because it seems odd, with that understanding I'll be able to offer better advice.

    CEWII

    no problem 🙂 I have explained the process in the prior post ....

  • Elliott Whitlow (12/13/2011)


    I apologize, in the absence of gender specific identifiers I assume "he". This time I was mistaken.

    I would like to understand the process more, because it seems odd, with that understanding I'll be able to offer better advice.

    CEWII

    The csv data has to be dumped in the database so that in the output file I can massage the data ( through some SQL queries) and include some more information from other tables for each records that were there in the input CSV file.

  • Elliott Whitlow (12/13/2011)


    I apologize, in the absence of gender specific identifiers I assume "he". This time I was mistaken.

    I would like to understand the process more, because it seems odd, with that understanding I'll be able to offer better advice.

    CEWII

    I saw above what you wanted to do, which did not answer my question. It sounds like you want to suck the data in from a CSV file into a table and then push it back out as a CSV file. You don't discuss any transformations or other processing so it sounds like you are just outputing the same data you already inserted. If thats true then why import it at all, whats wrong with the original file? This is the gist of my question. Is that clear?

    CEWII

  • Elliott Whitlow (12/13/2011)


    Elliott Whitlow (12/13/2011)


    I apologize, in the absence of gender specific identifiers I assume "he". This time I was mistaken.

    I would like to understand the process more, because it seems odd, with that understanding I'll be able to offer better advice.

    CEWII

    I saw above what you wanted to do, which did not answer my question. It sounds like you want to suck the data in from a CSV file into a table and then push it back out as a CSV file. You don't discuss any transformations or other processing so it sounds like you are just outputing the same data you already inserted. If thats true then why import it at all, whats wrong with the original file? This is the gist of my question. Is that clear?

    CEWII

    Once the data is dumped into the table then I have to do some matching of the records in other databases ..like matching by DOB and SSN and if matched I put some comments "matched" else "unmatched" etc. All this part is done in SQL and then I write out to the CSV file all these information. Does that make sense?

  • Why would you want to import the data from a CSV, then match on the SSN and/or DOB and turn around and export back to a CSV?

    What is the added value? Is it because the data wants massaging?:hehe:

    What objective are you accomplishing and for what purpose?

    Sound like HW to me too.:-P

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Welsh Corgi (12/13/2011)


    Why would you want to import the data from a CSV, then match on the SSN and/or DOB and turn around and export back to a CSV?

    What is the added value? Is it because the data wants massaging?:hehe:

    What objective are you accomplishing and for what purpose?

    Sound like HW to me too.:-P

    If the only thing being done is matching - I would probably do it without the import and compare the data direct in SSIS.

    Can we get more details on if there is massaging of the data?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Absolutely right, we can just pick that data up as we go with a lookup.. No need to actually write it to the DB..

    CEWII

Viewing 15 posts - 1 through 15 (of 18 total)

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