Neeraj N
10/31/2025, 7:24 AMkapa.ai
10/31/2025, 7:24 AMid) or a combination of fields if no single unique field exists. This approach is consistent across different source types, including MySQL, MSSQL, PostgreSQL, and MongoDB, when configuring connectors in Airbyte. How to Specify the Primary Key: - Single Field Example: If your table has a unique id field, set the primary key to id. - Composite Key Example: If uniqueness is guaranteed by a combination of fields (e.g., code and type), set the primary key to code, type. Example JSON for Composite Key: json "primary_key": ["code", "type"] This configuration is set in the Airbyte Connector Builder UI or in the connector's configuration JSON. The process is the same regardless of the underlying database (MySQL, MSSQL, PostgreSQL, MongoDB), as Airbyte abstracts the primary key concept for de-duplication and record identification purposes. References: - The documentation provides examples and guidance on setting the primary key for record processing in Airbyte connectors, including cases where a composite key is needed if no single unique field exists [Record Processing: Meta data](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/record-processing#meta-data). Note: The knowledge sources do not provide database-specific SQL queries or commands for discovering primary keys directly from MySQL, MSSQL, PostgreSQL, or MongoDB. They focus on how to configure primary keys within Airbyte for connector and sync purposes. If you need to programmatically discover primary keys from the source databases themselves, that information is not covered in the provided documentation.