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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user