This article describes the root cause, investigation approach, and recommended resolutions for ingestion failures triggered by the error:
InputStream not fully consumed – Expected bytes read: X | Actual: Y
This issue typically occurs when a source file is incomplete, corrupted, or improperly formatted during ingestion into Amperity.
Problem:
A customer encountered a failure ingesting the feed Experian:customer_attributes_temp (df-6edgbm) with the following error:
Feed: Experian:customer_attributes_temp (df-6edgbm) failed with: InputStream not fully consumed - Expected bytes read: 4047774661 | Actual: 3746356404Root Cause:
The failure occurred because the input stream ended prematurely, meaning:
The file did not match the expected size, OR
The source file was incomplete or truncated during transfer, OR
Formatting issues interrupted the parser before reaching the end of the file.
Additional ingest errors confirmed data quality issues:
'Unexpected character following quote: A''Data cell exceeded the maximum size of 65536 while reading'
These errors suggest malformed CSV content.
Solution:
Follow these steps to resolve the “InputStream not fully consumed” error during data ingestion:
- Check the Data Source: Please verify the completeness and integrity of the data feed. Ensure that the file has been fully transferred and matches the expected size.
- Fix Data Formatting Issues: Look for any formatting issues in the data, especially unexpected characters or improperly closed quotes, which could cause parsing issues.
- Check for Large Data Cells: Ensure that no data cells exceed the 65,536 character limit.
- Retry the Ingestion Process: After addressing the above issues, please try re-running the data ingestion process to see if the errors are resolved.