Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚨🚨 Source Linkedin Ads: Update pivotValues pk type for Ad Analytics streams #37531

Merged

Conversation

darynaishchenko
Copy link
Collaborator

@darynaishchenko darynaishchenko commented Apr 24, 2024

What

oncall: https://github.com/airbytehq/oncall/issues/5022
Some destinations(BigQuery) cannot use array as pk.

How

Added new field string_of_pivot_values, which added to records while transformation process and contains joined by "," string of pivot values, and set this field as pk.
pivotValues are still present in record and users can query simply by this array of pivotValue.

Review guide

User Impact

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

@darynaishchenko darynaishchenko self-assigned this Apr 24, 2024
Copy link

vercel bot commented Apr 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 24, 2024 4:29pm

@octavia-squidington-iii octavia-squidington-iii added area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/linkedin-ads labels Apr 24, 2024
@@ -48,6 +48,23 @@ data:
- "ad_member_seniority_analytics"
- "ad_member_region_analytics"
- "ad_member_company_analytics"
2.0.0:
message: This upgrade changes primary key for *-analytics streams from pivotValues[array of strings] to string_of_pivot_values[string].
Copy link
Contributor

Choose a reason for hiding this comment

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

This upgrade changes primary key for *-analytics streams from pivotValues[array of strings] to string_of_pivot_values[string] so that it is compatible with more destination types.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

@@ -1,5 +1,36 @@
# LinkedIn Ads Migration Guide

## Upgrading to 2.0.0

Version 2.0.0 introduces changes in the primary key selected for all *-analytics streams (including custom ones).
Copy link
Contributor

Choose a reason for hiding this comment

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

Add this also: This upgrade changes primary key for *-analytics streams from pivotValues[array of strings] to string_of_pivot_values[string].

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

@octavia-squidington-iv octavia-squidington-iv requested a review from a team April 24, 2024 14:21
Comment on lines +332 to +333
if "pivotValues" in record:
record = transform_pivot_values(record)
Copy link
Contributor

Choose a reason for hiding this comment

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

This 'if' implies that one of the primary keys for the stream can be null. Is it the case that at least the other PK, end_date, will always be non-null?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This method is common for all streams, so non ad-analytics streams doesn't have pivotValues field. ad-analytics streams always have pivotValues and end_date.

@darynaishchenko darynaishchenko merged commit 9eae446 into master Apr 24, 2024
34 checks passed
@darynaishchenko darynaishchenko deleted the daryna/source-linkedin-ads/change-pk-pivotValues-type branch April 24, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/linkedin-ads
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants