ducklake-delta-exporter 0.1.1__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ducklake_delta_exporter-0.1.1 → ducklake_delta_exporter-0.1.2}/PKG-INFO +3 -2
- {ducklake_delta_exporter-0.1.1 → ducklake_delta_exporter-0.1.2}/README.md +2 -1
- {ducklake_delta_exporter-0.1.1 → ducklake_delta_exporter-0.1.2}/ducklake_delta_exporter/__init__.py +4 -3
- {ducklake_delta_exporter-0.1.1 → ducklake_delta_exporter-0.1.2}/ducklake_delta_exporter.egg-info/PKG-INFO +3 -2
- {ducklake_delta_exporter-0.1.1 → ducklake_delta_exporter-0.1.2}/setup.py +1 -1
- {ducklake_delta_exporter-0.1.1 → ducklake_delta_exporter-0.1.2}/ducklake_delta_exporter.egg-info/SOURCES.txt +0 -0
- {ducklake_delta_exporter-0.1.1 → ducklake_delta_exporter-0.1.2}/ducklake_delta_exporter.egg-info/dependency_links.txt +0 -0
- {ducklake_delta_exporter-0.1.1 → ducklake_delta_exporter-0.1.2}/ducklake_delta_exporter.egg-info/requires.txt +0 -0
- {ducklake_delta_exporter-0.1.1 → ducklake_delta_exporter-0.1.2}/ducklake_delta_exporter.egg-info/top_level.txt +0 -0
- {ducklake_delta_exporter-0.1.1 → ducklake_delta_exporter-0.1.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ducklake-delta-exporter
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: A utility to export DuckLake database metadata to Delta Lake transaction logs.
|
|
5
5
|
Home-page: https://github.com/djouallah/ducklake_delta_exporter
|
|
6
6
|
Author: mim
|
|
@@ -67,5 +67,6 @@ pip install ducklake-delta-exporter
|
|
|
67
67
|
```
|
|
68
68
|
from ducklake_delta_exporter import generate_latest_delta_log
|
|
69
69
|
|
|
70
|
-
generate_latest_delta_log('/lakehouse/default/Files/meta.db')
|
|
70
|
+
generate_latest_delta_log('/lakehouse/default/Files/meta.db','/lakehouse/default/Tables')
|
|
71
71
|
```
|
|
72
|
+
the data path is optional, but handy to support relative path
|
|
@@ -40,5 +40,6 @@ pip install ducklake-delta-exporter
|
|
|
40
40
|
```
|
|
41
41
|
from ducklake_delta_exporter import generate_latest_delta_log
|
|
42
42
|
|
|
43
|
-
generate_latest_delta_log('/lakehouse/default/Files/meta.db')
|
|
43
|
+
generate_latest_delta_log('/lakehouse/default/Files/meta.db','/lakehouse/default/Tables')
|
|
44
44
|
```
|
|
45
|
+
the data path is optional, but handy to support relative path
|
{ducklake_delta_exporter-0.1.1 → ducklake_delta_exporter-0.1.2}/ducklake_delta_exporter/__init__.py
RENAMED
|
@@ -160,7 +160,7 @@ def get_latest_delta_version_info(delta_log_path, con, table_id):
|
|
|
160
160
|
return last_delta_version_idx, files_in_last_delta_version, last_exported_ducklake_snapshot_id, meta_id_from_delta_log
|
|
161
161
|
|
|
162
162
|
|
|
163
|
-
def generate_latest_delta_log(db_path: str, data_root: str
|
|
163
|
+
def generate_latest_delta_log(db_path: str, data_root: str = None):
|
|
164
164
|
"""
|
|
165
165
|
Generates a Delta Lake transaction log for the LATEST state of each table in a DuckLake database.
|
|
166
166
|
This creates incremental updates to Delta, not a full history.
|
|
@@ -168,10 +168,11 @@ def generate_latest_delta_log(db_path: str, data_root: str='/lakehouse/default/T
|
|
|
168
168
|
Args:
|
|
169
169
|
db_path (str): The path to the DuckLake database file.
|
|
170
170
|
data_root (str): The root directory for the lakehouse data.
|
|
171
|
-
checkpoint_interval (int): The interval at which to create checkpoint files.
|
|
172
171
|
"""
|
|
172
|
+
checkpoint_interval = 1
|
|
173
173
|
con = duckdb.connect(db_path, read_only=True)
|
|
174
|
-
|
|
174
|
+
if data_root is None: # Only fetch from DB if not provided by user
|
|
175
|
+
data_root = con.sql(""" SELECT value FROM ducklake_metadata WHERE key = 'data_path' """).fetchone()[0]
|
|
175
176
|
tables = con.sql("""
|
|
176
177
|
SELECT
|
|
177
178
|
t.table_id,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ducklake-delta-exporter
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: A utility to export DuckLake database metadata to Delta Lake transaction logs.
|
|
5
5
|
Home-page: https://github.com/djouallah/ducklake_delta_exporter
|
|
6
6
|
Author: mim
|
|
@@ -67,5 +67,6 @@ pip install ducklake-delta-exporter
|
|
|
67
67
|
```
|
|
68
68
|
from ducklake_delta_exporter import generate_latest_delta_log
|
|
69
69
|
|
|
70
|
-
generate_latest_delta_log('/lakehouse/default/Files/meta.db')
|
|
70
|
+
generate_latest_delta_log('/lakehouse/default/Files/meta.db','/lakehouse/default/Tables')
|
|
71
71
|
```
|
|
72
|
+
the data path is optional, but handy to support relative path
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|