From 7456082f5960af896740c6a9cc7e6805cf06d689 Mon Sep 17 00:00:00 2001 From: maxi297 Date: Thu, 9 Jan 2025 12:34:33 -0800 Subject: [PATCH] source-instagram remove deprecated metrics --- .../source_instagram/manifest.yaml | 13 ++++------ .../schemas/media_insights.json | 4 ---- .../schemas/user_insights.json | 24 ------------------- .../source_instagram/streams.py | 6 ----- 4 files changed, 4 insertions(+), 43 deletions(-) diff --git a/airbyte-integrations/connectors/source-instagram/source_instagram/manifest.yaml b/airbyte-integrations/connectors/source-instagram/source_instagram/manifest.yaml index a275ea368ed2..31fda37e216a 100644 --- a/airbyte-integrations/connectors/source-instagram/source_instagram/manifest.yaml +++ b/airbyte-integrations/connectors/source-instagram/source_instagram/manifest.yaml @@ -123,12 +123,12 @@ definitions: }}{% elif stream_partition.media_insights_info.media_type == "VIDEO" and stream_partition.media_insights_info.media_product_type == "FEED" - %}{{ 'impressions,reach,saved,video_views'}}{% elif + %}{{ 'impressions,reach,saved'}}{% elif stream_partition.media_insights_info.media_type == "VIDEO" %}{{ - 'impressions,reach,saved,video_views,likes,comments,shares,follows,profile_visits' + 'impressions,reach,saved,likes,comments,shares,follows,profile_visits' }}{%elif stream_partition.media_insights_info.media_type == - "CAROUSEL_ALBUM"%}{{ 'impressions,reach,saved,video_views,shares,follows,profile_visits' }}{% else %}{{ - 'impressions,reach,saved,video_views,likes,comments,shares,follows,profile_visits' }}{% + "CAROUSEL_ALBUM"%}{{ 'impressions,reach,saved,shares,follows,profile_visits' }}{% else %}{{ + 'impressions,reach,saved,likes,comments,shares,follows,profile_visits' }}{% endif %} error_handler: type: CompositeErrorHandler @@ -824,11 +824,6 @@ schemas: type: - "null" - integer - video_views: - description: The total number of views on video media. - type: - - "null" - - integer comments: description: The number of comments received on the media. type: diff --git a/airbyte-integrations/connectors/source-instagram/source_instagram/schemas/media_insights.json b/airbyte-integrations/connectors/source-instagram/source_instagram/schemas/media_insights.json index 4f29d9cb7609..4e40ddc80e52 100644 --- a/airbyte-integrations/connectors/source-instagram/source_instagram/schemas/media_insights.json +++ b/airbyte-integrations/connectors/source-instagram/source_instagram/schemas/media_insights.json @@ -33,10 +33,6 @@ "description": "The number of times users have saved the media.", "type": ["null", "integer"] }, - "video_views": { - "description": "The total number of views on video media.", - "type": ["null", "integer"] - }, "comments": { "description": "The number of comments received on the media.", "type": ["null", "integer"] diff --git a/airbyte-integrations/connectors/source-instagram/source_instagram/schemas/user_insights.json b/airbyte-integrations/connectors/source-instagram/source_instagram/schemas/user_insights.json index 146608072b19..608282394feb 100644 --- a/airbyte-integrations/connectors/source-instagram/source_instagram/schemas/user_insights.json +++ b/airbyte-integrations/connectors/source-instagram/source_instagram/schemas/user_insights.json @@ -19,34 +19,14 @@ "description": "The total number of followers for the user's account.", "type": ["null", "integer"] }, - "get_directions_clicks": { - "description": "The number of clicks to get directions to the user's business location.", - "type": ["null", "integer"] - }, "impressions": { "description": "The total number of times the user's content has been displayed.", "type": ["null", "integer"] }, - "phone_call_clicks": { - "description": "The number of clicks to call the user's business phone number.", - "type": ["null", "integer"] - }, - "profile_views": { - "description": "The total number of views on the user's profile.", - "type": ["null", "integer"] - }, "reach": { "description": "The total number of unique accounts that have seen the user's content.", "type": ["null", "integer"] }, - "text_message_clicks": { - "description": "The number of clicks to send text messages to the user.", - "type": ["null", "integer"] - }, - "website_clicks": { - "description": "The number of clicks on the website link in the user's profile.", - "type": ["null", "integer"] - }, "impressions_week": { "description": "The total number of impressions in the last week.", "type": ["null", "integer"] @@ -66,10 +46,6 @@ "online_followers": { "description": "The number of followers who are currently online.", "type": ["null", "object"] - }, - "email_contacts": { - "description": "The number of email contacts associated with the user's account.", - "type": ["null", "integer"] } } } diff --git a/airbyte-integrations/connectors/source-instagram/source_instagram/streams.py b/airbyte-integrations/connectors/source-instagram/source_instagram/streams.py index 397436a31bf0..e749492a381a 100644 --- a/airbyte-integrations/connectors/source-instagram/source_instagram/streams.py +++ b/airbyte-integrations/connectors/source-instagram/source_instagram/streams.py @@ -127,15 +127,9 @@ class UserInsights(DatetimeTransformerMixin, InstagramIncrementalStream): METRICS_BY_PERIOD = { "day": [ - "email_contacts", "follower_count", - "get_directions_clicks", "impressions", - "phone_call_clicks", - "profile_views", "reach", - "text_message_clicks", - "website_clicks", ], "week": ["impressions", "reach"], "days_28": ["impressions", "reach"],