Hello guys If I used mysql source with cdc enabled...
# replication-ask-ai
a
Hello guys If I used mysql source with cdc enabled and S3 as destination with sync mode incremental append will I receive deletion events or not ?
k
Yes, you will receive deletion events. When CDC is enabled on a database source (like MySQL), Airbyte reads the database’s change log and emits records for
INSERT
,
UPDATE
, and
DELETE
operations. These CDC records include a special
_ab_cdc_deleted_at
field that is set (non‑null) for delete events. [[CDC docs](https://docs.airbyte.com/platform/understanding-airbyte/cdc); [MySQL CDC tutorial](https://airbyte.com/tutorials/mysql-change-data-capture-cdc#step-7)] With an S3 destination using Incremental | Append, Airbyte will write all these CDC records (including deletes) into the raw data files. A deleted row will therefore appear as a record where
_ab_cdc_deleted_at
is not null, indicating that the corresponding primary key was deleted on the source. [[MySQL CDC tutorial](https://airbyte.com/tutorials/mysql-change-data-capture-cdc#step-7)] So: yes, deletion events are captured and delivered to S3; they are flagged as deletes via
_ab_cdc_deleted_at
, not physically removed from previous files.
a
but here's the output schema of the file in s3 "_airbyte_raw_id","_airbyte_extracted_at","_airbyte_meta","_airbyte_generation_id","_airbyte_data"
@kapa.ai
k
Sorry @Ahmed Abdqader, I'm not sure what you mean. Please try again. 👋
a
here's the output schema in s3 "_airbyte_raw_id","_airbyte_extracted_at","_airbyte_meta","_airbyte_generation_id","_airbyte_data" it doesn't contain anything about _ab_cdc_deleted_at so how should I know the deleted records ? @kapa.ai
k
A message from kapa.ai
New message text here
a
it worked thanks