1
votes

I'm stuck with a SSIS package that I created for importing xlsx files to a database. Since some files have data with more tan 255 characters, I setted that column to DT_NTEXT. If I just leave a xlsx file that I know that has this long data, the package works fine with no erros. But, if I leave all the files that need to be imported in the import folder, I get next erros:

[VENTA_IMS_EXCEL [1]] Error: SSIS Error Code DTS_E_OLEDBERROR.
An OLE DB error has occurred. Error code: 0x80040E21.

[VENTA_IMS_EXCEL [1]] Error: Failed to retrieve long data for column "F17".

[VENTA_IMS_EXCEL [1]] Error: There was an error with output column "SubFamilia" (16693) on output "Excel Source Output" (9). The column status returned was: "DBSTATUS_UNAVAILABLE".

[VENTA_IMS_EXCEL [1]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "output column "SubFamilia" (16693)" failed because error code 0xC0209071 occurred, and the error row disposition on "output column "SubFamilia" (16693)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.
The PrimeOutput method on component "VENTA_IMS_EXCEL" (1) returned error code 0xC0209029.
The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.

My guessing is that the problem is that it evaluates each file for the kind of data to work with, and in the cases that there is data with less tan 255 characters, it fails.

Can anyone help me with this? How can I solve this? So it can loop and import all files with no problems.

1
Couldn't you set up the error configuration on the excel file to ignore errors connected with this field? You might then be able to capture the reason for failure by monitoring data in a data viewer?MiguelH
I had a same issue few months back.Trust me Xlsx does not go well with SSIS and I ended up converting xlsx file into text file and imported those txt file into my system. Refer techbrothersit.com/2014/09/…mehtat_90
I had the same problem but never solved it. The Excel driver works out the datatype on the fly and it changes depending on the length of data in the field. Then SSIS complains because the metadata has changed.Nick.McDermaid
Thanks everyone for help and comments. I'm going one last thing: Create a task with a script that loops the rows of the column that is hiving me trouble, and evaluate the max length of content. Depending of the result, I will redirect to an overflow task or to an other. If I can't solve it with this, I will just migrate to .csv files. Many thanks.Henry Foth Martinez

1 Answers

1
votes

This is a common issue with excel files. The excel driver infers the datatype for each column based on the first 8 rows. Review what datatype is your datasource assigning to your column and then confirm that all values conform to this datatype.

Review this blog post: https://www.concentra.co.uk/blog/why-ssis-always-gets-excel-data-types-wrong-and-how-to-fix-it