Data conversion failed. The data conversion for column "TIME PERIOD" returned status value 2 and status text "The value could not be converted because of a potential loss of data.". Error: 0xC0209029 at Data Flow Task, Flat File Source [565]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "output column "TIME PERIOD" (590)" failed because error code 0xC0209084 occurred, and the error row disposition on "output column "TIME PERIOD" (590)" 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.
1 Answers
I suggest importing flat files to staging tables (all text fields, no casting) then migrating them to your final table. Importing them without casting will sidestep errors like this, as long as your text fields are sufficiently long as to avoid truncation.
When you migrate the data in SSIS from staging to final table you can direct rows that error to an appropriate error output that you can use to isolate the problematic rows and decide how to handle them. Then you can fix and migrate those rows separately.
To my knowledge there's not an easy way to handle capturing problematic rows when casting on flat-file import in SSIS
You could change your SSIS to not fail the package on error, but then you'd have to dig for the problematic rows in the csv.