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

✨ Source Facebook Marketing: Added fields in campaign schema #8257

Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"sourceDefinitionId": "e7778cfc-e97c-4458-9ecb-b4f2bba8946c",
"name": "Facebook Marketing",
"dockerRepository": "airbyte/source-facebook-marketing",
"dockerImageTag": "0.2.26",
"dockerImageTag": "0.2.27",
"documentationUrl": "https://docs.airbyte.io/integrations/sources/facebook-marketing",
"icon": "facebook.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
- name: Facebook Marketing
sourceDefinitionId: e7778cfc-e97c-4458-9ecb-b4f2bba8946c
dockerRepository: airbyte/source-facebook-marketing
dockerImageTag: 0.2.26
dockerImageTag: 0.2.27
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 @@ -1303,7 +1303,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-facebook-marketing:0.2.26"
- dockerImage: "airbyte/source-facebook-marketing:0.2.27"
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 @@ -12,5 +12,5 @@ RUN pip install .
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.2.26
LABEL io.airbyte.version=0.2.27
LABEL io.airbyte.name=airbyte/source-facebook-marketing
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,16 @@ def parse_call_rate_header(headers):
usage_header_business_loaded = json.loads(usage_header_business)
for business_object_id in usage_header_business_loaded:
usage_limits = usage_header_business_loaded.get(business_object_id)[0]
usage = max(usage, usage_limits.get("call_count"), usage_limits.get("total_cputime"), usage_limits.get("total_time"))
pause_interval = max(pause_interval, pendulum.duration(minutes=usage_limits.get("estimated_time_to_regain_access", 0)))
usage = max(
usage,
usage_limits.get("call_count"),
usage_limits.get("total_cputime"),
usage_limits.get("total_time"),
)
pause_interval = max(
pause_interval,
pendulum.duration(minutes=usage_limits.get("estimated_time_to_regain_access", 0)),
)

return usage, pause_interval

Expand Down
Original file line number Diff line number Diff line change
@@ -1,55 +1,116 @@
{
"properties": {
"name": {
"account_id": {
"type": ["null", "string"]
},
"objective": {
"type": ["null", "string"]
"adlabels": {
"type": ["null", "array"],
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"created_time": {
"type": "string",
"format": "date-time"
},
"updated_time": {
"type": "string",
"format": "date-time"
}
}
}
},
"id": {
"bid_strategy": {
"type": ["null", "string"]
},
"account_id": {
"type": ["null", "string"]
"budget_rebalance_flag": {
"type": ["null", "boolean"]
},
"effective_status": {
"type": ["null", "string"]
"budget_remaining": {
"type": ["null", "number"]
},
"buying_type": {
"type": ["null", "string"]
},
"spend_cap": {
"daily_budget": {
"type": ["null", "number"]
},
"start_time": {
"created_time": {
"type": "string",
"format": "date-time"
},
"updated_time": {
"type": "string",
"format": "date-time"
"effective_status": {
"type": ["null", "string"]
},
"adlabels": {
"id": {
"type": ["null", "string"]
},
"issues_info": {
"type": ["null", "array"],
"items": {
"type": "object",
"properties": {
"id": {
"error_code": {
"type": "string"
},
"name": {
"error_message": {
"type": "string"
},
"created_time": {
"type": "string",
"format": "date-time"
"error_summary": {
"type": "string"
},
"updated_time": {
"type": "string",
"format": "date-time"
"error_type": {
"type": "string"
},
"level": {
"type": "string"
}
}
}
},
"lifetime_budget": {
"type": ["null", "number"]
},
"name": {
"type": ["null", "string"]
},
"objective": {
"type": ["null", "string"]
},
"smart_promotion_type": {
"type": ["null", "string"]
},
"source_campaign_id": {
"type": ["null", "number"]
},
"special_ad_category": {
"type": ["null", "string"]
},
"special_ad_category_country": {
"type": ["null", "array"],
"items": {
"type": ["null", "string"]
}
},
"spend_cap": {
"type": ["null", "number"]
},
"start_time": {
"type": "string",
"format": "date-time"
},
"stop_time": {
"type": "string",
"format": "date-time"
},
"updated_time": {
"type": "string",
"format": "date-time"
}
},
"type": ["null", "object"]
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/facebook-marketing.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ As a summary, custom insights allows to replicate only some fields, resulting in

| Version | Date | Pull Request | Subject |
| :--- | :--- | :--- | :--- |
| 0.2.27 | 2021-11-29 | [8257](https://github.com/airbytehq/airbyte/pull/8257) | Add fields to Campaign stream |
| 0.2.26 | 2021-11-19 | [7855](https://github.com/airbytehq/airbyte/pull/7855) | Add Video stream |
| 0.2.25 | 2021-11-12 | [7904](https://github.com/airbytehq/airbyte/pull/7904) | Implement retry logic for async jobs |
| 0.2.24 | 2021-11-09 | [7744](https://github.com/airbytehq/airbyte/pull/7744) | Fix fail when async job takes too long |
Expand Down