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 Tiktok marketing - remove granularity config option #13890

Merged
merged 9 commits into from
Jun 29, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ tests:
connection:
- config_path: "secrets/prod_config.json"
status: "succeed"
- config_path: "secrets/prod_config_day.json"
- config_path: "secrets/prod_config_with_day_granularity.json"
status: "succeed"
- config_path: "secrets/prod_config_with_lifetime_granularity.json"
status: "succeed"
- config_path: "secrets/config.json"
status: "succeed"
Expand All @@ -27,58 +29,54 @@ tests:
status: "failed"

discovery:
- config_path: "secrets/prod_config_day.json"
- config_path: "secrets/prod_config.json"
- config_path: "secrets/prod_config_with_day_granularity.json"
- config_path: "secrets/prod_config_with_lifetime_granularity.json"
- config_path: "secrets/config.json"
- config_path: "secrets/new_config_prod.json"
- config_path: "secrets/config_oauth.json"

basic_read:
# DAY granularity:
- config_path: "secrets/prod_config_day.json"
configured_catalog_path: "integration_tests/streams_all.json"
# New style streams (for >= 0.1.13):
- config_path: "secrets/prod_config.json"
configured_catalog_path: "integration_tests/streams_basic.json"
timeout_seconds: 1200
# LIFETIME granularity:
- config_path: "secrets/prod_config.json"
configured_catalog_path: "integration_tests/streams_lifetime.json"
configured_catalog_path: "integration_tests/streams_reports_daily.json"
timeout_seconds: 1200
- config_path: "secrets/prod_config.json"
configured_catalog_path: "integration_tests/streams_reports_lifetime.json"
timeout_seconds: 1200
# Old style streams with granularity config (for < 0.1.13)
# Note: not needed to be tested separately in full and incremental tests, because code of
# these streams is called directly in new style streams
- config_path: "secrets/prod_config_with_day_granularity.json"
configured_catalog_path: "integration_tests/streams_with_day_granularity.json"
timeout_seconds: 1200
- config_path: "secrets/prod_config_with_lifetime_granularity.json"
configured_catalog_path: "integration_tests/prod_config_with_lifetime_granularity.json"
timeout_seconds: 1200

incremental:
# LIFETIME granularity: does not support incremental sync
# DAY granularity:
- config_path: "secrets/prod_config_day.json"
configured_catalog_path: "integration_tests/streams_all_incremental.json"
- config_path: "secrets/prod_config.json"
configured_catalog_path: "integration_tests/streams_basic.json"
timeout_seconds: 1200
future_state_path: "integration_tests/abnormal_state.json"
timeout_seconds: 600
cursor_paths:
ads_reports: [ "dimensions", "stat_time_day" ]
advertisers_reports: [ "dimensions", "stat_time_day" ]
campaigns_reports: [ "dimensions", "stat_time_day" ]
ad_groups_reports: [ "dimensions", "stat_time_day" ]

# audience report streams have unexpected and inexplicable test failure caused by problem with schema (KeyError: 'properties'),
# It happens ONLY when incremental tests are run together with discovery tests.
# Error can't be reproduced by running test manually or ONLY incremental tests
- config_path: "secrets/prod_config_day.json"
configured_catalog_path: "integration_tests/streams_audience_incremental.json"
- config_path: "secrets/prod_config.json"
configured_catalog_path: "integration_tests/streams_reports_daily.json"
timeout_seconds: 1200
future_state_path: "integration_tests/abnormal_state.json"
timeout_seconds: 600
cursor_paths:
ad_group_audience_reports: [ "dimensions", "stat_time_day" ]
ads_audience_reports: [ "dimensions", "stat_time_day" ]
advertisers_audience_reports: [ "dimensions", "stat_time_day" ]
campaigns_audience_reports_by_country: [ "dimensions", "stat_time_day" ]
# LIFETIME granularity: does not support incremental sync

full_refresh:
# DAY granularity:
- config_path: "secrets/prod_config_day.json"
configured_catalog_path: "integration_tests/streams_all.json"
timeout_seconds: 6000
ignored_fields: # Important: sometimes some streams does not return the same records in subsequent syncs
"ad_groups": ["dayparting", "enable_search_result", "display_mode", "schedule_infos", "feed_type", "status" ]
# LIFETIME granularity:
- config_path: "secrets/prod_config.json"
configured_catalog_path: "integration_tests/streams_lifetime.json"
timeout_seconds: 600
configured_catalog_path: "integration_tests/streams_basic.json"
timeout_seconds: 1200
ignored_fields: # Important: sometimes some streams does not return the same records in subsequent syncs
"ad_groups": ["dayparting", "enable_search_result", "display_mode", "schedule_infos", "feed_type", "status" ]
- config_path: "secrets/prod_config.json"
configured_catalog_path: "integration_tests/streams_reports_daily.json"
timeout_seconds: 1200
- config_path: "secrets/prod_config.json"
configured_catalog_path: "integration_tests/streams_reports_lifetime.json"
timeout_seconds: 1200
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,43 @@
"modify_time": "2030-08-30 09:16:10"
},

