Skip to content

Commit f607d70

Browse files
authored
Destination DuckDB: Bump duckdb engine to 0.10.3 (airbytehq#38576)
1 parent f4c69be commit f607d70

File tree

11 files changed

+288
-147
lines changed

11 files changed

+288
-147
lines changed

airbyte-integrations/connectors/destination-duckdb/destination_duckdb/destination.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#
2-
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
3-
#
1+
# Copyright (c) 2024 Airbyte, Inc., all rights reserved.
42

53
import datetime
64
import json
@@ -13,10 +11,12 @@
1311

1412
import duckdb
1513
import pyarrow as pa
14+
1615
from airbyte_cdk import AirbyteLogger
1716
from airbyte_cdk.destinations import Destination
1817
from airbyte_cdk.models import AirbyteConnectionStatus, AirbyteMessage, ConfiguredAirbyteCatalog, DestinationSyncMode, Status, Type
1918

19+
2020
logger = getLogger("airbyte")
2121

2222
CONFIG_MOTHERDUCK_API_KEY = "motherduck_api_key"

airbyte-integrations/connectors/destination-duckdb/destination_duckdb/run.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#
2-
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
3-
#
1+
# Copyright (c) 2024 Airbyte, Inc., all rights reserved.
42

53
import sys
64

airbyte-integrations/connectors/destination-duckdb/integration_tests/integration_test.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#
2-
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
3-
#
1+
# Copyright (c) 2024 Airbyte, Inc., all rights reserved.
42

53
from __future__ import annotations
64

@@ -112,7 +110,7 @@ def table_schema() -> str:
112110

113111
@pytest.fixture
114112
def configured_catalogue(
115-
test_table_name: str, test_large_table_name: str, table_schema: str,
113+
test_table_name: str, test_large_table_name: str, table_schema: str,
116114
) -> ConfiguredAirbyteCatalog:
117115
append_stream = ConfiguredAirbyteStream(
118116
stream=AirbyteStream(
@@ -261,17 +259,17 @@ def _airbyte_messages_with_inconsistent_json_fields(n: int, batch_size: int, tab
261259
record=AirbyteRecordMessage(
262260
stream=table_name,
263261
# Throw in empty nested objects and see how pyarrow deals with them.
264-
data={"key1": fake.first_name() ,
265-
"key2": fake.ssn() if random.random()< 0.5 else random.randrange(1000,9999999999999),
266-
"nested1": {} if random.random()< 0.1 else {
267-
"key3": fake.first_name() ,
268-
"key4": fake.ssn() if random.random()< 0.5 else random.randrange(1000,9999999999999),
269-
"dictionary1":{} if random.random()< 0.1 else {
270-
"key3": fake.first_name() ,
262+
data={"key1": fake.first_name(),
263+
"key2": fake.ssn() if random.random()< 0.5 else random.randrange(1000,9999999999999),
264+
"nested1": {} if random.random()< 0.1 else {
265+
"key3": fake.first_name(),
266+
"key4": fake.ssn() if random.random()< 0.5 else random.randrange(1000,9999999999999),
267+
"dictionary1":{} if random.random()< 0.1 else {
268+
"key3": fake.first_name(),
271269
"key4": "True" if random.random() < 0.5 else True
272270
}
273271
}
274-
}
272+
}
275273
if random.random() < 0.9 else {},
276274

277275
emitted_at=int(datetime.now().timestamp()) * 1000,
@@ -284,8 +282,8 @@ def _airbyte_messages_with_inconsistent_json_fields(n: int, batch_size: int, tab
284282
BATCH_WRITE_SIZE = 1000
285283

286284
@pytest.mark.slow
287-
@pytest.mark.parametrize("airbyte_message_generator,explanation",
288-
[(_airbyte_messages, "Test writing a large number of simple json objects."),
285+
@pytest.mark.parametrize("airbyte_message_generator,explanation",
286+
[(_airbyte_messages, "Test writing a large number of simple json objects."),
289287
(_airbyte_messages_with_inconsistent_json_fields, "Test writing a large number of json messages with inconsistent schema.")] )
290288
def test_large_number_of_writes(
291289
config: Dict[str, str],

airbyte-integrations/connectors/destination-duckdb/metadata.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ data:
44
connectorSubtype: database
55
connectorType: destination
66
definitionId: 94bd199c-2ff0-4aa2-b98e-17f0acb72610
7-
dockerImageTag: 0.3.6
7+
dockerImageTag: 0.4.0
88
dockerRepository: airbyte/destination-duckdb
99
githubIssueLabel: destination-duckdb
1010
icon: duckdb.svg
@@ -15,16 +15,21 @@ data:
1515
enabled: true
1616
oss:
1717
enabled: true
18-
releaseStage: alpha
18+
releaseStage: beta
1919
releases:
2020
breakingChanges:
2121
0.3.0:
22-
message:
23-
"This version uses the DuckDB 0.9.1 database driver, which is not
24-
backwards compatible with prior versions. MotherDuck users can upgrade their
25-
database by visiting https://app.motherduck.com/ and accepting the upgrade.
26-
For more information, see the connector migration guide."
22+
message: >
23+
This version uses the DuckDB 0.9.1 database driver, which is not
24+
backwards compatible with prior versions. MotherDuck users can
25+
upgrade their database by visiting https://app.motherduck.com/ and
26+
accepting the upgrade. For more information, see the connector
27+
migration guide.
2728
upgradeDeadline: "2023-10-31"
29+
0.4.0:
30+
message: >
31+
This version uses the DuckDB 0.10.3 database driver, which in not backwards compatible with databases created using the 0.9.x versions of DuckDB. MotherDuck users can upgrade their database by visiting https://app.motherduck.com/ and accepting the upgrade. For more information, see the connector migration guide.
32+
upgradeDeadline: "2024-06-30"
2833
resourceRequirements:
2934
jobSpecific:
3035
- jobType: check_connection

0 commit comments

Comments
 (0)