Skip to content

Wrapper may be mangling primary keys #30

@edgarrmondragon

Description

@edgarrmondragon

Handling of Airbyte primary keys1 seems correct:

try:
# this is [[str, ...]] in the Airbyte catalog
if "primary_key" in stream and isinstance(stream["primary_key"][0], t.List):
airbyte_stream.primary_keys = stream["primary_key"][0]
elif "source_defined_primary_key" in stream and isinstance(
stream["source_defined_primary_key"][0], t.List
):
airbyte_stream.primary_keys = stream["source_defined_primary_key"][0]
except IndexError:
pass

i.e. getting the first primary key from the list of possible ones.

But we've seen a few cases where the tap seems to only be using the first element of the key, e.g. the "campaign.id" in the case of Google Ads campaigns2.

Footnotes

  1. https://docs.airbyte.com/understanding-airbyte/airbyte-protocol#catalog

  2. https://github.com/airbytehq/airbyte/blob/b309a7c30934456785ad990c47909e71a5ed6d37/airbyte-integrations/connectors/source-google-ads/source_google_ads/streams.py#L318

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions