Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions airbyte/shared/catalog_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ def get_primary_keys(
]

for pk_nodes in normalized_pks:
if len(pk_nodes) != 1:
if any("." in node for node in pk_nodes):
Copy link

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The validation logic may incorrectly reject valid field names that contain dots but are not nested references. Consider using a more robust check that distinguishes between legitimate field names with dots and actual nested field paths.

Suggested change
if any("." in node for node in pk_nodes):
if len(pk_nodes) > 1:

Copilot uses AI. Check for mistakes.

raise exc.AirbyteError(
message=(
"Nested primary keys are not supported. "
"Each PK column should have exactly one node. "
"Primary key columns should reference top-level fields only. "
),
context={
"stream_name": stream_name,
Expand Down