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

Remove total_interactions metric for CAROUSEL_ALBUM #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tap_instagram/streams.py
Copy link
Collaborator

Choose a reason for hiding this comment

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

help me understand what this is doing. if media_product_type is ad or feed and media_type != video then we're adding total_interactions and we're also removing it from media type carousel album? did they move the metric? why does this work?

Copy link
Contributor Author

@diwakarkasi diwakarkasi Mar 8, 2024

Choose a reason for hiding this comment

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

To your first statement, yes thats what is being done. To the second, I have no idea... the pipelines started failing with this error all of a sudden and the API docs didn't suggest anything about removing this metric. Here is one useful thread I found but thats still unresolved.

https://developers.facebook.com/community/threads/1094518705074298/

More importantly, the pipelines this morning (Mar 8th 2024) ran just fine with no issues.

So looks like Meta was being Meta and just wasted sometime of ours.

So we could probably leave this PR out here for now and I will close it after a few days if there are no interruptions.

Copy link
Collaborator

Choose a reason for hiding this comment

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

haha okay leave it open and i guess this is a small enough detail that we don't need to fully understand it.

Original file line number Diff line number Diff line change
Expand Up @@ -472,17 +472,17 @@ def _metrics_for_media_type(media_type: str, media_product_type: str):
]
else: # media_product_type is "AD" or "FEED"
metrics = [
"total_interactions",
"impressions",
"reach",
"saved",
]
if media_type == "VIDEO":
metrics.append("video_views")
else:
metrics.append("total_interactions")
return metrics
elif media_type == "CAROUSEL_ALBUM":
return [
"total_interactions",
"impressions",
"reach",
"saved",
Expand Down
Loading