Hello @Naomi Nosonovsky ,
Out of Memory Exception
A reliable method is to avoid reading the large data file into memory. Instead, you can create the footer in a separate, small file and then append it.
- Adjust your package to first generate the main data file
- Then use a separate, simple Data Flow Task to create a second file containing only the footer text.
- Finally, add an Execute Process Task at the end of your control flow to run a
copycommand.
If you still encounter issues after implementing the fix above, please check these within your main Data Flow Task:
- Data Type Validation: Double-check that the data types and lengths defined in your Flat File Connection Manager exactly match the
WITH RESULT SETSdefinition in yourEXECUTEstatement. - Column Mappings: Open your Flat File Destination, go to the Mappings tab, and ensure every column from the source is correctly mapped to its destination column.
- Use a Data Viewer: Right-click on the data path arrow between your source and destination and select Enable Data Viewer. When you run the package in debug mode, a window will pop up showing you the data as it flows through that point.
Please try the recommended solution for the footer first, as it is the most likely cause.
I hope this helps.