From fcc549368d5a65520e76f0dadd852ed8d4f76471 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Thu, 22 Oct 2026 00:48:36 +0200 Subject: [PATCH] Connector: Verify support for DuckDB 2.x --- docs/changelog.md | 2 ++ pyproject.toml | 2 +- tests/saas/test_hostaway.py | 4 +++- tests/saas/test_linkedin.py | 6 +++++- tests/saas/test_stripe.py | 4 ++-- tests/stream/test_mqbridge_brokerless.py | 4 +++- 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 0c1ac776d..e6290cb7a 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,6 +2,8 @@ ## in progress +- Connector: Verified support for DuckDB 2.x + ## 2026/10/21 v0.20.0 - Keep datetime normalization compatible with dlt 1.31 while retaining support for diff --git a/pyproject.toml b/pyproject.toml index 92835d742..9069d2ed3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ dependencies = [ "dlt[deltalake]>=1.22,<1.32", "dlt-cratedb<0.2", "dlt-filesystem", - "duckdb<1.6", + "duckdb<2.1", "duckdb-engine<0.18", "elasticsearch<10", "facebook-business<27", diff --git a/tests/saas/test_hostaway.py b/tests/saas/test_hostaway.py index 7e1dd69af..9a8acc346 100644 --- a/tests/saas/test_hostaway.py +++ b/tests/saas/test_hostaway.py @@ -55,7 +55,9 @@ def test_hostaway_source_full_refresh(hostaway_table, tmp_path): assert result.exit_code == 0 conn = duckdb.connect(abs_db_path) - result = conn.sql(f"select count(*) from raw.{hostaway_table}").fetchone() + result = ( + conn.sql(f"select count(*) from raw.{hostaway_table}").limit(1).fetchall()[0] + ) assert result is not None, "Database result is empty" assert result[0] > 0, f"No rows ingested for table {hostaway_table}" conn.close() diff --git a/tests/saas/test_linkedin.py b/tests/saas/test_linkedin.py index 5ff48bea0..d0310dd03 100644 --- a/tests/saas/test_linkedin.py +++ b/tests/saas/test_linkedin.py @@ -36,7 +36,11 @@ def test_linkedin_ads_source_full_refresh(linkedin_ads_table, tmp_path): assert result.exit_code == 0 conn = duckdb.connect(abs_db_path) - result = conn.sql(f"select count(*) from raw.{linkedin_ads_table}").fetchone() + result = ( + conn.sql(f"select count(*) from raw.{linkedin_ads_table}") + .limit(1) + .fetchall()[0] + ) assert result is not None, "Database result is empty" assert result[0] > 0, f"No records found in table raw.{linkedin_ads_table}" conn.close() diff --git a/tests/saas/test_stripe.py b/tests/saas/test_stripe.py index c6ad65db1..15147d804 100644 --- a/tests/saas/test_stripe.py +++ b/tests/saas/test_stripe.py @@ -45,7 +45,7 @@ def test_stripe_source_full_refresh(stripe_table, tmp_path): # Verify data was loaded conn = duckdb.connect(abs_db_path) - res = conn.sql(f"select count(*) from raw.{stripe_table}s").fetchone() + res = conn.sql(f"select count(*) from raw.{stripe_table}s").limit(1).fetchall()[0] conn.close() assert res, "Database result is empty" assert res[0] > 0, f"No {stripe_table} records found" @@ -82,7 +82,7 @@ def test_stripe_source_incremental(stripe_table, tmp_path): # Verify data was loaded conn = duckdb.connect(abs_db_path) - res = conn.sql(f"select count(*) from raw.{stripe_table}s").fetchone() + res = conn.sql(f"select count(*) from raw.{stripe_table}s").limit(1).fetchall()[0] conn.close() assert res, "Database result is empty" if res[0] == 0: diff --git a/tests/stream/test_mqbridge_brokerless.py b/tests/stream/test_mqbridge_brokerless.py index cdc39c0c3..bf19ce3f3 100644 --- a/tests/stream/test_mqbridge_brokerless.py +++ b/tests/stream/test_mqbridge_brokerless.py @@ -543,7 +543,9 @@ def test_memory_transport_end_to_end(tmp_path): rows = con.sql( "select order_id, amount from out.orders order by order_id" ).fetchall() - distinct_row = con.sql("select count(distinct _mqb_id) from out.orders").fetchone() + distinct_row = ( + con.sql("select count(distinct _mqb_id) from out.orders").limit(1).fetchall()[0] + ) assert distinct_row is not None distinct_ids = distinct_row[0] con.close()