Skip to content

Commit b984d59

Browse files
committed
Rollback update to destination_sync_mode in configured_catalog
1 parent eafbeac commit b984d59

File tree

7 files changed

+50
-29
lines changed

7 files changed

+50
-29
lines changed

airbyte-integrations/connectors/source-chargebee/acceptance-test-config.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ acceptance_tests:
5454
future_state:
5555
future_state_path: "integration_tests/future_state.json"
5656
missing_streams:
57-
- name: attached_item
58-
bypass_reason: "This stream is Full-Refresh only"
5957
- name: contact
6058
bypass_reason: "This stream is Full-Refresh only"
6159
- name: quote_line_group

airbyte-integrations/connectors/source-chargebee/integration_tests/configured_catalog.json

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"source_defined_primary_key": [["id"]]
1111
},
1212
"sync_mode": "incremental",
13-
"destination_sync_mode": "append_dedup",
13+
"destination_sync_mode": "append",
1414
"cursor_field": ["updated_at"]
1515
},
1616
{
@@ -36,7 +36,7 @@
3636
"source_defined_primary_key": [["id"]]
3737
},
3838
"sync_mode": "incremental",
39-
"destination_sync_mode": "append_dedup",
39+
"destination_sync_mode": "append",
4040
"cursor_field": ["updated_at"]
4141
},
4242
{
@@ -58,7 +58,7 @@
5858
"source_defined_primary_key": [["id"]]
5959
},
6060
"sync_mode": "incremental",
61-
"destination_sync_mode": "append_dedup",
61+
"destination_sync_mode": "append",
6262
"cursor_field": ["updated_at"]
6363
},
6464
{
@@ -71,7 +71,7 @@
7171
"source_defined_primary_key": [["id"]]
7272
},
7373
"sync_mode": "incremental",
74-
"destination_sync_mode": "append_dedup",
74+
"destination_sync_mode": "append",
7575
"cursor_field": ["updated_at"]
7676
},
7777
{
@@ -84,7 +84,7 @@
8484
"source_defined_primary_key": [["id"]]
8585
},
8686
"sync_mode": "incremental",
87-
"destination_sync_mode": "append_dedup",
87+
"destination_sync_mode": "append",
8888
"cursor_field": ["updated_at"]
8989
},
9090
{
@@ -97,7 +97,7 @@
9797
"source_defined_primary_key": [["id"]]
9898
},
9999
"sync_mode": "incremental",
100-
"destination_sync_mode": "append_dedup",
100+
"destination_sync_mode": "append",
101101
"cursor_field": ["updated_at"]
102102
},
103103
{
@@ -109,8 +109,8 @@
109109
"default_cursor_field": ["updated_at"],
110110
"source_defined_primary_key": [["id"]]
111111
},
112-
"sync_mode": "full_refresh",
113-
"destination_sync_mode": "append_dedup",
112+
"sync_mode": "incremental",
113+
"destination_sync_mode": "append",
114114
"cursor_field": ["updated_at"]
115115
},
116116
{
@@ -123,7 +123,7 @@
123123
"source_defined_primary_key": [["id"]]
124124
},
125125
"sync_mode": "incremental",
126-
"destination_sync_mode": "append_dedup",
126+
"destination_sync_mode": "append",
127127
"cursor_field": ["updated_at"]
128128
},
129129
{
@@ -136,7 +136,7 @@
136136
"source_defined_primary_key": [["id"]]
137137
},
138138
"sync_mode": "incremental",
139-
"destination_sync_mode": "append_dedup",
139+
"destination_sync_mode": "append",
140140
"cursor_field": ["updated_at"]
141141
},
142142
{
@@ -145,21 +145,25 @@
145145
"json_schema": {},
146146
"supported_sync_modes": ["full_refresh", "incremental"],
147147
"source_defined_cursor": true,
148-
"default_cursor_field": ["updated_at"],
148+
"default_cursor_field": ["created_at"],
149149
"source_defined_primary_key": [["id"]]
150150
},
151151
"sync_mode": "incremental",
152-
"destination_sync_mode": "append_dedup",
152+
"destination_sync_mode": "append",
153153
"cursor_field": ["created_at"]
154154
},
155155
{
156156
"stream": {
157157
"name": "gift",
158158
"json_schema": {},
159-
"supported_sync_modes": ["full_refresh"]
159+
"supported_sync_modes": ["full_refresh", "incremental"],
160+
"source_defined_cursor": true,
161+
"default_cursor_field": ["updated_at"],
162+
"source_defined_primary_key": [["id"]]
160163
},
161-
"sync_mode": "full_refresh",
162-
"destination_sync_mode": "overwrite"
164+
"sync_mode": "incremental",
165+
"destination_sync_mode": "append",
166+
"cursor_field": ["updated_at"]
163167
},
164168
{
165169
"stream": {
@@ -171,7 +175,7 @@
171175
"source_defined_primary_key": [["id"]]
172176
},
173177
"sync_mode": "incremental",
174-
"destination_sync_mode": "append_dedup",
178+
"destination_sync_mode": "append",
175179
"cursor_field": ["updated_at"]
176180
},
177181
{
@@ -184,7 +188,7 @@
184188
"source_defined_primary_key": [["id"]]
185189
},
186190
"sync_mode": "incremental",
187-
"destination_sync_mode": "append_dedup",
191+
"destination_sync_mode": "append",
188192
"cursor_field": ["updated_at"]
189193
},
190194
{
@@ -197,7 +201,7 @@
197201
"source_defined_primary_key": [["id"]]
198202
},
199203
"sync_mode": "incremental",
200-
"destination_sync_mode": "append_dedup",
204+
"destination_sync_mode": "append",
201205
"cursor_field": ["updated_at"]
202206
},
203207
{
@@ -220,7 +224,7 @@
220224
"source_defined_primary_key": [["id"]]
221225
},
222226
"sync_mode": "incremental",
223-
"destination_sync_mode": "append_dedup",
227+
"destination_sync_mode": "append",
224228
"cursor_field": ["updated_at"]
225229
},
226230
{
@@ -238,7 +242,7 @@
238242
"json_schema": {},
239243
"supported_sync_modes": ["full_refresh", "incremental"],
240244
"source_defined_cursor": true,
241-
"default_defined_cursor": ["migrated_at"],
245+
"default_cursor_field": ["migrated_at"],
242246
"source_defined_primary_key": [["entity_id"]]
243247
},
244248
"sync_mode": "incremental",
@@ -268,7 +272,7 @@
268272
"source_defined_primary_key": [["id"]]
269273
},
270274
"sync_mode": "incremental",
271-
"destination_sync_mode": "append_dedup",
275+
"destination_sync_mode": "append",
272276
"cursor_field": ["updated_at"]
273277
},
274278
{
@@ -281,7 +285,7 @@
281285
"source_defined_primary_key": [["id"]]
282286
},
283287
"sync_mode": "incremental",
284-
"destination_sync_mode": "append_dedup",
288+
"destination_sync_mode": "append",
285289
"cursor_field": ["updated_at"]
286290
}
287291
]

