✨ feat(Source facebook-marketing): pick fields from configured json schema properties if present - #41039
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
8aa9862 to
2a17e19
Compare
…json_schema_is_available_for_fields
…json_schema_is_available_for_fields
…json_schema_is_available_for_fields
…json_schema_is_available_for_fields
There was a problem hiding this comment.
LGTM!
nit: rename PR to align with Conventional Commits naming (see Notion Page)
…json_schema_is_available_for_fields
Alexandre Girard (girarda)
left a comment
There was a problem hiding this comment.
great work Aldo Gonzalez (@aldogonzalez8) !
| @HttpMocker() | ||
| def test_request_fields_from_json_schema_in_configured_catalog(self, http_mocker: HttpMocker) -> None: | ||
| """ | ||
| The purpose of this test is to check that the request fields are the same provided in json_request_schema inside configured catalog |
|
|
||
| | Version | Date | Pull Request | Subject | | ||
| |:--------|:-----------|:---------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| | 3.3.9 | 2024-07-08 | [41039](https://github.com/airbytehq/airbyte/pull/41039) | Pick request fields from configured json schema properties if present | |
There was a problem hiding this comment.
Aldo Gonzalez (@aldogonzalez8) Artem Inzhyyants (@artem1205) can you also update the docs with instructions for the end-users on how to handle the Please reduce the amount of data you're asking for, then retry your request error?
There was a problem hiding this comment.
Alexandre Girard (@girarda) Artem Inzhyyants (@artem1205) I have just updated the documentation. Do you feel comfortable with these instructions and wording?
There was a problem hiding this comment.
looks good thank you!
|
Important Review skippedAuto reviews are limited to specific labels. Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
…lds requested to facebook graph api
Thanks, updated. |
…chema properties if present (#41039)

What
We have seen errors from facebook API like this:
{ "error": { "code": 1, "message": "Please reduce the amount of data you're asking for, then retry your request" } }ref:
We want to provide users the ability to reduce the requested fields, so Artem Inzhyyants (@artem1205) worked with ticket 2100 and the PR 39522 to "add json_schema from ConfiguredCatalog to Stream" and now in ticket 8496 we will implement the new cdk feature to determine the requested fields for facebook-marketing.
How
When calling fields(), check first configured_json_schema; if provided, use properties keys as fields; if not, fallback in current behavior (use stream schema).
DEMO
Review guide
airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/base_insight_streams.py: add check for self.configured_json_schemaairbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/base_streams.py: add check for self.configured_json_schemaairbyte-integrations/connectors/source-facebook-marketing/pyproject.toml: we need new cdk feature that pass configured_catalog selected fields from platform.User Impact
Users will now be able to reduce the requested fields simply checking/unchecking fields from stream configuration.
Can this PR be safely reverted and rolled back?