<@U04S8PLJWMT> I have configure a pipeline to popu...
# ask-ai
p
@kapa.ai I have configure a pipeline to populate aws mysql data to snowflake. however I noticed in snowflake, the schema airbyte_internal accumulate the data and it's taking lot of space. is it ok if I delete them while a sync is not running. I'm doing the sync based on binlog and deduplicated data are stored in a different schema.
k
Yes, it is generally safe to delete the temporary or internal tables (such as those in the airbyte_internal schema) after a sync is complete and no sync is currently running. This is a common practice, especially if these tables are accumulating and consuming significant storage. Airbyte is designed to clean up these tables after successful syncs, but sometimes they may be left behind, especially after failed or interrupted syncs. Deleting them manually when no sync is running will not cause issues with your pipeline or data integrity, as the deduplicated data is stored in a different schema and your syncs are based on binlog replication. This approach is confirmed by Airbyte support, who state that if these tables are not deleted automatically after syncs, you can safely delete them yourself as long as no sync is in progress [Is it okay to delete the _AIRBYTE_TMP tables?](https://discuss.airbyte.io/t/1388) and [How to remove_ airbyte_ tmp_ prefix](https://discuss.airbyte.io/t/2867). Just ensure that you do not delete any tables while a sync is running, as this could interfere with the current sync process.
p
@kapa.ai is there a way in Airbyte to introduce a data purging strategy? I'm hoping to purge outdated/redundant data from aws mysql but I wanna keep a full version in snowflake(these purges should not reflect in snowflake). Currently I'm doing the sync via binlogs.
k
A message from kapa.ai
Based on the available knowledge sources, Airbyte does not natively provide a built-in data purging strategy for the source database (AWS MySQL) as part of its sync process. Airbyte’s primary function is to extract data from the source and load it into the destination (Snowflake in your case), and it does not perform any data deletion or purging operations on the source database as part of its standard sync modes. If you want to purge outdated or redundant data from AWS MySQL but retain the full historical data in Snowflake, you can safely do so outside of Airbyte. Since you are using binlog-based (CDC) sync, deletions in the source (MySQL) will be captured and, by default, reflected in the destination (Snowflake) as delete events. However, if you want to prevent these purges from being reflected in Snowflake, you would need to implement a custom solution, as Airbyte will replicate deletes by default when using CDC mode [MySQL CDC: Build an ELT pipeline from MySQL Database](https://airbyte.com/tutorials/mysql-change-data-capture-cdc). The knowledge sources do not mention a built-in Airbyte feature to ignore or filter out delete events during CDC syncs. Therefore, to achieve your goal, you would need to: - Purge data from MySQL using your own scripts or processes. - Configure your downstream processing or transformation in Snowflake to ignore delete events, or - Use a sync mode that does not propagate deletes (such as incremental append), but this would not give you a full CDC history. In summary, Airbyte does not offer a native data purging strategy for the source that excludes those purges from being reflected in the destination when using CDC. You would need to handle this logic outside of Airbyte or in your data warehouse post-processing [MySQL CDC: Build an ELT pipeline from MySQL Database](https://airbyte.com/tutorials/mysql-change-data-capture-cdc) [Sync of Deleted records in source to the target datasource](https://discuss.airbyte.io/t/372).