Say I have a component's output connected to a custom destination component... in the destination component's properties, I can set the number of rows I want to consume. (The first 50 rows for example.) If I do it this way, the source component continues delivering rows - I can set my destination to ignore all rows after 50, but would like a way to tell the component above it "no more!"
Is this possible?
Steve
I am not sure what effect it would have on the upstream component, probably none, but to signal you are adding now more rows in ProcessInput you would normally use buffer.SetEndOfRowSet()|||Tried this... Can't use buffer.SetEndOfRowSet() on an input buffer, it throws an exception.
Also tried using buffer.Discard() but it seems to not have any effect on stopping the rows from continuing into the component.
Steve|||Ahh.. I was looking at an asynch component, and have the output buffers being used in ProcessInput!
I don't think this can be done, and not sure that it is a good idea even if you could. It would be like cancelling the package, mid-flow.|||No, you can not signal upstream components that you are done processing. You would have to do this at the source.
Thanks,
Matt|||Why not put in an extra transform component that only provides a certain number of rows. Like this: http://blogs.conchango.com/jamiethomson/archive/2005/07/27/1877.aspx
-Jamie|||Actually, that's exactly what I'm doing. But what happens is that say I just want 10 rows, and the input has 1,000,000 rows... the input will continue sending all 1,000,000 rows, even though they're being ignored. It would be nice to have something that tells the upstream component, "Hey, I don't need you anymore, don't send anything else, report success!"|||
Steven Pasetti wrote:
Actually, that's exactly what I'm doing. But what happens is that say I just want 10 rows, and the input has 1,000,000 rows... the input will continue sending all 1,000,000 rows, even though they're being ignored. It would be nice to have something that tells the upstream component, "Hey, I don't need you anymore, don't send anything else, report success!"
This will be helpful for debugging too... I can debug with only 10 rows and if everything is fine, I can run the 1,000,000 rows later.
No comments:
Post a Comment