Skip to content

Commit

Permalink
🐛 Source Pinterest: Fix Advertiser stream names (#32734)
Browse files Browse the repository at this point in the history
  • Loading branch information
tolik0 authored and git-phu committed Nov 28, 2023
1 parent 227e954 commit cda7525
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
{"stream": "user_account_analytics", "data": {"date": "2023-11-09", "data_status": "READY", "metrics": {"SAVE": 2.0, "OUTBOUND_CLICK_RATE": 0.0043859649122807015, "IMPRESSION": 912.0, "VIDEO_START": 0, "SAVE_RATE": 0.0021929824561403508, "QUARTILE_95_PERCENT_VIEW": 0, "ENGAGEMENT": 22.0, "VIDEO_AVG_WATCH_TIME": 0.0, "ENGAGEMENT_RATE": 0.02412280701754386, "PIN_CLICK": 17, "VIDEO_10S_VIEW": 0, "FULL_SCREEN_PLAY": 0, "CLOSEUP_RATE": 0.017543859649122806, "FULL_SCREEN_PLAYTIME": 0, "VIDEO_V50_WATCH_TIME": 0, "VIDEO_MRC_VIEW": 0, "CLICKTHROUGH": 4.0, "CLICKTHROUGH_RATE": 0.0043859649122807015, "OUTBOUND_CLICK": 4, "CLOSEUP": 16.0, "PIN_CLICK_RATE": 0.01864035087719298}}, "emitted_at": 1699894362486}
{"stream": "keywords", "data": {"archived": false, "id": "2886935172273", "parent_id": "2680068678965", "parent_type": "AD_GROUP", "type": "KEYWORD", "bid": null, "match_type": "BROAD", "value": "data science"}, "emitted_at": 1699393669235}
{"stream": "audiences", "data": {"type": "audience", "id": "2542622254639", "name": "airbyte audience", "ad_account_id": "549761668032", "audience_type": "ENGAGEMENT", "description": "airbyte audience", "status": "TOO_SMALL", "rule": {"engager_type": 1}}, "emitted_at": 1699293090886}
{"stream": "advertizer_report", "data": {"ADVERTISER_ID": 549761668032.0, "AD_ACCOUNT_ID": "549761668032", "EENGAGEMENT_RATE": 0.1, "ENGAGEMENT_2": 1.0, "IMPRESSION_2": 10.0, "REPIN_2": 1.0, "TOTAL_ENGAGEMENT": 1.0, "TOTAL_IMPRESSION_FREQUENCY": 5.0, "TOTAL_IMPRESSION_USER": 2.0, "TOTAL_REPIN_RATE": 0.1, "DATE": "2023-02-10"}, "emitted_at": 1699894848024}
{"stream": "advertizer_targeting_report", "data": {"ADVERTISER_ID": 549761668032.0, "AD_ACCOUNT_ID": "549761668032", "IMPRESSION_2": 1.0, "TARGETING_VALUE": "Education > Subjects > Science > Applied Science > Technology", "TARGETING_TYPE": "TARGETED_INTEREST", "DATE": "2023-10-29"}, "emitted_at": 1699894982269}
{"stream": "advertiser_report", "data": {"ADVERTISER_ID": 549761668032.0, "AD_ACCOUNT_ID": "549761668032", "EENGAGEMENT_RATE": 0.1, "ENGAGEMENT_2": 1.0, "IMPRESSION_2": 10.0, "REPIN_2": 1.0, "TOTAL_ENGAGEMENT": 1.0, "TOTAL_IMPRESSION_FREQUENCY": 5.0, "TOTAL_IMPRESSION_USER": 2.0, "TOTAL_REPIN_RATE": 0.1, "DATE": "2023-02-10"}, "emitted_at": 1699894848024}
{"stream": "advertiser_targeting_report", "data": {"ADVERTISER_ID": 549761668032.0, "AD_ACCOUNT_ID": "549761668032", "IMPRESSION_2": 1.0, "TARGETING_VALUE": "Education > Subjects > Science > Applied Science > Technology", "TARGETING_TYPE": "TARGETED_INTEREST", "DATE": "2023-10-29"}, "emitted_at": 1699894982269}
{"stream": "ad_group_report", "data": {"ADVERTISER_ID": 549761668032.0, "AD_ACCOUNT_ID": "549761668032", "AD_GROUP_ENTITY_STATUS": "ACTIVE", "AD_GROUP_ID": "2680068678993", "CAMPAIGN_DAILY_SPEND_CAP": 25000000.0, "CAMPAIGN_ENTITY_STATUS": "ACTIVE", "CAMPAIGN_ID": 626744128982.0, "CAMPAIGN_LIFETIME_SPEND_CAP": 0.0, "CAMPAIGN_NAME": "2021-06-08 09:08 UTC | Brand awareness", "IMPRESSION_2": 1.0, "TOTAL_IMPRESSION_FREQUENCY": 1.0, "TOTAL_IMPRESSION_USER": 1.0, "DATE": "2023-10-29"}, "emitted_at": 1699895043538}
{"stream": "ad_group_targeting_report", "data": {"ADVERTISER_ID": 549761668032.0, "AD_ACCOUNT_ID": "549761668032", "AD_GROUP_ENTITY_STATUS": "ACTIVE", "AD_GROUP_ID": "2680068678993", "CAMPAIGN_DAILY_SPEND_CAP": 25000000.0, "CAMPAIGN_ENTITY_STATUS": "ACTIVE", "CAMPAIGN_ID": 626744128982.0, "CAMPAIGN_LIFETIME_SPEND_CAP": 0.0, "CAMPAIGN_NAME": "2021-06-08 09:08 UTC | Brand awareness", "IMPRESSION_2": 1.0, "TARGETING_VALUE": "TWOCOLUMN_FEED", "TARGETING_TYPE": "FEED_TYPE", "DATE": "2023-10-29"}, "emitted_at": 1699895106949}
{"stream": "pin_promotion_report", "data": {"ADVERTISER_ID": 549761668032.0, "AD_ACCOUNT_ID": "549761668032", "AD_GROUP_ENTITY_STATUS": "ACTIVE", "AD_GROUP_ID": "2680068678993", "AD_ID": "687218400210", "CAMPAIGN_DAILY_SPEND_CAP": 25000000.0, "CAMPAIGN_ENTITY_STATUS": "ACTIVE", "CAMPAIGN_ID": 626744128982.0, "CAMPAIGN_LIFETIME_SPEND_CAP": 0.0, "CAMPAIGN_NAME": "2021-06-08 09:08 UTC | Brand awareness", "IMPRESSION_2": 1.0, "PIN_ID": 6.66743919837295e+17, "PIN_PROMOTION_ID": 687218400210.0, "TOTAL_IMPRESSION_FREQUENCY": 1.0, "TOTAL_IMPRESSION_USER": 1.0, "DATE": "2023-10-29"}, "emitted_at": 1699895200157}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ data:
releases:
breakingChanges:
1.0.0:
message: "This release updates the date-time fields to use the Airbyte format `timestamp_without_timezone`. This change affects all streams where date-time fields are present, ensuring more accurate and standardized time representations: BoardPins, BoardSectionPins, Boards, Catalogs, and CatalogFeeds. Users will need to refresh the source schema and reset affected streams after upgrading."
message: "This release updates the date-time fields to use the Airbyte format `timestamp_without_timezone`. This change affects all streams where date-time fields are present, ensuring more accurate and standardized time representations: BoardPins, BoardSectionPins, Boards, Catalogs, and CatalogFeeds. Additionally, the stream names AdvertizerReport and AdvertizerTargetingReport have been renamed to AdvertiserReport and AdvertiserTargetingReport, respectively. Users will need to refresh the source schema and reset affected streams after upgrading."
upgradeDeadline: "2023-12-14"
suggestedStreams:
streams:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@ def level(self):
return "CAMPAIGN_TARGETING"


class AdvertizerReport(PinterestAnalyticsReportStream):
class AdvertiserReport(PinterestAnalyticsReportStream):
@property
def level(self):
return "ADVERTISER"


class AdvertizerTargetingReport(PinterestAnalyticsTargetingReportStream):
class AdvertiserTargetingReport(PinterestAnalyticsTargetingReportStream):
@property
def level(self):
return "ADVERTISER_TARGETING"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from .reports.reports import (
AdGroupReport,
AdGroupTargetingReport,
AdvertizerReport,
AdvertizerTargetingReport,
AdvertiserReport,
AdvertiserTargetingReport,
CampaignTargetingReport,
CustomReport,
KeywordReport,
Expand Down Expand Up @@ -153,8 +153,8 @@ def streams(self, config: Mapping[str, Any]) -> List[Stream]:
Catalogs(config=config),
CatalogsFeeds(config=config),
CatalogsProductGroups(config=config),
AdvertizerReport(ad_accounts, config=report_config),
AdvertizerTargetingReport(ad_accounts, config=report_config),
AdvertiserReport(ad_accounts, config=report_config),
AdvertiserTargetingReport(ad_accounts, config=report_config),
AdGroupReport(ad_accounts, config=report_config),
AdGroupTargetingReport(ad_accounts, config=report_config),
PinPromotionReport(ad_accounts, config=report_config),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from source_pinterest.reports.reports import (
AdGroupReport,
AdGroupTargetingReport,
AdvertizerReport,
AdvertizerTargetingReport,
AdvertiserReport,
AdvertiserTargetingReport,
CampaignTargetingReport,
KeywordReport,
PinPromotionReport,
Expand Down Expand Up @@ -108,8 +108,8 @@ def test_custom_streams(test_config):
[
[CampaignAnalyticsReport, 'CAMPAIGN'],
[CampaignTargetingReport, 'CAMPAIGN_TARGETING'],
[AdvertizerReport, 'ADVERTISER'],
[AdvertizerTargetingReport, 'ADVERTISER_TARGETING'],
[AdvertiserReport, 'ADVERTISER'],
[AdvertiserTargetingReport, 'ADVERTISER_TARGETING'],
[AdGroupReport, 'AD_GROUP'],
[AdGroupTargetingReport, 'AD_GROUP_TARGETING'],
[PinPromotionReport, 'PIN_PROMOTION'],
Expand Down
2 changes: 1 addition & 1 deletion docs/integrations/sources/pinterest-migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Upgrading to 1.0.0

This release updates date-time fields with airbyte_type: timestamp_without_timezone for streams BoardPins, BoardSectionPins, Boards, Catalogs, CatalogFeeds.
This release updates date-time fields with airbyte_type: timestamp_without_timezone for streams BoardPins, BoardSectionPins, Boards, Catalogs, CatalogFeeds. Additionally, the stream names AdvertizerReport and AdvertizerTargetingReport have been renamed to AdvertiserReport and AdvertiserTargetingReport, respectively.

To ensure uninterrupted syncs, users should:
- Refresh the source schema
Expand Down
Loading

0 comments on commit cda7525

Please sign in to comment.