duckrun 0.1.5__tar.gz → 0.1.5.1__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.
- {duckrun-0.1.5 → duckrun-0.1.5.1}/PKG-INFO +2 -1
- {duckrun-0.1.5 → duckrun-0.1.5.1}/duckrun/core.py +7 -6
- {duckrun-0.1.5 → duckrun-0.1.5.1}/duckrun.egg-info/PKG-INFO +2 -1
- {duckrun-0.1.5 → duckrun-0.1.5.1}/pyproject.toml +5 -4
- {duckrun-0.1.5 → duckrun-0.1.5.1}/LICENSE +0 -0
- {duckrun-0.1.5 → duckrun-0.1.5.1}/README.md +0 -0
- {duckrun-0.1.5 → duckrun-0.1.5.1}/duckrun/__init__.py +0 -0
- {duckrun-0.1.5 → duckrun-0.1.5.1}/duckrun.egg-info/SOURCES.txt +0 -0
- {duckrun-0.1.5 → duckrun-0.1.5.1}/duckrun.egg-info/dependency_links.txt +0 -0
- {duckrun-0.1.5 → duckrun-0.1.5.1}/duckrun.egg-info/requires.txt +0 -0
- {duckrun-0.1.5 → duckrun-0.1.5.1}/duckrun.egg-info/top_level.txt +0 -0
- {duckrun-0.1.5 → duckrun-0.1.5.1}/setup.cfg +0 -0
@@ -1,7 +1,8 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: duckrun
|
3
|
-
Version: 0.1.5
|
3
|
+
Version: 0.1.5.1
|
4
4
|
Summary: Lakehouse task runner powered by DuckDB for Microsoft Fabric
|
5
|
+
Author: mim
|
5
6
|
License-Expression: MIT
|
6
7
|
Project-URL: Homepage, https://github.com/djouallah/duckrun
|
7
8
|
Project-URL: Repository, https://github.com/djouallah/duckrun
|
@@ -13,7 +13,7 @@ class DeltaWriter:
|
|
13
13
|
def __init__(self, relation, duckrun_instance):
|
14
14
|
self.relation = relation
|
15
15
|
self.duckrun = duckrun_instance
|
16
|
-
self._format =
|
16
|
+
self._format = "delta" # Default to delta format
|
17
17
|
self._mode = "overwrite"
|
18
18
|
|
19
19
|
def format(self, format_type: str):
|
@@ -32,8 +32,9 @@ class DeltaWriter:
|
|
32
32
|
|
33
33
|
def saveAsTable(self, table_name: str):
|
34
34
|
"""Save query result as Delta table"""
|
35
|
+
# Format defaults to "delta", so no need to check
|
35
36
|
if self._format != "delta":
|
36
|
-
raise RuntimeError("
|
37
|
+
raise RuntimeError(f"Only 'delta' format is supported, got '{self._format}'")
|
37
38
|
|
38
39
|
# Parse schema.table or use default schema
|
39
40
|
if "." in table_name:
|
@@ -116,7 +117,7 @@ class Duckrun:
|
|
116
117
|
# For data exploration with Spark-style API:
|
117
118
|
dr = Duckrun.connect(workspace, lakehouse, schema)
|
118
119
|
dr.sql("SELECT * FROM table").show()
|
119
|
-
dr.sql("SELECT 43").write.
|
120
|
+
dr.sql("SELECT 43").write.mode("append").saveAsTable("test")
|
120
121
|
"""
|
121
122
|
|
122
123
|
def __init__(self, workspace: str, lakehouse_name: str, schema: str,
|
@@ -413,9 +414,9 @@ class Duckrun:
|
|
413
414
|
dr.sql("SELECT * FROM table").show()
|
414
415
|
df = dr.sql("SELECT * FROM table").df()
|
415
416
|
|
416
|
-
# New Spark-style write API
|
417
|
-
dr.sql("SELECT 43 as value").write.
|
418
|
-
dr.sql("SELECT * FROM source").write.
|
417
|
+
# New Spark-style write API (format is optional, defaults to delta)
|
418
|
+
dr.sql("SELECT 43 as value").write.mode("append").saveAsTable("test")
|
419
|
+
dr.sql("SELECT * FROM source").write.mode("overwrite").saveAsTable("target")
|
419
420
|
"""
|
420
421
|
relation = self.con.sql(query)
|
421
422
|
return QueryResult(relation, self)
|
@@ -1,7 +1,8 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: duckrun
|
3
|
-
Version: 0.1.5
|
3
|
+
Version: 0.1.5.1
|
4
4
|
Summary: Lakehouse task runner powered by DuckDB for Microsoft Fabric
|
5
|
+
Author: mim
|
5
6
|
License-Expression: MIT
|
6
7
|
Project-URL: Homepage, https://github.com/djouallah/duckrun
|
7
8
|
Project-URL: Repository, https://github.com/djouallah/duckrun
|
@@ -1,14 +1,16 @@
|
|
1
|
-
|
2
1
|
[build-system]
|
3
2
|
requires = ["setuptools>=61.0", "wheel"]
|
4
3
|
build-backend = "setuptools.build_meta"
|
5
4
|
|
6
5
|
[project]
|
7
6
|
name = "duckrun"
|
8
|
-
version = "0.1.5"
|
7
|
+
version = "0.1.5.1"
|
9
8
|
description = "Lakehouse task runner powered by DuckDB for Microsoft Fabric"
|
10
9
|
readme = "README.md"
|
11
10
|
license = "MIT"
|
11
|
+
authors = [
|
12
|
+
{name = "mim"}
|
13
|
+
]
|
12
14
|
requires-python = ">=3.9"
|
13
15
|
dependencies = [
|
14
16
|
"duckdb>=1.2.0",
|
@@ -19,5 +21,4 @@ dependencies = [
|
|
19
21
|
[project.urls]
|
20
22
|
Homepage = "https://github.com/djouallah/duckrun"
|
21
23
|
Repository = "https://github.com/djouallah/duckrun"
|
22
|
-
Issues = "https://github.com/djouallah/duckrun/issues"
|
23
|
-
|
24
|
+
Issues = "https://github.com/djouallah/duckrun/issues"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|