OK, you're close, but now quite there. I should have expanded my explanation a bit in my previous post. Here's what I did to get my example to work:
1. Create a variable (scope it to your choice) of type int called PipelineRows.
2. Create a Derived Column Transformation. Inside it, create a new column named Ident with a default value of zero.
3. Enter the Script Transformation. On the Input Columns page of the Script Tranformation editor, check the Ident column and make sure the Usage Type is set to ReadWrite. On the script page, no editing of properties is needed - not even the variables stuff. Instead, go straight to the script designer and use the code I provided inside the script transformation.
That should do it. If you still get blue/green lines in your script designer, hover your cursor over them and they'll tell you what the error is....post it here if you get one.
====================================================== Forum Etiquette: How to post data/code on a forum to get the best help
- by Jeff Moden