Skip to content

Commit

Permalink
Source Facebook Marketing: Add cursor_field for custom_insights str…
Browse files Browse the repository at this point in the history
…eam schema (#17551)

Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
  • Loading branch information
grubberr authored Oct 4, 2022
1 parent 4ccbc67 commit f8987a0
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
- name: Facebook Marketing
sourceDefinitionId: e7778cfc-e97c-4458-9ecb-b4f2bba8946c
dockerRepository: airbyte/source-facebook-marketing
dockerImageTag: 0.2.66
dockerImageTag: 0.2.67
documentationUrl: https://docs.airbyte.io/integrations/sources/facebook-marketing
icon: facebook.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2561,7 +2561,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-facebook-marketing:0.2.66"
- dockerImage: "airbyte/source-facebook-marketing:0.2.67"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/facebook-marketing"
changelogUrl: "https://docs.airbyte.io/integrations/sources/facebook-marketing"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]


LABEL io.airbyte.version=0.2.66
LABEL io.airbyte.version=0.2.67
LABEL io.airbyte.name=airbyte/source-facebook-marketing
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def get_json_schema(self) -> Mapping[str, Any]:
loader = ResourceSchemaLoader(package_name_from_class(self.__class__))
schema = loader.get_schema("ads_insights")
if self._fields:
schema["properties"] = {k: v for k, v in schema["properties"].items() if k in self._fields}
schema["properties"] = {k: v for k, v in schema["properties"].items() if k in self._fields + [self.cursor_field]}
if self.breakdowns:
breakdowns_properties = loader.get_schema("ads_insights_breakdowns")["properties"]
schema["properties"].update({prop: breakdowns_properties[prop] for prop in self.breakdowns})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,5 @@ def test_fields_custom(self, api):
)

assert stream.fields == ["account_id", "account_currency"]
schema = stream.get_json_schema()
assert schema["properties"].keys() == set(["account_currency", "account_id", stream.cursor_field])
1 change: 1 addition & 0 deletions docs/integrations/sources/facebook-marketing.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ Please be informed that the connector uses the `lookback_window` parameter to pe

| Version | Date | Pull Request | Subject |
| :------ | :--------- | :------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 0.2.67 | 2022-10-04 | [17551](https://github.com/airbytehq/airbyte/pull/17551) | Add `cursor_field` for custom_insights stream schema |
| 0.2.65 | 2022-09-29 | [17371](https://github.com/airbytehq/airbyte/pull/17371) | Fix stream CustomConversions `enable_deleted=False` |
| 0.2.64 | 2022-09-22 | [17304](https://github.com/airbytehq/airbyte/pull/17304) | Migrate to per-stream state. |
| 0.2.64 | 2022-09-22 | [17027](https://github.com/airbytehq/airbyte/pull/17027) | Limit time range with 37 months when creating an insight job from lower edge object. Retry bulk request when getting error code `960` |
Expand Down

0 comments on commit f8987a0

Please sign in to comment.