Julia CW
05/13/2026, 6:14 PMkapa.ai
05/13/2026, 6:14 PMCOPY command completes. [Redshift Destination]
> Normally these files are deleted after the COPY command completes; if you want to keep them for other purposes, set purge_staging_data to false.
So if purge_staging_data is enabled (set to true), files are deleted immediately after each sync ā not retained at all. If it's currently false (or defaulting to retaining files), that would explain why you're accumulating files.
For Time-Based Retention (e.g., 7 days) The knowledge sources do not describe a built-in Airbyte mechanism to retain S3 staging files for exactly 7 days before deletion. Your options are:
1. Enable Purge Staging Data in the Redshift connector settings ā this deletes files right after each sync (no 7-day archive).
2. Use AWS S3 Lifecycle Policies ā configure an S3 lifecycle rule directly in AWS to automatically expire/delete objects after 7 days. This is an AWS-native feature and would give you the time-based retention window you're looking for, independent of Airbyte's settings.
The second approach (S3 Lifecycle Policies) is likely your best path to achieving a "keep only the last 7 days" archive, since Airbyte's built-in option is all-or-nothing (delete immediately vs. keep forever). š 0 button š 0 button ā¹ļø Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.Julia CW
05/13/2026, 6:18 PMpurge_staging_data is set to true. I don't think it's ever been set to false. Why do I have old files in s3?kapa.ai
05/13/2026, 6:18 PMpurge_staging_data being set to `true`:
1. Concurrent FlushWorker File Collision (Active Bug) There is an open bug where concurrent FlushWorker threads can generate S3 keys with the same epoch timestamp, causing one file to silently overwrite another. This is a race condition in the async flush infrastructure. [GitHub Issue]
2. S3 Filename Pattern Using {date} If your S3 Filename Pattern is set to {date}, a known issue causes duplicate files to be uploaded to the staging area. When two files share the same date-based name, the second overwrites the first ā but the manifest file references both URLs, pointing to the same file. This can leave orphaned or unexpected files behind. [GitHub Issue; Forum Post]
The workaround recommended by users is to switch the S3 Filename Pattern to {timestamp} or {timestamp:millis} instead of {date}.
What to Check ⢠S3 Filename Pattern: Switch from {date} to {timestamp:millis} if you haven't already.
⢠Connector version: Make sure you're on the latest version of the Redshift connector, as several fixes have been shipped.
That said, the knowledge sources don't provide a definitive root cause for your specific situation. If neither of the above applies, I'd recommend opening a support ticket or filing a GitHub issue with your connector version and logs for further investigation. š 0 button š 0 button ā¹ļø Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.Julia CW
05/13/2026, 6:47 PMkapa.ai
05/13/2026, 6:47 PMCOPY command to load data into Redshift. Once that step is complete, they serve no further purpose for Airbyte. [Redshift Destination]
So if these are old staging files from completed syncs, deleting them manually should be safe ā your data has already been loaded into Redshift.
This is also consistent with the fact that purge_staging_data is designed to delete them automatically after each sync with no ill effects. [Redshift Destination]
However, I'd urge one caution: make sure the files you're deleting are not from a currently in-progress or recently failed sync. Deleting staging files from an incomplete sync could cause that sync to fail or result in missing data, since the COPY command would no longer be able to reference them.
The knowledge sources don't go into further detail on edge cases around manual deletion, so if you're unsure, I'd recommend checking that all your connections show a completed (not failed or running) status before deleting. š 0 button š 0 button ā¹ļø Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.