Skip to content

Commit 3611e65

Browse files
author
Baz
authored
🐛 Source Tiktok: unnest cursor and primary key to the root-level (#16137)
1 parent a475235 commit 3611e65

24 files changed

+372
-108
lines changed

airbyte-config/init/src/main/resources/seed/source_definitions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@
10121012
- name: TikTok Marketing
10131013
sourceDefinitionId: 4bfac00d-ce15-44ff-95b9-9e3c3e8fbd35
10141014
dockerRepository: airbyte/source-tiktok-marketing
1015-
dockerImageTag: 0.1.14
1015+
dockerImageTag: 0.1.15
10161016
documentationUrl: https://docs.airbyte.io/integrations/sources/tiktok-marketing
10171017
icon: tiktok.svg
10181018
sourceType: api

airbyte-config/init/src/main/resources/seed/source_specs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10050,7 +10050,7 @@
1005010050
supportsNormalization: false
1005110051
supportsDBT: false
1005210052
supported_destination_sync_modes: []
10053-
- dockerImage: "airbyte/source-tiktok-marketing:0.1.14"
10053+
- dockerImage: "airbyte/source-tiktok-marketing:0.1.15"
1005410054
spec:
1005510055
documentationUrl: "https://docs.airbyte.io/integrations/sources/tiktok-marketing"
1005610056
changelogUrl: "https://docs.airbyte.io/integrations/sources/tiktok-marketing"

airbyte-integrations/connectors/source-tiktok-marketing/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ COPY source_tiktok_marketing ./source_tiktok_marketing
3232
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
3333
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
3434

35-
LABEL io.airbyte.version=0.1.14
35+
LABEL io.airbyte.version=0.1.15
3636
LABEL io.airbyte.name=airbyte/source-tiktok-marketing

airbyte-integrations/connectors/source-tiktok-marketing/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ Customize `acceptance-test-config.yml` file to configure tests. See [Source Acce
9999
If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py.
100100
To run your integration tests with acceptance tests, from the connector root, run
101101
```
102-
python -m pytest integration_tests -p integration_tests.acceptance
102+
docker build . --no-cache -t airbyte/source-tiktok-marketing:dev \
103+
&& python -m pytest -p source_acceptance_test.plugin
103104
```
104105
To run your integration tests with docker
105106

airbyte-integrations/connectors/source-tiktok-marketing/acceptance-test-config.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ tests:
1313
status: "succeed"
1414
- config_path: "secrets/prod_config_with_lifetime_granularity.json"
1515
status: "succeed"
16-
# Sandbox creds are not working temporary because of issues from APi side
17-
# - config_path: "secrets/config.json"
18-
# status: "succeed"
19-
# - config_path: "secrets/new_config_sandbox.json"
20-
# status: "succeed"
2116
- config_path: "secrets/new_config_prod.json"
2217
status: "succeed"
2318
- config_path: "secrets/config_oauth.json"
@@ -31,11 +26,23 @@ tests:
3126

3227
discovery:
3328
- config_path: "secrets/prod_config.json"
29+
backward_compatibility_tests_config:
30+
disable_for_version: "0.1.14"
3431
- config_path: "secrets/prod_config_with_day_granularity.json"
32+
backward_compatibility_tests_config:
33+
disable_for_version: "0.1.14"
3534
- config_path: "secrets/prod_config_with_lifetime_granularity.json"
35+
backward_compatibility_tests_config:
36+
disable_for_version: "0.1.14"
3637
- config_path: "secrets/config.json"
38+
backward_compatibility_tests_config:
39+
disable_for_version: "0.1.14"
3740
- config_path: "secrets/new_config_prod.json"
41+
backward_compatibility_tests_config:
42+
disable_for_version: "0.1.14"
3843
- config_path: "secrets/config_oauth.json"
44+
backward_compatibility_tests_config:
45+
disable_for_version: "0.1.14"
3946

4047
basic_read:
4148
# New style streams (for >= 0.1.13):

airbyte-integrations/connectors/source-tiktok-marketing/integration_tests/abnormal_state.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,42 +10,50 @@
1010
},
1111

1212
"ads_reports_daily": {
13+
"stat_time_day": "2030-01-01",
1314
"dimensions": {
1415
"stat_time_day": "2030-01-01"
1516
}
1617
},
1718
"advertisers_reports_daily": {
19+
"stat_time_day": "2030-01-01",
1820
"dimensions": {
1921
"stat_time_day": "2030-01-01"
2022
}
2123
},
2224
"ad_groups_reports_daily": {
25+
"stat_time_day": "2030-01-01",
2326
"dimensions": {
2427
"stat_time_day": "2030-01-01"
2528
}
2629
},
2730
"campaigns_reports_daily": {
31+
"stat_time_day": "2030-01-01",
2832
"dimensions": {
2933
"stat_time_day": "2030-01-01"
3034
}
3135
},
3236

3337
"ads_audience_reports_daily": {
38+
"stat_time_day": "2030-01-01",
3439
"dimensions": {
3540
"stat_time_day": "2030-01-01"
3641
}
3742
},
3843
"advertisers_audience_reports_daily": {
44+
"stat_time_day": "2030-01-01",
3945
"dimensions": {
4046
"stat_time_day": "2030-01-01"
4147
}
4248
},
4349
"ad_group_audience_reports_daily": {
50+
"stat_time_day": "2030-01-01",
4451
"dimensions": {
4552
"stat_time_day": "2030-01-01"
4653
}
4754
},
4855
"campaigns_audience_reports_by_country_daily": {
56+
"stat_time_day": "2030-01-01",
4957
"dimensions": {
5058
"stat_time_day": "2030-01-01"
5159
}

airbyte-integrations/connectors/source-tiktok-marketing/integration_tests/abnormal_state_with_granullarity.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,42 +10,49 @@
1010
},
1111

1212
"ads_reports": {
13+
"stat_time_day": "2030-01-01",
1314
"dimensions": {
1415
"stat_time_day": "2030-01-01"
1516
}
1617
},
1718
"advertisers_reports": {
19+
"stat_time_day": "2030-01-01",
1820
"dimensions": {
1921
"stat_time_day": "2030-01-01"
2022
}
2123
},
2224
"ad_groups_reports": {
25+
"stat_time_day": "2030-01-01",
2326
"dimensions": {
2427
"stat_time_day": "2030-01-01"
2528
}
2629
},
2730
"campaigns_reports": {
31+
"stat_time_day": "2030-01-01",
2832
"dimensions": {
2933
"stat_time_day": "2030-01-01"
3034
}
3135
},
32-
3336
"ads_audience_reports": {
37+
"stat_time_day": "2030-01-01",
3438
"dimensions": {
3539
"stat_time_day": "2030-01-01"
3640
}
3741
},
3842
"advertisers_audience_reports": {
43+
"stat_time_day": "2030-01-01",
3944
"dimensions": {
4045
"stat_time_day": "2030-01-01"
4146
}
4247
},
4348
"ad_group_audience_reports": {
49+
"stat_time_day": "2030-01-01",
4450
"dimensions": {
4551
"stat_time_day": "2030-01-01"
4652
}
4753
},
4854
"campaigns_audience_reports_by_country": {
55+
"stat_time_day": "2030-01-01",
4956
"dimensions": {
5057
"stat_time_day": "2030-01-01"
5158
}

airbyte-integrations/connectors/source-tiktok-marketing/integration_tests/configured_catalog.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
"stream": {
1717
"name": "ads_reports",
1818
"json_schema": {},
19-
"supported_sync_modes": ["full_refresh"]
19+
"supported_sync_modes": ["full_refresh"],
20+
"source_defined_cursor": true,
21+
"default_cursor_field": ["stat_time_day"]
2022
},
2123
"sync_mode": "full_refresh",
2224
"destination_sync_mode": "append"
@@ -27,7 +29,7 @@
2729
"json_schema": {},
2830
"supported_sync_modes": ["full_refresh", "incremental"],
2931
"source_defined_cursor": true,
30-
"default_cursor_field": ["dimensions", "stat_time_day"]
32+
"default_cursor_field": ["stat_time_day"]
3133
},
3234
"sync_mode": "full_refresh",
3335
"destination_sync_mode": "append"

airbyte-integrations/connectors/source-tiktok-marketing/integration_tests/streams.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@
3737
"json_schema": {},
3838
"supported_sync_modes": ["full_refresh", "incremental"],
3939
"source_defined_cursor": true,
40-
"default_cursor_field": ["dimensions", "stat_time_hour"]
40+
"default_cursor_field": ["stat_time_hour"]
4141
},
4242
{
4343
"name": "ads_reports_daily",
4444
"json_schema": {},
4545
"supported_sync_modes": ["full_refresh", "incremental"],
4646
"source_defined_cursor": true,
47-
"default_cursor_field": ["dimensions", "stat_time_day"]
47+
"default_cursor_field": ["stat_time_day"]
4848
},
4949
{
5050
"name": "ads_reports_lifetime",
@@ -56,14 +56,14 @@
5656
"json_schema": {},
5757
"supported_sync_modes": ["full_refresh", "incremental"],
5858
"source_defined_cursor": true,
59-
"default_cursor_field": ["dimensions", "stat_time_hour"]
59+
"default_cursor_field": ["stat_time_hour"]
6060
},
6161
{
6262
"name": "ad_groups_reports_daily",
6363
"json_schema": {},
6464
"supported_sync_modes": ["full_refresh", "incremental"],
6565
"source_defined_cursor": true,
66-
"default_cursor_field": ["dimensions", "stat_time_day"]
66+
"default_cursor_field": ["stat_time_day"]
6767
},
6868
{
6969
"name": "ad_groups_reports_lifetime",
@@ -75,14 +75,14 @@
7575
"json_schema": {},
7676
"supported_sync_modes": ["full_refresh", "incremental"],
7777
"source_defined_cursor": true,
78-
"default_cursor_field": ["dimensions", "stat_time_hour"]
78+
"default_cursor_field": ["stat_time_hour"]
7979
},
8080
{
8181
"name": "campaigns_reports_daily",
8282
"json_schema": {},
8383
"supported_sync_modes": ["full_refresh", "incremental"],
8484
"source_defined_cursor": true,
85-
"default_cursor_field": ["dimensions", "stat_time_day"]
85+
"default_cursor_field": ["stat_time_day"]
8686
},
8787
{
8888
"name": "campaigns_reports_lifetime",
@@ -94,14 +94,14 @@
9494
"json_schema": {},
9595
"supported_sync_modes": ["full_refresh", "incremental"],
9696
"source_defined_cursor": true,
97-
"default_cursor_field": ["dimensions", "stat_time_hour"]
97+
"default_cursor_field": ["stat_time_hour"]
9898
},
9999
{
100100
"name": "advertisers_reports_daily",
101101
"json_schema": {},
102102
"supported_sync_modes": ["full_refresh", "incremental"],
103103
"source_defined_cursor": true,
104-
"default_cursor_field": ["dimensions", "stat_time_day"]
104+
"default_cursor_field": ["stat_time_day"]
105105
},
106106
{
107107
"name": "advertisers_reports_lifetime",
@@ -113,14 +113,14 @@
113113
"json_schema": {},
114114
"supported_sync_modes": ["full_refresh", "incremental"],
115115
"source_defined_cursor": true,
116-
"default_cursor_field": ["dimensions", "stat_time_hour"]
116+
"default_cursor_field": ["stat_time_hour"]
117117
},
118118
{
119119
"name": "advertisers_audience_reports_daily",
120120
"json_schema": {},
121121
"supported_sync_modes": ["full_refresh", "incremental"],
122122
"source_defined_cursor": true,
123-
"default_cursor_field": ["dimensions", "stat_time_day"]
123+
"default_cursor_field": ["stat_time_day"]
124124
},
125125
{
126126
"name": "advertisers_audience_reports_lifetime",
@@ -132,42 +132,42 @@
132132
"json_schema": {},
133133
"supported_sync_modes": ["full_refresh", "incremental"],
134134
"source_defined_cursor": true,
135-
"default_cursor_field": ["dimensions", "stat_time_hour"]
135+
"default_cursor_field": ["stat_time_hour"]
136136
},
137137
{
138138
"name": "ads_audience_reports_daily",
139139
"json_schema": {},
140140
"supported_sync_modes": ["full_refresh", "incremental"],
141141
"source_defined_cursor": true,
142-
"default_cursor_field": ["dimensions", "stat_time_day"]
142+
"default_cursor_field": ["stat_time_day"]
143143
},
144144
{
145145
"name": "ad_group_audience_reports_hourly",
146146
"json_schema": {},
147147
"supported_sync_modes": ["full_refresh", "incremental"],
148148
"source_defined_cursor": true,
149-
"default_cursor_field": ["dimensions", "stat_time_hour"]
149+
"default_cursor_field": ["stat_time_hour"]
150150
},
151151
{
152152
"name": "ad_group_audience_reports_daily",
153153
"json_schema": {},
154154
"supported_sync_modes": ["full_refresh", "incremental"],
155155
"source_defined_cursor": true,
156-
"default_cursor_field": ["dimensions", "stat_time_day"]
156+
"default_cursor_field": ["stat_time_day"]
157157
},
158158
{
159159
"name": "campaigns_audience_reports_by_country_hourly",
160160
"json_schema": {},
161161
"supported_sync_modes": ["full_refresh", "incremental"],
162162
"source_defined_cursor": true,
163-
"default_cursor_field": ["dimensions", "stat_time_hour"]
163+
"default_cursor_field": ["stat_time_hour"]
164164
},
165165
{
166166
"name": "campaigns_audience_reports_by_country_daily",
167167
"json_schema": {},
168168
"supported_sync_modes": ["full_refresh", "incremental"],
169169
"source_defined_cursor": true,
170-
"default_cursor_field": ["dimensions", "stat_time_day"]
170+
"default_cursor_field": ["stat_time_day"]
171171
}
172172
]
173173
}

