Add periodic Parquet file merging by time period #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Periodic Parquet File Merging Implementation
Implemented feature to periodically merge small Parquet files into larger consolidated files by configured time periods (hourly, daily, weekly, monthly).
Changes Made:
Add configuration options for merge settings
merge_enabled: Enable/disable file mergingmerge_period: Time-based merge interval (hour, day, week, month)merge_min_files: Minimum number of files to trigger a mergemerge_on_flush: Merge files during flush operationsCreate merge functionality
merge_files()method to DataSink interfaceIntegrate into pipeline
Add comprehensive tests (11 new tests)
Update documentation
Code quality
Key Features:
✅ Flexible Time Periods: Merge by hour, day, week, or month
✅ Minimum File Threshold: Only merge when enough files exist
✅ Partitioning Support: Works with partitioned data
✅ Multi-Storage: Works with S3, HDFS, and local filesystems
✅ Schema Compatibility: Handles dictionary encoding in Parquet files
✅ Automatic Cleanup: Deletes original files after merge
✅ Python 3.9+ Compatible: Uses os.walk() for broad compatibility
Benefits:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.