Skip to content

Commit 0634661

Browse files
committed
I/O: Apache Iceberg (implement suggestions by CodeRabbit)
1 parent d6c18de commit 0634661

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

cratedb_toolkit/cluster/core.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,12 @@ def save_table(
653653
if target_url_obj.scheme.startswith("iceberg") or target_url_obj.scheme.endswith("iceberg"):
654654
from cratedb_toolkit.io.iceberg import to_iceberg
655655

656-
to_iceberg(source_url, target.url)
656+
if to_iceberg(source_url, target.url):
657+
self._load_table_result = True
658+
else:
659+
logger.error("Data loading failed or incomplete")
660+
self._load_table_result = False
661+
657662
else:
658663
raise NotImplementedError(f"Exporting resource not implemented yet: {target_url_obj}")
659664

cratedb_toolkit/io/iceberg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class IcebergAddress:
3838
catalog: str
3939
namespace: str
4040
table: str
41-
batch_size: Optional[int] = None
41+
batch_size: Optional[int] = DEFAULT_BATCH_SIZE
4242

4343
def __post_init__(self):
4444
self.tmpdir = tempfile.TemporaryDirectory()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ tasks.check = [
386386
"test",
387387
]
388388
tasks.docs-autobuild = [
389-
{ cmd = "sphinx-autobuild --open-browser doc doc/_build" },
389+
{ cmd = "sphinx-autobuild --open-browser --watch cratedb_toolkit doc doc/_build" },
390390
]
391391
tasks.docs-html = [
392392
{ cmd = "sphinx-build -W --keep-going doc doc/_build" },

0 commit comments

Comments
 (0)