Can I Include the MySQL Binlog Index and Change Timestamp in Destination Records?
Question
Can I include the MySQL binary log (binlog) index and the timestamp of each record change as extra metadata in records synced by Fivetran? If so, how?
Environment
Connector: MySQL
Answer
Fivetran does not natively include low-level MySQL binlog metadata, such as the binlog file name, position, or index, in destination tables. We also do not add a source last-modified timestamp unless that column already exists in the source table.
Fivetran-generated metadata columns
Fivetran automatically adds the following metadata columns:
_fivetran_synced: The UTC timestamp when we wrote the row to the destination. This is not the time the row changed in MySQL._fivetran_deleted: A boolean soft-delete flag._fivetran_indexand_fivetran_id: Added only when the source table does not have a primary key. These columns support auditability and incremental syncs.
Capturing record change timestamps
To capture when a record changed in MySQL, add an updated_at or similar timestamp column to the source table. We replicate these columns without changes.
For tables using History Mode, we add columns such as _fivetran_start and _fivetran_end to define each record version's validity window. However, History Mode still relies on an existing timestamp or numeric column in the source.
Including MySQL binlog position per record
To include binlog position details per record, you can create MySQL triggers that write values such as @@log_file or @@log_pos to user-defined columns. We replicate these columns, but the triggers may add write overhead to your database.
Alternatively, binlog cursors and related metrics may be available through Fivetran connector logs or the REST API. These values are connection-level metadata, not per-row metadata.