Skip to content

Commit 7bf86ab

Browse files
committed
Merge branch 'devin/1751064114-fix-primary-key-fallback' of https://github.com/airbytehq/airbyte-python-cdk into devin/1751064114-fix-primary-key-fallback
2 parents 625cd1e + 74240ab commit 7bf86ab

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

airbyte_cdk/sql/shared/catalog_providers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,14 @@ def get_primary_keys(
120120
self,
121121
stream_name: str,
122122
) -> list[str] | None:
123-
"""Return the primary keys for the given stream.
123+
"""Return the primary key column names for the given stream.
124124
125125
We return `source_defined_primary_key` if set, or `primary_key` otherwise. If both are set,
126126
we assume they should not should differ, since Airbyte data integrity constraints do not
127127
permit overruling a source's pre-defined primary keys. If neither is set, we return `None`.
128+
129+
Returns:
130+
A list of column names that constitute the primary key, or None if no primary key is defined.
128131
"""
129132
configured_stream = self.get_configured_stream_info(stream_name)
130133
pks = configured_stream.stream.source_defined_primary_key or configured_stream.primary_key

0 commit comments

Comments
 (0)