airbyte-integrations/connectors/source-tiktok-marketing/integration_tests/streams_all.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"json_schema": {},
5555
"supported_sync_modes": ["full_refresh", "incremental"],
5656
"source_defined_cursor": true,
57-
"default_cursor_field": ["dimensions", "stat_time_day"]
57+
"default_cursor_field": ["stat_time_day"]
5858
},
5959
"sync_mode": "full_refresh",
6060
"destination_sync_mode": "append"
@@ -65,7 +65,7 @@
6565
"json_schema": {},
6666
"supported_sync_modes": ["full_refresh", "incremental"],
6767
"source_defined_cursor": true,
68-
"default_cursor_field": ["dimensions", "stat_time_day"]
68+
"default_cursor_field": ["stat_time_day"]
6969
},
7070
"sync_mode": "full_refresh",
7171
"destination_sync_mode": "append"
@@ -76,7 +76,7 @@
7676
"json_schema": {},
7777
"supported_sync_modes": ["full_refresh", "incremental"],
7878
"source_defined_cursor": true,
79-
"default_cursor_field": ["dimensions", "stat_time_day"]
79+
"default_cursor_field": ["stat_time_day"]
8080
},
8181
"sync_mode": "full_refresh",
8282
"destination_sync_mode": "append"
@@ -87,7 +87,7 @@
8787
"json_schema": {},
8888
"supported_sync_modes": ["full_refresh", "incremental"],
8989
"source_defined_cursor": true,
90-
"default_cursor_field": ["dimensions", "stat_time_day"]
90+
"default_cursor_field": ["stat_time_day"]
9191
},
9292
"sync_mode": "full_refresh",
9393
"destination_sync_mode": "append"
@@ -99,7 +99,7 @@
9999
"json_schema": {},
100100
"supported_sync_modes": ["full_refresh", "incremental"],
101101
"source_defined_cursor": true,
102-
"default_cursor_field": ["dimensions", "stat_time_day"]
102+
"default_cursor_field": ["stat_time_day"]
103103
},
104104
"sync_mode": "incremental",
105105
"destination_sync_mode": "append"
@@ -110,7 +110,7 @@
110110
"json_schema": {},
111111
"supported_sync_modes": ["full_refresh", "incremental"],
112112
"source_defined_cursor": true,
113-
"default_cursor_field": ["dimensions", "stat_time_day"]
113+
"default_cursor_field": ["stat_time_day"]
114114
},
115115
"sync_mode": "full_refresh",
116116
"destination_sync_mode": "append"
@@ -121,7 +121,7 @@
121121
"json_schema": {},
122122
"supported_sync_modes": ["full_refresh", "incremental"],
123123
"source_defined_cursor": true,
124-
"default_cursor_field": ["dimensions", "stat_time_day"]
124+
"default_cursor_field": ["stat_time_day"]
125125
},
126126
"sync_mode": "full_refresh",
127127
"destination_sync_mode": "append"
@@ -132,7 +132,7 @@
132132
"json_schema": {},
133133
"supported_sync_modes": ["full_refresh", "incremental"],
134134
"source_defined_cursor": true,
135-
"default_cursor_field": ["dimensions", "stat_time_day"]
135+
"default_cursor_field": ["stat_time_day"]
136136
},
137137
"sync_mode": "full_refresh",
138138
"destination_sync_mode": "append"

0 commit comments

Comments
 (0)