airbyte-integrations/connectors/source-chargebee/integration_tests/expected_records.jsonl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
{"stream":"promotional_credit","data":{"id":"pc_16CR0QTTZPx6wEbXR","customer_id":"Test-Custome-1","type":"decrement","amount":1000,"description":"Applied to the invoice # 39","credit_type":"general","closing_balance":26000,"created_at":1674298041,"object":"promotional_credit","currency_code":"USD","custom_fields":[]},"emitted_at":1676569220310}
1919
{"stream":"promotional_credit","data":{"id":"pc_16CZbuTTZGXtAFrxD","customer_id":"cbdemo_richard","type":"decrement","amount":1000,"description":"Applied to the invoice # 37","credit_type":"general","closing_balance":47000,"created_at":1674295799,"object":"promotional_credit","currency_code":"USD","custom_fields":[]},"emitted_at":1676569220318}
2020
{"stream":"promotional_credit","data":{"id":"pc_AzqD80TTZGFG7TiT6","customer_id":"cbdemo_tyler","type":"decrement","amount":1000,"description":"Applied to the invoice # 36","credit_type":"general","closing_balance":107000,"created_at":1674295727,"object":"promotional_credit","currency_code":"USD","custom_fields":[]},"emitted_at":1676569220325}
21-
{"stream":"gift","data":{"id":"Azz5jBTTJ96eclvRDvCs2SkyRM3cdsflXE5ClcIpcdbOPaa950","status":"unclaimed","scheduled_at":1674057609,"auto_claim":false,"updated_at":1674057613,"resource_version":1674057613941,"object":"gift","no_expiry":true,"gifter":{"customer_id":"Azz5jBTTJ96Mjlv5","invoice_id":"27","signature":"Airbyte","note":"Test gift","object":"gifter"},"gift_receiver":{"customer_id":"Azz5jBTTJ96UqlvE","subscription_id":"Azz5jBTTJ96Y2lvK","first_name":"Test","last_name":"2","email":"[email protected]","object":"gift_receiver"},"gift_timelines":[{"status":"unclaimed","occurred_at":1674057613,"object":"gift_timeline"},{"status":"scheduled","occurred_at":1674057604,"object":"gift_timeline"}],"custom_fields":[]},"emitted_at":1676569222624}
2221
{"stream": "coupon", "data": {"id": "TESTCOUPON4", "name": "Test Coupon 4", "invoice_name": "", "discount_type": "percentage", "discount_percentage": 12.0, "duration_type": "one_time", "valid_till": 1680332399, "status": "expired", "apply_discount_on": "not_applicable", "apply_on": "invoice_amount", "created_at": 1676371290, "updated_at": 1676371290, "resource_version": 1676371290028, "object": "coupon", "redemptions": 1, "custom_fields": []}, "emitted_at": 1678971894181}
2322
{"stream": "coupon", "data": {"id": "TESTCOUPON5", "name": "Test Coupon 5", "invoice_name": "", "discount_type": "fixed_amount", "discount_amount": 300, "duration_type": "forever", "status": "active", "apply_discount_on": "not_applicable", "apply_on": "invoice_amount", "created_at": 1676371313, "updated_at": 1676371313, "resource_version": 1676371313572, "object": "coupon", "redemptions": 1, "currency_code": "USD", "custom_fields": []}, "emitted_at": 1678971894193}
2423
{"stream": "coupon", "data": {"id": "TESTCOUPON6", "name": "Test Coupon 6", "invoice_name": "", "discount_type": "fixed_amount", "discount_amount": 500, "duration_type": "forever", "status": "active", "apply_discount_on": "not_applicable", "apply_on": "invoice_amount", "created_at": 1676371327, "updated_at": 1676371327, "resource_version": 1676371327854, "object": "coupon", "redemptions": 1, "currency_code": "USD", "custom_fields": []}, "emitted_at": 1678971894207}
@@ -51,3 +50,8 @@
5150
{"stream":"differential_price","data":{"id":"7748afa6-fdbe-4304-ac23-d18a17f27715","item_price_id":"cbdemo_additional-analytics-USD-yearly","parent_item_id":"cbdemo_advanced","price":200000,"status":"active","resource_version":1674032542218,"updated_at":1674032542,"created_at":1674032542,"currency_code":"USD","object":"differential_price","custom_fields":[]},"emitted_at":1704223399378}
5251
{"stream":"differential_price","data":{"id":"7748afa6-fdbe-4304-ac23-d18a17f27715","item_price_id":"cbdemo_additional-analytics-USD-yearly","parent_item_id":"cbdemo_advanced","price":200000,"status":"active","resource_version":1674032542218,"updated_at":1674032542,"created_at":1674032542,"currency_code":"USD","object":"differential_price","custom_fields":[]},"emitted_at":1704223399498}
5352
{"stream":"differential_price","data":{"id":"7748afa6-fdbe-4304-ac23-d18a17f27715","item_price_id":"cbdemo_additional-analytics-USD-yearly","parent_item_id":"cbdemo_advanced","price":200000,"status":"active","resource_version":1674032542218,"updated_at":1674032542,"created_at":1674032542,"currency_code":"USD","object":"differential_price","custom_fields":[]},"emitted_at":1704223399634}
53+
{"stream": "gift", "data": {"id": "Azz5jBTTJ96eclvRDvCs2SkyRM3cdsflXE5ClcIpcdbOPaa950", "status": "unclaimed", "scheduled_at": 1674057609, "auto_claim": false, "updated_at": 1674057613, "resource_version": 1674057613941, "object": "gift", "no_expiry": true, "gifter": {"customer_id": "Azz5jBTTJ96Mjlv5", "invoice_id": "27", "signature": "Airbyte", "note": "Test gift", "object": "gifter"}, "gift_receiver": {"customer_id": "Azz5jBTTJ96UqlvE", "subscription_id": "Azz5jBTTJ96Y2lvK", "first_name": "Test", "last_name": "2", "email": "[email protected]", "object": "gift_receiver"}, "gift_timelines": [{"status": "unclaimed", "occurred_at": 1674057613, "object": "gift_timeline"}, {"status": "scheduled", "occurred_at": 1674057604, "object": "gift_timeline"}], "custom_fields": []}, "emitted_at": 1705083808513}
54+
{"stream": "gift", "data": {"id": "Azz5jBTTJ96eclvRDvCs2SkyRM3cdsflXE5ClcIpcdbOPaa950", "status": "unclaimed", "scheduled_at": 1674057609, "auto_claim": false, "updated_at": 1674057613, "resource_version": 1674057613941, "object": "gift", "no_expiry": true, "gifter": {"customer_id": "Azz5jBTTJ96Mjlv5", "invoice_id": "27", "signature": "Airbyte", "note": "Test gift", "object": "gifter"}, "gift_receiver": {"customer_id": "Azz5jBTTJ96UqlvE", "subscription_id": "Azz5jBTTJ96Y2lvK", "first_name": "Test", "last_name": "2", "email": "[email protected]", "object": "gift_receiver"}, "gift_timelines": [{"status": "unclaimed", "occurred_at": 1674057613, "object": "gift_timeline"}, {"status": "scheduled", "occurred_at": 1674057604, "object": "gift_timeline"}], "custom_fields": []}, "emitted_at": 1705083808659}
55+
{"stream": "gift", "data": {"id": "Azz5jBTTJ96eclvRDvCs2SkyRM3cdsflXE5ClcIpcdbOPaa950", "status": "unclaimed", "scheduled_at": 1674057609, "auto_claim": false, "updated_at": 1674057613, "resource_version": 1674057613941, "object": "gift", "no_expiry": true, "gifter": {"customer_id": "Azz5jBTTJ96Mjlv5", "invoice_id": "27", "signature": "Airbyte", "note": "Test gift", "object": "gifter"}, "gift_receiver": {"customer_id": "Azz5jBTTJ96UqlvE", "subscription_id": "Azz5jBTTJ96Y2lvK", "first_name": "Test", "last_name": "2", "email": "[email protected]", "object": "gift_receiver"}, "gift_timelines": [{"status": "unclaimed", "occurred_at": 1674057613, "object": "gift_timeline"}, {"status": "scheduled", "occurred_at": 1674057604, "object": "gift_timeline"}], "custom_fields": []}, "emitted_at": 1705083808802}
56+
{"stream": "gift", "data": {"id": "Azz5jBTTJ96eclvRDvCs2SkyRM3cdsflXE5ClcIpcdbOPaa950", "status": "unclaimed", "scheduled_at": 1674057609, "auto_claim": false, "updated_at": 1674057613, "resource_version": 1674057613941, "object": "gift", "no_expiry": true, "gifter": {"customer_id": "Azz5jBTTJ96Mjlv5", "invoice_id": "27", "signature": "Airbyte", "note": "Test gift", "object": "gifter"}, "gift_receiver": {"customer_id": "Azz5jBTTJ96UqlvE", "subscription_id": "Azz5jBTTJ96Y2lvK", "first_name": "Test", "last_name": "2", "email": "[email protected]", "object": "gift_receiver"}, "gift_timelines": [{"status": "unclaimed", "occurred_at": 1674057613, "object": "gift_timeline"}, {"status": "scheduled", "occurred_at": 1674057604, "object": "gift_timeline"}], "custom_fields": []}, "emitted_at": 1705083808935}
57+
{"stream": "gift", "data": {"id": "Azz5jBTTJ96eclvRDvCs2SkyRM3cdsflXE5ClcIpcdbOPaa950", "status": "unclaimed", "scheduled_at": 1674057609, "auto_claim": false, "updated_at": 1674057613, "resource_version": 1674057613941, "object": "gift", "no_expiry": true, "gifter": {"customer_id": "Azz5jBTTJ96Mjlv5", "invoice_id": "27", "signature": "Airbyte", "note": "Test gift", "object": "gifter"}, "gift_receiver": {"customer_id": "Azz5jBTTJ96UqlvE", "subscription_id": "Azz5jBTTJ96Y2lvK", "first_name": "Test", "last_name": "2", "email": "[email protected]", "object": "gift_receiver"}, "gift_timelines": [{"status": "unclaimed", "occurred_at": 1674057613, "object": "gift_timeline"}, {"status": "scheduled", "occurred_at": 1674057604, "object": "gift_timeline"}], "custom_fields": []}, "emitted_at": 1705083809077}

