Elias Gabriel
10/26/2023, 6:04 PMprimary_key and how does it relate to unique identity of records?kapa.ai
10/26/2023, 6:05 PMprimary key is a field or a combination of fields that is used to uniquely identify the entities of a table. It can be a single field, an array of fields representing a composite key, or an array of arrays representing a composite key where the fields are nested fields. For example, it can be a single field like "id" or a combination of fields like ["code", "type"] [[source](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/reference)]. In a database table, only one row per primary key value is permitted. In the data warehouse, multiple rows for the same primary key can be found in the history table. The unique records per primary key behavior is mirrored in the final table with incremental deduped sync mode. The primary key is then used to refer to the entity which values should be updated [[source](https://docs.airbyte.com/understanding-airbyte/connections/incremental-append-deduped)]. In some sources, the primary key can be determined without any user input. For example, in the (JDBC) Database sources, the primary key can be defined in the table's metadata [[source](https://docs.airbyte.com/understanding-airbyte/connections/incremental-append-deduped)]. In the context of Airbyte's incremental data synchronization, a primary key field is used to select only the most recent version of a given record from the history table for inclusion in the final deduplicated table, and all other historical versions of that record are not included [[source](https://airbyte.com/tutorials/incremental-data-synchronization)].Elias Gabriel
10/26/2023, 6:07 PMprimary_key is unique across both of those sources?kapa.ai
10/26/2023, 6:08 PM