问题
I had a flat file connection manager with over 800 columns defined in Fixed Width format that was working fine until yesterday. When I now open a flat file with this connection manager I see those black squares which I think are introducing spaces in the data causing issues. What could have possibly caused this? I did not change anything from the last time I accessed it except that its pointing to the new file. I did check the new file with a new connection manager and it looks ok. No Square boxes so its the connection manager. I do not want to redo the connection manager since it has 800 columns and defining those will take forever. Please help!
Thanks.
回答1:
I don't know what happened per se, but what you are seeing in those black boxes are a control feed/line feed aka cr/lf. Your hint that the length of your source file has increased is that regular diagonal line going down the file. All the fields have been shifted over by 2 characters. If you know your source data is always going to be coming in like this, then I'd add one more column to the end of the Flat File Connection Manager, ABC. Define it as length 2, call it ignore
or something obvious like that. In your Flat File Source, in the data flow, don't even map the field into the data flow.
来源:https://stackoverflow.com/questions/17125384/ssis-flat-file-connection-manager-corrupted