Skip to content

Commit 42f3c92

Browse files
darynaishchenkomaxi297
andauthored
🚨🚨🚨 fix(source-linkedin-ads) updated pk for ad_campaign_analytics and custom reports (#48451)
Co-authored-by: maxi297 <[email protected]>
1 parent b8faac7 commit 42f3c92

File tree

5 files changed

+108
-66
lines changed

5 files changed

+108
-66
lines changed

‎airbyte-integrations/connectors/source-linkedin-ads/metadata.yaml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ data:
1111
connectorSubtype: api
1212
connectorType: source
1313
definitionId: 137ece28-5434-455c-8f34-69dc3782f451
14-
dockerImageTag: 4.1.4
14+
dockerImageTag: 5.0.0
1515
dockerRepository: airbyte/source-linkedin-ads
1616
documentationUrl: https://docs.airbyte.com/integrations/sources/linkedin-ads
1717
githubIssueLabel: source-linkedin-ads
@@ -87,6 +87,10 @@ data:
8787
- "creatives"
8888
- "campaign_groups"
8989
- "conversions"
90+
5.0.0:
91+
message: We would like to inform you that the Primary Key (PK) for ad_campaign_analytics and Custom Ad Analytics Reports streams has been changed from [string_of_pivot_values, end_date] to [string_of_pivot_values, end_date, sponsoredCampaign] and Primary Key (PK) for account_users stream has been changed from [account] to [account, user]. This update is intended to improve data integrity and ensure optimal performance. Upgrade LinkedIn Ads to apply these changes immediately. Otherwise, LinkedIn Ads will be upgraded automatically on 2024-12-10.
92+
upgradeDeadline: "2024-12-10"
93+
deadlineAction: "auto_upgrade"
9094
suggestedStreams:
9195
streams:
9296
- accounts

‎airbyte-integrations/connectors/source-linkedin-ads/pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
33
build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
6-
version = "4.1.4"
6+
version = "5.0.0"
77
name = "source-linkedin-ads"
88
description = "Source implementation for Linkedin Ads."
99
authors = [ "Airbyte <[email protected]>",]

‎airbyte-integrations/connectors/source-linkedin-ads/source_linkedin_ads/manifest.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ definitions:
5555
name: account_users
5656
primary_key:
5757
- account
58+
- user
5859
retriever:
5960
type: SimpleRetriever
6061
requester:
@@ -387,6 +388,7 @@ definitions:
387388
primary_key:
388389
- string_of_pivot_values
389390
- end_date
391+
- sponsoredCampaign
390392
retriever:
391393
class_name: "source_linkedin_ads.components.LinkedInAdsCustomRetriever"
392394
requester:

‎docs/integrations/sources/linkedin-ads-migrations.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# LinkedIn Ads Migration Guide
22

3+
## Upgrading to 5.0.0
4+
5+
With LinkedIn Ads v5.0.0, we modified primary keys for stream(s): `ad_campaign_analytics`, `Custom Ad Analytics Reports`, `account_users`.
6+
7+
This enhances data integrity and improves the efficiency of your syncs. Users with deduping enabled on those streams might have missing data as records would have been collapsed on the wrong primary key. We highly recommend initiating a connection refresh to ensure all the data is available in the destination.
8+
9+
- `ad_campaign_analytics`
10+
- `Custom Ad Analytics Reports`
11+
12+
| Old PK | New PK |
13+
|:-------------------------------------|:--------------------------------------------------------|
14+
| `[string_of_pivot_values, end_date]` | `[string_of_pivot_values, end_date, sponsoredCampaign]` |
15+
16+
- `account_users`
17+
18+
| Old PK | New PK |
19+
|:------------|:------------------|
20+
| `[account]` | `[account, user]` |
21+
22+
## Migration Steps
23+
24+
Clearing your data is required for the affected streams in order to continue syncing successfully. To clear your data
25+
for the affected streams, follow the steps below:
26+
27+
1. Select **Connections** in the main navbar and select the connection(s) affected by the update.
28+
2. Select the **Schema** tab.
29+
1. Select **Refresh source schema** to bring in any schema changes. Any detected schema changes will be listed for your review.
30+
2. Select **OK** to approve changes.
31+
3. Select **Save changes** at the bottom of the page.
32+
1. Ensure the **Clear affected streams** option is checked to ensure your streams continue syncing successfully with the new schema.
33+
4. Select **Save connection**.
34+
35+
This will clear the data in your destination for the subset of streams with schema changes. After the clear succeeds,
36+
trigger a sync by clicking **Sync Now**. For more information on clearing your data in Airbyte, see [this page](/operator-guides/clear).
37+
338
## Upgrading to 4.0.0
439

540
Version 3.X.X introduced a regression in the connector that was reverted in 4.0.0. If you were using 3.X.X, please go through the migration steps. If you were still using 2.X.X, please upgrade to 4.0.0; after that, there are no additional actions required.

0 commit comments

Comments
 (0)