Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add cron that vacuums data #1 #43

Merged
merged 1 commit into from
Sep 7, 2023
Merged

Conversation

rehanvdm
Copy link
Owner

@rehanvdm rehanvdm commented Sep 7, 2023

The lambda function runs at 1 hour past midnight UTC. At this point, the Firehose is done writing for the previous day and no new data will be written. The function is idempotent and will delete the raw files after doing the rollup only if it is successful.

During the test, it does an incredible job at rolling up.

BEFORE:
S3 Objects (388)
Input rows: 650
Input bytes: 181.34 KB
Output rows: 148
Output bytes: 37.37 KB

AFTER:
S3 Objects (4)
Input rows: 148
Input bytes: 33.73 KB
Output rows: 148
Output bytes: 37.26 KB

The important part is the almost 100x reduction in S3 file count. This will decrease the amount of files that Athena has to scan by magnitudes, which means big savings to gain from this rollup.

@rehanvdm rehanvdm merged commit e8c3cfc into release/v1.2.0 Sep 7, 2023
4 checks passed
@rehanvdm rehanvdm mentioned this pull request Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant