Skip to content

Commit 98478f0

Browse files
ChristoGrabtolik0
andauthored
Source Notion: Migrate to Low-Code (#35974)
Co-authored-by: Anatolii Yatsuk <[email protected]> Co-authored-by: Anatolii Yatsuk <[email protected]>
1 parent b88ed51 commit 98478f0

20 files changed

+1079
-883
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[run]
2+
omit =
3+
source_notion/run.py

airbyte-integrations/connectors/source-notion/integration_tests/abnormal_state.json

+52
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,57 @@
3131
"name": "blocks"
3232
}
3333
}
34+
},
35+
{
36+
"type": "STREAM",
37+
"stream": {
38+
"stream_descriptor": { "name": "comments", "namespace": null },
39+
"stream_state": {
40+
"states": [
41+
{
42+
"partition": {
43+
"id": "9cca331a-1edb-4120-9a86-cf40214fac37",
44+
"parent_slice": {}
45+
},
46+
"cursor": { "last_edited_time": "2099-10-10T13:51:00.000Z" }
47+
},
48+
{
49+
"partition": {
50+
"id": "8fbb79d0-f858-4fe7-9e88-6b4019c72365",
51+
"parent_slice": {}
52+
},
53+
"cursor": { "last_edited_time": "2099-10-10T13:53:00.000Z" }
54+
},
55+
{
56+
"partition": {
57+
"id": "18fe94d2-60ec-4a7e-be86-b43e5c9198af",
58+
"parent_slice": {}
59+
},
60+
"cursor": { "last_edited_time": "2099-10-10T13:47:00.000Z" }
61+
},
62+
{
63+
"partition": {
64+
"id": "249f3796-7e81-47b0-9075-00ed2d06439d",
65+
"parent_slice": {}
66+
},
67+
"cursor": { "last_edited_time": "2099-09-12T20:55:00.000Z" }
68+
},
69+
{
70+
"partition": {
71+
"id": "29299296-ef3f-4aff-aef5-02d651a59be3",
72+
"parent_slice": {}
73+
},
74+
"cursor": { "last_edited_time": "2099-09-12T20:56:00.000Z" }
75+
},
76+
{
77+
"partition": {
78+
"id": "a55d276e-4bc2-4fcc-9fb3-e60b867c86e7",
79+
"parent_slice": {}
80+
},
81+
"cursor": { "last_edited_time": "2099-10-10T13:52:00.000Z" }
82+
}
83+
]
84+
}
85+
}
3486
}
3587
]

airbyte-integrations/connectors/source-notion/integration_tests/catalog.json

-38
This file was deleted.

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"default_primary_key": [["id"]]
99
},
1010
"sync_mode": "full_refresh",
11-
"destination_sync_mode": "overwrite",
11+
"destination_sync_mode": "append",
1212
"primary_key": [["id"]]
1313
},
1414
{
@@ -22,7 +22,7 @@
2222
},
2323
"primary_key": [["id"]],
2424
"cursor_field": ["last_edited_time"],
25-
"sync_mode": "incremental",
25+
"sync_mode": "full_refresh",
2626
"destination_sync_mode": "append"
2727
},
2828
{
@@ -36,7 +36,7 @@
3636
},
3737
"primary_key": [["id"]],
3838
"cursor_field": ["last_edited_time"],
39-
"sync_mode": "incremental",
39+
"sync_mode": "full_refresh",
4040
"destination_sync_mode": "append"
4141
},
4242
{
@@ -50,7 +50,7 @@
5050
},
5151
"primary_key": [["id"]],
5252
"cursor_field": ["last_edited_time"],
53-
"sync_mode": "incremental",
53+
"sync_mode": "full_refresh",
5454
"destination_sync_mode": "append"
5555
},
5656
{
@@ -60,11 +60,11 @@
6060
"supported_sync_modes": ["full_refresh", "incremental"],
6161
"source_defined_cursor": true,
6262
"default_primary_key": [["id"]],
63-
"default_cursor_field": ["page_last_edited_time"]
63+
"default_cursor_field": ["last_edited_time"]
6464
},
6565
"primary_key": [["id"]],
66-
"cursor_field": ["page_last_edited_time"],
67-
"sync_mode": "incremental",
66+
"cursor_field": ["last_edited_time"],
67+
"sync_mode": "full_refresh",
6868
"destination_sync_mode": "append"
6969
}
7070
]

airbyte-integrations/connectors/source-notion/integration_tests/incremental_catalog.json

+14
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,20 @@
4141
"cursor_field": ["last_edited_time"],
4242
"sync_mode": "incremental",
4343
"destination_sync_mode": "append"
44+
},
45+
{
46+
"stream": {
47+
"name": "comments",
48+
"json_schema": {},
49+
"supported_sync_modes": ["full_refresh", "incremental"],
50+
"source_defined_cursor": true,
51+
"default_primary_key": [["id"]],
52+
"default_cursor_field": ["last_edited_time"]
53+
},
54+
"primary_key": [["id"]],
55+
"cursor_field": ["last_edited_time"],
56+
"sync_mode": "incremental",
57+
"destination_sync_mode": "append"
4458
}
4559
]
4660
}

airbyte-integrations/connectors/source-notion/metadata.yaml

+14-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ data:
1010
connectorSubtype: api
1111
connectorType: source
1212
definitionId: 6e00b415-b02e-4160-bf02-58176a0ae687
13-
dockerImageTag: 2.2.0
13+
dockerImageTag: 3.0.0
1414
dockerRepository: airbyte/source-notion
1515
documentationUrl: https://docs.airbyte.com/integrations/sources/notion
1616
githubIssueLabel: source-notion
@@ -30,6 +30,18 @@ data:
3030
releaseStage: generally_available
3131
releases:
3232
breakingChanges:
33+
3.0.0:
34+
message:
35+
The source Notion connector is being migrated from the Python CDK to our declarative low-code CDK.
36+
Due to changes in the handling of state format between these CDKs, this migration constitutes a breaking change
37+
for users syncing the `Comments` stream.
38+
To ensure a smooth migration, please reset your data for this stream upon updating. This will facilitate a fresh first sync.
39+
If you are not syncing the `Comments` stream, you can upgrade without any further action.
40+
For more information, see our migration documentation for source Notion.
41+
upgradeDeadline: "2024-04-29"
42+
scopedImpact:
43+
- scopeType: stream
44+
impactedScopes: ["comments"]
3345
2.0.0:
3446
message:
3547
Version 2.0.0 introduces schema changes to multiple properties shared
@@ -46,5 +58,5 @@ data:
4658
supportLevel: certified
4759
tags:
4860
- language:python
49-
- cdk:python
61+
- cdk:low-code
5062
metadataSpecVersion: "1.0"

airbyte-integrations/connectors/source-notion/poetry.lock

+45-45
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)