Yola Z
Yola Z

Reputation: 39

How to add incremental row number in a data flow task in SSIS

I current want to add a new column that allow me to add row number within a data flow task in SSIS (row number increments with each new row).

So far I have been using the following code from this guide: I currently am using Visual Studio 2015.

However, once I run the script I am getting the current error. Seems like it's saying there's a bug in the script, although I can't find this. Also note that I am very new to writing scripts, so I am having some difficulties with this.

Error at Grab landing data and populate staging [Script Component [88]]: The binary code for the script is not found. Please open the script in the designer by clicking Edit Script button and make sure it builds successfully.

Error at Grab landing data and populate staging [Script Component [88]]: The script component includes no code. Edit the component to include code.

Error at Grab landing data and populate staging [SSIS.Pipeline]: "Script Component" failed validation and returned validation status "VS_ISBROKEN".

Error at Grab landing data and populate staging [SSIS.Pipeline]: One or more component failed validation.

Error at Grab landing data and populate staging: There were errors during task validation.

Any suggestions will help, thanks!

Upvotes: 2

Views: 4082

Answers (1)

Hadi
Hadi

Reputation: 37368

Trying to figure out the issue

I think that there are two possibles causes for this error:

(1) TargetServerVersion

Check that the TargetServerVersion select is the appropriate installed SQL Server version:

In the solution explorer, Right click on the SSIS Project Node and click Properties. When you see Properties select Configuration Properties. You will see TargetServerVersion change that to the relevant SQL Server version then Click OK.

enter image description here

Reference: How to change TargetServerVersion of my SSIS Project

(2) Script code errors

After searching for this issue, i found many suggestion on the web. To summarize them:

  • Try to clean and rebuild the script project within the script editor
  • Set Delay Validation to true if you are using SSIS 2008 and later versions
  • Set "PrecompileScriptIntoBinaryCode" to true if you are using SSIS 2005

You can find more details at:

Upvotes: 1

Related Questions