Posted Thu, 03 Oct 2019 20:13:58 GMT by

Below is the error generated while trying to generate SSIS packages. 

 

Component OLE DB Source of type AstOleDbSourceNode in Dataflow Export Source and Load Staging Table has duplicate column reference with name 'ErrorCode' on ouput 'Error'. This may be due to the 'ErrorCode' and 'ErrorColumn' columns that are automatically added to error output paths by SSIS. Ensure that all column names are unique.

 

The source in the dataflow task has a column name ErrorCode. How can I workaround this issue? 

Regards

Posted Tue, 15 Oct 2019 23:35:59 GMT by

Here is how we responded in the support ticket that was opened. I am posting this for any future user who may come across this post.

---

This is a known issue. Unfortunately, "ErrorCode", "ErrorColumn", and "ErrorText" are reserved column names in an SSIS Dataflow, and aside from a couple of workarounds that I will describe below, there is not anything that we can do to resolve the issue. 

There are three ways to work around this issue, the first is to Alias the columns in the source query. So now instead of

SELECT * from dbo.MyTable;

it would be : 

SELECT col1, col2, ErrorCode as MyErrorCode from dbo.MyTable;

The next workaround is to change the column's name in the column mappings collection in biml. 

Finally, similar to the first option, you could create a view from the source table, where the column names avoid the reserved keywords. 

Sorry for any inconvenience that this may cause, but it is beyond our control.

You must be signed in to post in this forum.