Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions dlt/destinations/impl/filesystem/sql_client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import Any, TYPE_CHECKING, Tuple, List
import os
import semver
import duckdb

from dlt.common import logger
Expand Down Expand Up @@ -159,9 +159,12 @@ def _escape_column_name(col_name: str) -> str:
else:
compression = ""

from_statement = (
f"iceberg_scan('{last_metadata_file}'{compression}, skip_schema_inference=false)"
)
if semver.Version.parse(duckdb.__version__) > semver.Version.parse("1.3.0"):
scanner_options = "union_by_name=true"
else:
scanner_options = "skip_schema_inference=false"

from_statement = f"iceberg_scan('{last_metadata_file}'{compression}, {scanner_options})"
# TODO: on duckdb > 1.2.1 register self.remote_client.fs_client as abfss fsspec filesystem
# this will enable iceberg but with lower performance
else:
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "dlt"
version = "1.14.1"
version = "1.15.0"
description = "dlt is an open-source python-first scalable data loading library that does not require any backend to run."
authors = [{ name = "dltHub Inc.", email = "[email protected]" }]
requires-python = ">=3.9.2, <3.15"
Expand Down Expand Up @@ -262,7 +262,8 @@ pipeline = [
# this pandas and above has functional numpy dependency
"pandas>=2.1.4",
# keep last duckdb version that works with azure and iceberg correctly
"duckdb<1.2.1",
"duckdb<1.4",
"duckdb<1.2.1 ; os_name == 'nt'",
]
airflow = ["apache-airflow>=2.8.0,<3 ; python_version < '3.12'"]
ibis = [
Expand Down
Loading
Loading