Alan Chan
07/21/2025, 4:02 AMkapa.ai
07/21/2025, 4:02 AMAlan Chan
07/21/2025, 4:07 AMkapa.ai
07/21/2025, 4:07 AMkapa.ai
07/21/2025, 4:08 AMstate table of its internal configuration database. This table contains the state information for each connection and stream, including the state JSON, connection ID, stream name, namespace, and the type of state (STREAM, GLOBAL, or LEGACY). The relevant columns in the state table are: - `id`: Primary key, unique identifier for the state record. - `connection_id`: Foreign key referencing the connection. - `state`: JSON blob storing the state information. - created_at and `updated_at`: Timestamps for record creation and modification. - stream_name and `namespace`: Identify the stream associated with the state. - `type`: Enum indicating the state type (STREAM, GLOBAL, LEGACY). Indexes and constraints include a primary key on (id, connection_id) and a unique constraint on (connection_id, stream_name, namespace) [Config Database - state table](https://docs.airbyte.com/platform/next/understanding-airbyte/database-data-catalog#state). You can view the contents of this table directly in the Airbyte internal Postgres database using: sql SELECT * FROM state; [Incremental Data Synchronization Tutorial](https://airbyte.com/tutorials/incremental-data-synchronization#step-2)Alan Chan
07/21/2025, 4:09 AMkapa.ai
07/21/2025, 4:09 AMkapa.ai
07/21/2025, 4:09 AM_airbyte_raw_<table_name>) and, depending on your sync mode, may also create normalized or history tables. For example, to list tables in a Postgres destination, you can use: sql \dt; To view the contents of a raw table: sql SELECT * FROM _airbyte_raw_<table_name>; The documentation and tutorials provide examples of these queries and show the structure of the tables created by Airbyte in the destination database. These tables include fields such as _airbyte_ab_id, _airbyte_data, and _airbyte_emitted_at among others, depending on the sync mode and normalization settings you have chosen [Explore Airbyte’s incremental data synchronization](https://airbyte.com/tutorials/incremental-data-synchronization#step-7) [Explore Airbyte's Change Data Capture (CDC) synchronization](https://airbyte.com/tutorials/incremental-change-data-capture-cdc-replication).Alan Chan
07/21/2025, 4:31 AMkapa.ai
07/21/2025, 4:31 AMkapa.ai
07/21/2025, 4:31 AM_airbyte_raw_<table_name> table in your destination will not reset or fix the sync state in Airbyte. Airbyte manages sync state internally in its own configuration database (specifically, in the state table), not in the destination tables. When you re-sync, Airbyte uses this internal state to determine what data to extract and load, regardless of what you manually delete from the destination tables. If you are seeing the wrong number of records after deleting data from the destination and re-syncing, it is likely because the sync state was not reset or cleared. To fully reset the sync and ensure all data is reloaded from the source, you should use Airbyte's Clear functionality. This will remove all records from your destination tables and reset the sync state, allowing a true full refresh on the next sync. Simply deleting data from the destination does not affect Airbyte's internal state tracking and can lead to inconsistent results [Clearing your data](https://docs.airbyte.com/platform/operator-guides/clear). If you want to ensure a complete re-sync, use the "Clear data" option in the Airbyte UI or API for your connection or stream, and then run a sync. This will properly reset both the destination tables and Airbyte's internal state, ensuring the correct number of records are synced.