15

I have a synchronous transformation script component, with some input columns, and an extra defined Output column "ID". ID outputs an integer (DT_I4) type. Under certain circumstances, I would like "ID" to output a null value from my script.

Assigning it a null value in other SSIS components works, I can use NULL(DT_I4) within a derived column for example, but I cannot figure out how to do this in a script.

Row.ID = null;

claims that ID is not a nullable value type.

I use c# within my scripts.

Is there any way to do this?

Edit: To make life easier, "ID" would ideally output a value of NULL by default if it is not assigned anywhere within the script using Row.ID = ...;

1 Answer 1

35

Every column has a booelan property called ColumnName_IsNull (in your case should be Row.ID_IsNull). I think you should set it to true to set the columns value NULL

Sign up to request clarification or add additional context in comments.

3 Comments

Excellent, just the answer I was looking for. Thanks.
That didn't work for me, all I get back is false, but i don't get the lines where there is a text or numeric value expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.