airbyte-integrations/connectors/source-chargebee/integration_tests/future_state.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@
4848
"stream_descriptor": { "name": "item" }
4949
}
5050
},
51+
{
52+
"type": "STREAM",
53+
"stream": {
54+
"stream_state": { "updated_at": 2147483647 },
55+
"stream_descriptor": { "name": "attached_item" }
56+
}
57+
},
5158
{
5259
"type": "STREAM",
5360
"stream": {

airbyte-integrations/connectors/source-chargebee/integration_tests/sample_state.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@
4848
"stream_descriptor": { "name": "item" }
4949
}
5050
},
51+
{
52+
"type": "STREAM",
53+
"stream": {
54+
"stream_state": { "updated_at": 1625596058 },
55+
"stream_descriptor": { "name": "attached_item" }
56+
}
57+
},
5158
{
5259
"type": "STREAM",
5360
"stream": {

airbyte-integrations/connectors/source-chargebee/source_chargebee/manifest.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,21 @@ definitions:
8888
path: "/addons"
8989
stream_cursor_field: "updated_at"
9090
attached_item_stream:
91-
$ref: "#/definitions/base_stream"
91+
$ref: "#/definitions/base_incremental_stream"
9292
retriever:
9393
$ref: "#/definitions/retriever"
9494
partition_router:
9595
type: SubstreamPartitionRouter
9696
parent_stream_configs:
9797
- type: ParentStreamConfig
9898
stream: "#/definitions/item_stream"
99-
parent_key: id
100-
partition_field: id
99+
parent_key: "id"
100+
partition_field: "id"
101101
$parameters:
102102
name: "attached_item"
103103
primary_key: "id"
104104
path: "/items/{{ stream_slice.id }}/attached_items"
105+
stream_cursor_field: "updated_at"
105106
customer_stream:
106107
$ref: "#/definitions/base_incremental_stream"
107108
$parameters:

airbyte-integrations/connectors/source-chargebee/source_chargebee/spec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ connectionSpecification:
2626
type: string
2727
format: date-time
2828
title: Start Date
29-
description: UTC date and time in the format 2021-01-25T00:00:00Z. Any data before this date will not be replicated.
29+
description: UTC date and time in the format 2017-01-25T00:00:00.000Z. Any data before this date will not be replicated.
3030
pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$
3131
examples:
3232
- "2021-01-25T00:00:00Z"

0 commit comments

Comments
 (0)