"ads_reports": {
"ads_reports_daily": {
"dimensions": {
"stat_time_day": "2030-01-01"
}
},
"advertisers_reports": {
"advertisers_reports_daily": {
"dimensions": {
"stat_time_day": "2030-01-01"
}
},
"ad_groups_reports": {
"ad_groups_reports_daily": {
"dimensions": {
"stat_time_day": "2030-01-01"
}
},
"campaigns_reports": {
"campaigns_reports_daily": {
"dimensions": {
"stat_time_day": "2030-01-01"
}
},

"ads_audience_reports": {
"ads_audience_reports_daily": {
"dimensions": {
"stat_time_day": "2030-01-01"
}
},
"advertisers_audience_reports": {
"advertisers_audience_reports_daily": {
"dimensions": {
"stat_time_day": "2030-01-01"
}
},
"ad_group_audience_reports": {
"ad_group_audience_reports_daily": {
"dimensions": {
"stat_time_day": "2030-01-01"
}
},
"campaigns_audience_reports_by_country": {
"campaigns_audience_reports_by_country_daily": {
"dimensions": {
"stat_time_day": "2030-01-01"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"ads": {
"modify_time": "2030-08-30 09:16:10"
},
"ad_groups": {
"modify_time": "2030-08-30 09:16:10"
},
"campaigns": {
"modify_time": "2030-08-30 09:16:10"
},

"ads_reports": {
"dimensions": {
"stat_time_day": "2030-01-01"
}
},
"advertisers_reports": {
"dimensions": {
"stat_time_day": "2030-01-01"
}
},
"ad_groups_reports": {
"dimensions": {
"stat_time_day": "2030-01-01"
}
},
"campaigns_reports": {
"dimensions": {
"stat_time_day": "2030-01-01"
}
},

"ads_audience_reports": {
"dimensions": {
"stat_time_day": "2030-01-01"
}
},
"advertisers_audience_reports": {
"dimensions": {
"stat_time_day": "2030-01-01"
}
},
"ad_group_audience_reports": {
"dimensions": {
"stat_time_day": "2030-01-01"
}
},
"campaigns_audience_reports_by_country": {
"dimensions": {
"stat_time_day": "2030-01-01"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"default": {},
"order": 0,
"type": "object",
"oneOf": [
{
"oneOf": [{
"title": "OAuth2.0",
"type": "object",
"properties": {
Expand Down Expand Up @@ -42,8 +41,7 @@
}
},
"required": ["app_id", "secret", "access_token"]
},
{
}, {
"title": "Sandbox Access Token",
"type": "object",
"properties": {
Expand Down Expand Up @@ -77,34 +75,29 @@
"order": 1,
"type": "string"
},
"report_granularity": {
"title": "Report Aggregation Granularity *",
"description": "The granularity used for aggregating performance data in reports. See <a href=\"https://docs.airbyte.com/integrations/sources/tiktok-marketing/#report-aggregation\">the docs</a>.",
"default": "DAY",
"enum": ["LIFETIME", "DAY", "HOUR"],
"order": 2,
"type": "string"
},
"end_date": {
"title": "End Date",
"description": "The date until which you'd like to replicate data for all incremental streams, in the format YYYY-MM-DD. All data generated between start_date and this date will be replicated. Not setting this option will result in always syncing the data till the current date.",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
"order": 2,
"type": "string"
},
"report_granularity": {
"title": "Report Aggregation Granularity",
"description": "The granularity used for aggregating performance data in reports. See <a href=\"https://docs.airbyte.com/integrations/sources/tiktok-marketing/#report-aggregation\">the docs</a>.",
"enum": ["LIFETIME", "DAY", "HOUR"],
"order": 3,
"type": "string"
}
}
},
"supportsIncremental": true,
"supportsNormalization": false,
"supportsDBT": false,
"supported_destination_sync_modes": ["overwrite", "append", "append_dedup"],
"authSpecification": null,
"advanced_auth": {
"auth_flow_type": "oauth2.0",
"predicate_key": ["credentials", "auth_type"],
"predicate_value": "oauth2.0",
"oauth_config_specification": {
"oauth_user_input_from_connector_config_specification": null,
"complete_oauth_output_specification": {
"title": "CompleteOauthOutputSpecification",
"type": "object",
Expand Down
Loading