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 FB Marketing: add time_increment parameter to custom insight streams #10531

Merged
merged 36 commits into from
Mar 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7b036f8
added time_increment parameter
eugene-kulak Feb 22, 2022
63ff487
update changelog
eugene-kulak Feb 22, 2022
9442a27
update pre-commit and fix format
eugene-kulak Feb 22, 2022
18e7a1f
fix tests
eugene-kulak Feb 22, 2022
9c5f1ba
fix integration tests
eugene-kulak Feb 22, 2022
3195f76
format
eugene-kulak Feb 22, 2022
36a0c28
update SAT
eugene-kulak Feb 22, 2022
86e6b45
update configured_catalog.json to include all streams
eugene-kulak Feb 22, 2022
85f16a7
update spec
eugene-kulak Feb 22, 2022
6e008d5
fix custom insights
eugene-kulak Feb 22, 2022
cd6353f
Merge remote-tracking branch 'origin/master' into keu/6225-source-fb-…
eugene-kulak Feb 22, 2022
20203aa
bump version
eugene-kulak Feb 22, 2022
27cb4d3
fix unit_tests and restore retry logic for 500
eugene-kulak Feb 22, 2022
c4a546d
format
eugene-kulak Feb 22, 2022
b60af79
Merge remote-tracking branch 'origin/master' into keu/6225-source-fb-…
eugene-kulak Feb 22, 2022
b1ab539
fix tests and format
eugene-kulak Feb 22, 2022
2d0887e
Merge branch 'master' into keu/6225-source-fb-add-time-increment
keu Feb 23, 2022
e8419cc
Merge branch 'master' into keu/6225-source-fb-add-time-increment
keu Feb 24, 2022
a669716
Update airbyte-integrations/connectors/source-facebook-marketing/sour…
keu Feb 28, 2022
e1f28ee
Update airbyte-integrations/connectors/source-facebook-marketing/sour…
keu Feb 28, 2022
022e7ed
address comment from @sherifnada
eugene-kulak Feb 28, 2022
60e26fe
address comment from @sherifnada
eugene-kulak Feb 28, 2022
cb89b11
fix tests
eugene-kulak Feb 28, 2022
e328534
format
eugene-kulak Feb 28, 2022
ae24edf
fix sonar qube criticals
eugene-kulak Feb 28, 2022
dfe302a
fix sonar qube majors
eugene-kulak Feb 28, 2022
46c1f54
Update airbyte-integrations/connectors/source-facebook-marketing/sour…
keu Mar 1, 2022
ccb850a
Update airbyte-integrations/connectors/source-facebook-marketing/sour…
keu Mar 1, 2022
22e74cb
Merge remote-tracking branch 'origin/master' into keu/6225-source-fb-…
eugene-kulak Mar 1, 2022
44add1e
explanify meating of time_increment param
eugene-kulak Mar 3, 2022
9acbea3
Update airbyte-integrations/connectors/source-facebook-marketing/sour…
keu Mar 4, 2022
962c4b1
Update airbyte-integrations/connectors/source-facebook-marketing/sour…
keu Mar 5, 2022
c141cb7
Merge remote-tracking branch 'origin/master' into keu/6225-source-fb-…
eugene-kulak Mar 5, 2022
9ed2d33
bump version
eugene-kulak Mar 5, 2022
0b29bc0
update spec for SAT
eugene-kulak Mar 8, 2022
51bdf66
bump version
eugene-kulak Mar 8, 2022
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 @@ -203,7 +203,7 @@
- name: Facebook Marketing
sourceDefinitionId: e7778cfc-e97c-4458-9ecb-b4f2bba8946c
dockerRepository: airbyte/source-facebook-marketing
dockerImageTag: 0.2.37
dockerImageTag: 0.2.38
documentationUrl: https://docs.airbyte.io/integrations/sources/facebook-marketing
icon: facebook.svg
sourceType: api
Expand Down
39 changes: 38 additions & 1 deletion airbyte-config/init/src/main/resources/seed/source_specs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1661,7 +1661,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-facebook-marketing:0.2.37"
- dockerImage: "airbyte/source-facebook-marketing:0.2.38"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/facebook-marketing"
changelogUrl: "https://docs.airbyte.io/integrations/sources/facebook-marketing"
Expand Down Expand Up @@ -1737,6 +1737,7 @@
description: "The name value of insight"
type: "string"
fields:
title: "Fields"
description: "A list of chosen fields for fields parameter"
default: []
type: "array"
Expand Down Expand Up @@ -1876,6 +1877,7 @@
- "website_purchase_roas"
- "wish_bid"
breakdowns:
title: "Breakdowns"
description: "A list of chosen breakdowns for breakdowns"
default: []
type: "array"
Expand Down Expand Up @@ -1909,6 +1911,7 @@
- "title_asset"
- "video_asset"
action_breakdowns:
title: "Action Breakdowns"
description: "A list of chosen action_breakdowns for action_breakdowns"
default: []
type: "array"
Expand All @@ -1927,6 +1930,40 @@
- "action_type"
- "action_video_sound"
- "action_video_type"
time_increment:
title: "Time Increment"
description: "Time window in days by which to aggregate statistics.\
\ The sync will be chunked into N day intervals, where N is the\
\ number of days you specified. For example, if you set this value\
\ to 7, then all statistics will be reported as 7-day aggregates\
\ by starting from the start_date. If the start and end dates are\
\ October 1st and October 30th, then the connector will output 5\
\ records: 01 - 06, 07 - 13, 14 - 20, 21 - 27, and 28 - 30 (3 days\
\ only)."
default: 1
exclusiveMaximum: 90
exclusiveMinimum: 0
type: "integer"
start_date:
title: "Start Date"
description: "The date from which you'd like to replicate data for\
\ this stream, in the format YYYY-MM-DDT00:00:00Z."
pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
examples:
- "2017-01-25T00:00:00Z"
type: "string"
format: "date-time"
end_date:
title: "End Date"
description: "The date until which you'd like to replicate data for\
\ this stream, in the format YYYY-MM-DDT00:00:00Z. All data generated\
\ between the start date and this date will be replicated. Not setting\
\ this option will result in always syncing the latest data."
pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
examples:
- "2017-01-26T00:00:00Z"
type: "string"
format: "date-time"
required:
- "name"
required:
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.37
LABEL io.airbyte.version=0.2.38
LABEL io.airbyte.name=airbyte/source-facebook-marketing
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ tests:
empty_streams: ["videos"]
incremental:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog_without_insights.json"
future_state_path: "integration_tests/future_state.json"
full_refresh:
- config_path: "secrets/config.json"
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,45 @@
"streams": [
{
"stream": {
"name": "images",
"name": "ad_account",
"json_schema": {},
"supported_sync_modes": ["full_refresh"],
"source_defined_cursor": null,
"default_cursor_field": null,
"source_defined_primary_key": [["id"]],
"namespace": null
},
"sync_mode": "full_refresh",
"cursor_field": null,
"destination_sync_mode": "append",
"primary_key": null
},
{
"stream": {
"name": "ad_sets",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["updated_time"],
"source_defined_primary_key": [["id"]],
"namespace": null
},
"sync_mode": "incremental",
"sync_mode": "full_refresh",
"cursor_field": null,
"destination_sync_mode": "append",
"primary_key": null
},
{
"stream": {
"name": "ads",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["updated_time"],
"source_defined_primary_key": [["id"]],
"namespace": null
},
"sync_mode": "full_refresh",
"cursor_field": null,
"destination_sync_mode": "append",
"primary_key": null
Expand All @@ -34,29 +64,206 @@
"stream": {
"name": "ads_insights",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["date_start"],
"source_defined_primary_key": [
["date_start"],
["account_id"],
["ad_id"]
],
"namespace": null
},
"sync_mode": "full_refresh",
"cursor_field": null,
"destination_sync_mode": "append",
"primary_key": null
},
{
"stream": {
"name": "ads_insights_age_and_gender",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["date_start"],
"source_defined_primary_key": [
["date_start"],
["account_id"],
["ad_id"],
["age"],
["gender"]
],
"namespace": null
},
"sync_mode": "full_refresh",
"cursor_field": null,
"destination_sync_mode": "append",
"primary_key": null
},
{
"stream": {
"name": "ads_insights_country",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["date_start"],
"source_defined_primary_key": [
["date_start"],
["account_id"],
["ad_id"],
["country"]
],
"namespace": null
},
"sync_mode": "full_refresh",
"cursor_field": null,
"destination_sync_mode": "append",
"primary_key": null
},
{
"stream": {
"name": "ads_insights_region",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"source_defined_primary_key": []
"default_cursor_field": ["date_start"],
"source_defined_primary_key": [
["date_start"],
["account_id"],
["ad_id"],
["region"]
],
"namespace": null
},
"sync_mode": "incremental",
"primary_key": [],
"cursor_field": ["date_start"],
"destination_sync_mode": "append"
"sync_mode": "full_refresh",
"cursor_field": null,
"destination_sync_mode": "append",
"primary_key": null
},
{
"stream": {
"name": "ads_insights_dma",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["date_start"],
"source_defined_primary_key": [
["date_start"],
["account_id"],
["ad_id"],
["dma"]
],
"namespace": null
},
"sync_mode": "full_refresh",
"cursor_field": null,
"destination_sync_mode": "append",
"primary_key": null
},
{
"stream": {
"name": "ads_insights_platform_and_device",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["date_start"],
"source_defined_primary_key": [
["date_start"],
["account_id"],
["ad_id"],
["publisher_platform"],
["platform_position"],
["impression_device"]
],
"namespace": null
},
"sync_mode": "full_refresh",
"cursor_field": null,
"destination_sync_mode": "append",
"primary_key": null
},
{
"stream": {
"name": "ads_insights_action_type",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["date_start"],
"source_defined_primary_key": [
["date_start"],
["account_id"],
["ad_id"]
],
"namespace": null
},
"sync_mode": "full_refresh",
"cursor_field": null,
"destination_sync_mode": "append",
"primary_key": null
},
{
"stream": {
"name": "campaigns",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["updated_time"],
"source_defined_primary_key": [["id"]],
"namespace": null
},
"sync_mode": "full_refresh",
"cursor_field": null,
"destination_sync_mode": "append",
"primary_key": null
},
{
"stream": {
"name": "images",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["updated_time"],
"source_defined_primary_key": [["id"]],
"namespace": null
},
"sync_mode": "full_refresh",
"cursor_field": null,
"destination_sync_mode": "append",
"primary_key": null
},
{
"stream": {
"name": "videos",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"source_defined_primary_key": []
"default_cursor_field": ["updated_time"],
"source_defined_primary_key": [["id"]],
"namespace": null
},
"sync_mode": "full_refresh",
"cursor_field": null,
"destination_sync_mode": "append",
"primary_key": null
},
{
"stream": {
"name": "custommy_custom_insights",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["date_start"],
"source_defined_primary_key": [
["date_start"],
["account_id"],
["ad_id"]
],
"namespace": null
},
"sync_mode": "incremental",
"primary_key": [],
"cursor_field": ["date_start"],
"destination_sync_mode": "append"
"sync_mode": "full_refresh",
"cursor_field": null,
"destination_sync_mode": "append",
"primary_key": null
}
]
}
Loading