none
use multicast for insertion to an OLEDB destination

    Question

  •  hi all,


    I have a Data flow which selects a row from the DB, and insert it to another one.

    I added multicast component to insert the same row twice. (It was done to simplify a larger data flow).

    It seems as if it does get to the two ole_db_destinations, but for some reason, only one row was inserted.

    Why is that?

     

    Btw – the Id of each row (in the dest table ) is identity(1,1) , and the primary key. 

    thanx ahead.

    Monday, February 02, 2009 8:53 AM

Answers

All replies

  • Hi,
    Not sure what the problem is but if I were you I would go about this slightly differently. Pass the 2 Multicast outputs into a Union All component and then insert the output from that into a single OLE DB Destination.

    -Jamie
    http://jamiethomson.spaces.live.com/ | http://blogs.conchango.com/jamiethomson
    • Marked as answer by netGirl Monday, February 02, 2009 10:28 AM
    Monday, February 02, 2009 9:19 AM
  • i'll say it again,
    this is not the real data flow. i just simlify a huge an a complicated one, which has some manipulation before it inserts the data to the DB. and I use a multicast to not stop at the destination, but to insert and to keep going on for some other manipulation and again - insert the row to the DB.

    that's why I wrote the small one. to make sure it doesnt have a problem with insertion the same row twice to a same table. and it does. I just dont realy understand why.

    I  cant use a Union All component, because I do want to insert it twice. The data is changing late.

    Monday, February 02, 2009 9:35 AM
  • netGirl said:

    i'll say it again,
    this is not the real data flow. i just simlify a huge an a complicated one, which has some manipulation before it inserts the data to the DB. and I use a multicast to not stop at the destination, but to insert and to keep going on for some other manipulation and again - insert the row to the DB.

    That wasn't really clear from your first post (and still isn't to be honest). Nevertheless....


    netGirl said:
    that's why I wrote the small one. to make sure it doesnt have a problem with insertion the same row twice to a same table. and it does. I just dont realy understand why.

    I  cant use a Union All component, because I do want to insert it twice. The data is changing late.



    I'm not really understanding why Union All is not an option to you I'm afraid. Your requirement seems to be that you want to insert the row twice (as you have iterated here) and that's exactly what Union All allows you to do. Can you expand on what you mean by "the data is changing late"? It seems from what you said that that is what is preventing you from using a Union All.
    http://jamiethomson.spaces.live.com/ | http://blogs.conchango.com/jamiethomson
    Monday, February 02, 2009 10:01 AM

  •  ok, my mistake. I meant: " changing later"
    I 'm using some derived columns and scipts which are changing the data, so that the data I insert later is not the same as I inserted before.
    Is it clear now?

    anyway, I'm starting to understand ur claims :)

    the problem is that the dataflow wasnt writen by me. I'm just adding some developments to this huge one.
    It's gonna be a big change ;((

    Monday, February 02, 2009 10:27 AM
  • btw , thanx a lot.
    Monday, February 02, 2009 10:29 AM
  • netGirl said:


     ok, my mistake. I meant: " changing later"
    I 'm using some derived columns and scipts which are changing the data, so that the data I insert later is not the same as I inserted before.
    Is it clear now?

    Yeah a lot clearer (I think).
    It doesn't actually matter that the data in one of the Multicast outputs will be getting altered. If the format (i.e. number of columns, column datatypes) of those data paths are the same (which they have to be because you are inserting both into the same table) then you can still push them both into a Union All. It should work fine.

    Reply if you have any problems.

    -Jamie


    http://jamiethomson.spaces.live.com/ | http://blogs.conchango.com/jamiethomson
    Monday, February 02, 2009 10:32 AM