Skip to content

🚨🚨Source Facebook Marketing: Updated breakdowns schema - #36608

Merged
Daryna Ishchenko (darynaishchenko) merged 21 commits into
masterfrom
daryna/source-facebook-marketing/oc-4527/breakdown-properies
May 27, 2024
Merged

Daryna Ishchenko (darynaishchenko) merged 21 commits into
masterfrom
daryna/source-facebook-marketing/oc-4527/breakdown-properies

Conversation

@darynaishchenko

Copy link
Copy Markdown
Collaborator

OC issue: https://github.com/airbytehq/oncall/issues/4527

Schema for breakdowns fields was updated based based on user data and docs from string to object.

🚨Breaking changes: This PR contains breaking changes. Users will need to refresh schema and reset affected stream.
Affected stream: only custom insights reports as schema for AdInsights streams created according to defined breakdowns and base streams don't use breakdowns that were changed.

@vercel

vercel Bot commented Mar 28, 2024 •

Copy link
Copy Markdown

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 May 27, 2024 9:52am

@octavia-squidington-iii Octavia Squidington III (octavia-squidington-iii) added area/connectors Connector related issues area/documentation Improvements or additions to documentation labels Mar 28, 2024
@darynaishchenko Daryna Ishchenko (darynaishchenko) changed the title :🚨🚨: Source Facebook Marketing: Updated breakdowns schema 🚨🚨Source Facebook Marketing: Updated breakdowns schema Mar 28, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This change overall makes sense to me. I'd like to address my two comments before approving

- "ads_insights_dma"
- "ads_insights_action_product_id"
3.0.0:
message: "All Custom Insights Streams that uses body_asset, call_to_action_asset, description_asset, image_asset, link_url_asset, title_asset or video_asset as breakdown now have updated schemas. Users will need to retest source configuration, refresh the source schema and reset affected streams after upgrading. "

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's a shame that we can't target streams more specifically here as everyone will have to opt-in instead of just those with this specific situation.

Ella Rohm-Ensing (@erohmensing) do you know if there is a way to scope that better? Basically, the user can enter custom_insights.X.name which will create a stream named custom<custom_insights.X.name>. If we can scope even more/in another way, targeting some fields from the json schema would also be good.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if I user does not use body_asset, call_to_action_asset, description_asset, image_asset, link_url_asset, title_asset or video_asset they dont need to reset?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Kat Wilson (@katmarkham), you don't need a reset as your stream schema doesn't have fields above. The source returns stream schema according to provided breakdowns in the custom stream config.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe a broader discussion for my personal learning: do we need to make it a breaking change if we have these options now?

image

If so, I would keep the opt-in mechanism only for when the config is changing. In our case, it is only a schema change

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As Daryna Ishchenko (@darynaishchenko) mentioned in another comment, this would still be a breaking change because of the PK changing

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ella Rohm-Ensing (@erohmensing) do you know if there is a way to scope that better? Basically, the user can enter custom_insights.X.name which will create a stream named custom<custom_insights.X.name>. If we can scope even more/in another way, targeting some fields from the json schema would also be good.

I know this is over, but wanted to add - unfortunately I looked into this when we were creating it, but making some sort of regex matching or globbing proved to be something we couldn't implement because we are very lenient with characters in the stream names, meaning any character like * could be a wildcard or an actual character in the stream name.

},
"body_asset": {
"description": "The main content or message of the ad.",
"type": ["null", "object"],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One more random thought: we could maybe avoid the breaking change by adding a new field instead of re-using the same one. Something like body_asset_object and we can keep body_asset as str(data["body_asset"]). What I don't like about this solution though is that we start to drift from the API naming and it adds complexity in our code.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It would be a still breaking change due to change in pk. Because we also changed pk from value of str(data["body_asset"]) to body_asset_id.

- "ads_insights_dma"
- "ads_insights_action_product_id"
3.0.0:
message: "All Custom Insights Streams that uses body_asset, call_to_action_asset, description_asset, image_asset, link_url_asset, title_asset or video_asset as breakdown now have updated schemas. Users will need to retest source configuration, refresh the source schema and reset affected streams after upgrading. "

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if I user does not use body_asset, call_to_action_asset, description_asset, image_asset, link_url_asset, title_asset or video_asset they dont need to reset?

- "ads_insights_dma"
- "ads_insights_action_product_id"
3.0.0:
message: "All Custom Insights Streams that uses body_asset, call_to_action_asset, description_asset, image_asset, link_url_asset, title_asset or video_asset as breakdown now have updated schemas. Users will need to retest source configuration, refresh the source schema and reset affected streams after upgrading. "

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
message: "All Custom Insights Streams that uses body_asset, call_to_action_asset, description_asset, image_asset, link_url_asset, title_asset or video_asset as breakdown now have updated schemas. Users will need to retest source configuration, refresh the source schema and reset affected streams after upgrading. "
message: "There are breaking schema changes to Custom Insights Streams that use body_asset, call_to_action_asset, description_asset, image_asset, link_url_asset, title_asset or video_asset. If you use any of these streams, you will need to retest source configuration, refresh the source schema and reset affected streams after upgrading. "

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

updated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm good with this change. Thanks for addressing my questions/concerns!

This branch was successfully deployed

1 active deployment
Preview — c91cddce Deployed May 27, 2024 by vercel[bot]
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/facebook-marketing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants