Implement streaming pipeline endpoint for batch processing

- Added `/run/streaming-pipeline` endpoint to process data in batches from either a database or CSV file.
- Introduced `BatchResponse` model for structured responses.
- Updated README with new endpoint details, including parameters and example usage.
- Enhanced error handling and logging during batch processing.
- Ensured data preprocessing and NaN handling in analysis functions.
This commit is contained in:
2025-05-02 14:25:31 +01:00
parent 5767f55686
commit 9c429caa56
10 changed files with 246 additions and 11 deletions
+2
View File
@@ -69,6 +69,7 @@ class DataLoader:
'd4': 'customer_id'
})
chunk = chunk.dropna()
chunks.append(chunk)
# Combine all chunks
@@ -127,6 +128,7 @@ class DataLoader:
'd4': 'customer_id'
})
chunk = chunk.dropna()
chunks.append(chunk)
offset += self.chunk_size