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.
Handling of Airbyte primary keys1 seems correct:
tap-airbyte-wrapper/tap_airbyte/tap.py
Lines 915 to 924 in bb7999a
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
https://docs.airbyte.com/understanding-airbyte/airbyte-protocol#catalog ↩
https://github.com/airbytehq/airbyte/blob/b309a7c30934456785ad990c47909e71a5ed6d37/airbyte-integrations/connectors/source-google-ads/source_google_ads/streams.py#L318 ↩