etlantic-datafusion 0.20.0__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.
- etlantic_datafusion-0.20.0/.gitignore +29 -0
- etlantic_datafusion-0.20.0/PKG-INFO +34 -0
- etlantic_datafusion-0.20.0/README.md +11 -0
- etlantic_datafusion-0.20.0/pyproject.toml +46 -0
- etlantic_datafusion-0.20.0/src/etlantic_datafusion/__init__.py +29 -0
- etlantic_datafusion-0.20.0/src/etlantic_datafusion/compiler.py +71 -0
- etlantic_datafusion-0.20.0/src/etlantic_datafusion/etlantic-plugin-manifest.json +41 -0
- etlantic_datafusion-0.20.0/src/etlantic_datafusion/plugin.py +57 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.egg-info/
|
|
6
|
+
.eggs/
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
site/
|
|
10
|
+
.venv/
|
|
11
|
+
venv/
|
|
12
|
+
.env
|
|
13
|
+
|
|
14
|
+
# Tools
|
|
15
|
+
.pytest_cache/
|
|
16
|
+
.ruff_cache/
|
|
17
|
+
.mypy_cache/
|
|
18
|
+
.coverage
|
|
19
|
+
htmlcov/
|
|
20
|
+
# macOS
|
|
21
|
+
.DS_Store
|
|
22
|
+
**/.DS_Store
|
|
23
|
+
._*
|
|
24
|
+
**/._*
|
|
25
|
+
|
|
26
|
+
examples/_file_storage_out/
|
|
27
|
+
examples/_generated_*.py
|
|
28
|
+
tmp_cli_contracts/
|
|
29
|
+
tmp_/
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: etlantic-datafusion
|
|
3
|
+
Version: 0.20.0
|
|
4
|
+
Summary: Experimental DataFusion dataframe + portable transform plugin for ETLantic.
|
|
5
|
+
Project-URL: Homepage, https://github.com/eddiethedean/etlantic
|
|
6
|
+
Project-URL: Documentation, https://github.com/eddiethedean/etlantic/tree/main/docs
|
|
7
|
+
Project-URL: Repository, https://github.com/eddiethedean/etlantic
|
|
8
|
+
Project-URL: Issues, https://github.com/eddiethedean/etlantic/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/eddiethedean/etlantic/blob/main/CHANGELOG.md
|
|
10
|
+
Author-email: Odo Matthews <odosmatthews@gmail.com>
|
|
11
|
+
License-Expression: MIT
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Typing :: Typed
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Requires-Dist: etlantic<0.21,>=0.20.0
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# etlantic-datafusion (Experimental)
|
|
25
|
+
|
|
26
|
+
Gate B experimental DataFusion plugin for ETLantic 0.20+.
|
|
27
|
+
|
|
28
|
+
**Not recommended for production.** Does not replace Polars as the reference
|
|
29
|
+
dataframe engine. Graduates only after conformance, differentials, Gate A
|
|
30
|
+
Arrow boundaries, and a measured advantage.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install 'etlantic[datafusion]==0.20.0'
|
|
34
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# etlantic-datafusion (Experimental)
|
|
2
|
+
|
|
3
|
+
Gate B experimental DataFusion plugin for ETLantic 0.20+.
|
|
4
|
+
|
|
5
|
+
**Not recommended for production.** Does not replace Polars as the reference
|
|
6
|
+
dataframe engine. Graduates only after conformance, differentials, Gate A
|
|
7
|
+
Arrow boundaries, and a measured advantage.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install 'etlantic[datafusion]==0.20.0'
|
|
11
|
+
```
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "etlantic-datafusion"
|
|
3
|
+
version = "0.20.0"
|
|
4
|
+
description = "Experimental DataFusion dataframe + portable transform plugin for ETLantic."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
requires-python = ">=3.11"
|
|
8
|
+
authors = [{ name = "Odo Matthews", email = "odosmatthews@gmail.com" }]
|
|
9
|
+
classifiers = [
|
|
10
|
+
"Development Status :: 3 - Alpha",
|
|
11
|
+
"Intended Audience :: Developers",
|
|
12
|
+
"License :: OSI Approved :: MIT License",
|
|
13
|
+
"Programming Language :: Python :: 3",
|
|
14
|
+
"Programming Language :: Python :: 3.11",
|
|
15
|
+
"Programming Language :: Python :: 3.12",
|
|
16
|
+
"Programming Language :: Python :: 3.13",
|
|
17
|
+
"Typing :: Typed",
|
|
18
|
+
]
|
|
19
|
+
dependencies = [
|
|
20
|
+
"etlantic>=0.20.0,<0.21",
|
|
21
|
+
]
|
|
22
|
+
# Optional heavy deps for a future graduated runtime (not required to import stubs):
|
|
23
|
+
# datafusion>=40,<50 ; pyarrow>=14
|
|
24
|
+
|
|
25
|
+
[project.urls]
|
|
26
|
+
Homepage = "https://github.com/eddiethedean/etlantic"
|
|
27
|
+
Documentation = "https://github.com/eddiethedean/etlantic/tree/main/docs"
|
|
28
|
+
Repository = "https://github.com/eddiethedean/etlantic"
|
|
29
|
+
Issues = "https://github.com/eddiethedean/etlantic/issues"
|
|
30
|
+
Changelog = "https://github.com/eddiethedean/etlantic/blob/main/CHANGELOG.md"
|
|
31
|
+
|
|
32
|
+
[project.entry-points."etlantic.dataframe_plugins"]
|
|
33
|
+
datafusion = "etlantic_datafusion:create_plugin"
|
|
34
|
+
|
|
35
|
+
[project.entry-points."etlantic.transform_compilers"]
|
|
36
|
+
datafusion = "etlantic_datafusion:create_transform_compiler"
|
|
37
|
+
|
|
38
|
+
[build-system]
|
|
39
|
+
requires = ["hatchling"]
|
|
40
|
+
build-backend = "hatchling.build"
|
|
41
|
+
|
|
42
|
+
[tool.hatch.build.targets.wheel]
|
|
43
|
+
packages = ["src/etlantic_datafusion"]
|
|
44
|
+
|
|
45
|
+
[tool.hatch.build.targets.wheel.force-include]
|
|
46
|
+
"src/etlantic_datafusion/etlantic-plugin-manifest.json" = "etlantic_datafusion/etlantic-plugin-manifest.json"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Experimental DataFusion plugin package (stub; not production-ready in 0.20.0)."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
__version__ = "0.20.0"
|
|
6
|
+
|
|
7
|
+
STREAMING_STABILITY = "experimental"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def create_plugin():
|
|
11
|
+
"""Entry-point factory for ``etlantic.dataframe_plugins`` (experimental stub)."""
|
|
12
|
+
from etlantic_datafusion.plugin import DataFusionPlugin
|
|
13
|
+
|
|
14
|
+
return DataFusionPlugin()
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def create_transform_compiler():
|
|
18
|
+
"""Entry-point factory for ``etlantic.transform_compilers`` (experimental stub)."""
|
|
19
|
+
from etlantic_datafusion.compiler import DataFusionTransformCompiler
|
|
20
|
+
|
|
21
|
+
return DataFusionTransformCompiler()
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
__all__ = [
|
|
25
|
+
"STREAMING_STABILITY",
|
|
26
|
+
"__version__",
|
|
27
|
+
"create_plugin",
|
|
28
|
+
"create_transform_compiler",
|
|
29
|
+
]
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"""Experimental DataFusion portable transform compiler (kernel claim set later)."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from collections.abc import Mapping, Sequence
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
from etlantic.transform.compiler import (
|
|
9
|
+
CompiledTransform,
|
|
10
|
+
TransformCapabilities,
|
|
11
|
+
TransformCompileContext,
|
|
12
|
+
TransformCompilerInfo,
|
|
13
|
+
TransformExecutionContext,
|
|
14
|
+
TransformOutputBundle,
|
|
15
|
+
TransformPlanningContext,
|
|
16
|
+
TransformSupportReport,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
__version__ = "0.20.0"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class DataFusionTransformCompiler:
|
|
23
|
+
"""Experimental compiler — advertise no graduated claims until conformance."""
|
|
24
|
+
|
|
25
|
+
info = TransformCompilerInfo(
|
|
26
|
+
name="etlantic-datafusion",
|
|
27
|
+
version=__version__,
|
|
28
|
+
engine="datafusion",
|
|
29
|
+
capabilities=TransformCapabilities(
|
|
30
|
+
profiles=frozenset(),
|
|
31
|
+
actions=frozenset(),
|
|
32
|
+
functions=frozenset(),
|
|
33
|
+
lazy=True,
|
|
34
|
+
eager=False,
|
|
35
|
+
),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
def analyze(
|
|
39
|
+
self,
|
|
40
|
+
definition: Mapping[str, Any],
|
|
41
|
+
*,
|
|
42
|
+
context: TransformPlanningContext,
|
|
43
|
+
requirements: Mapping[str, Sequence[str]] | None = None,
|
|
44
|
+
) -> TransformSupportReport:
|
|
45
|
+
raise NotImplementedError(
|
|
46
|
+
"etlantic-datafusion portable compiler is experimental; no claims "
|
|
47
|
+
"experimental as of 0.20.0"
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
def compile(
|
|
51
|
+
self,
|
|
52
|
+
definition: Mapping[str, Any],
|
|
53
|
+
*,
|
|
54
|
+
context: TransformCompileContext,
|
|
55
|
+
requirements: Mapping[str, Sequence[str]] | None = None,
|
|
56
|
+
) -> CompiledTransform:
|
|
57
|
+
raise NotImplementedError(
|
|
58
|
+
"etlantic-datafusion portable compile is experimental/ungraduated"
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
async def execute(
|
|
62
|
+
self,
|
|
63
|
+
compiled: CompiledTransform,
|
|
64
|
+
*,
|
|
65
|
+
inputs: Mapping[str, Any],
|
|
66
|
+
parameters: Mapping[str, Any],
|
|
67
|
+
context: TransformExecutionContext,
|
|
68
|
+
) -> TransformOutputBundle:
|
|
69
|
+
raise NotImplementedError(
|
|
70
|
+
"etlantic-datafusion portable execute is experimental/ungraduated"
|
|
71
|
+
)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"capabilities": [
|
|
3
|
+
"dataframe",
|
|
4
|
+
"portable",
|
|
5
|
+
"experimental"
|
|
6
|
+
],
|
|
7
|
+
"digest": "sha256:74b48e6234f9b3994e153ebd79367170fbe25b77aabb4c45fe6fa83101ba5588",
|
|
8
|
+
"entries": [
|
|
9
|
+
{
|
|
10
|
+
"capabilities": [
|
|
11
|
+
"dataframe",
|
|
12
|
+
"lazy",
|
|
13
|
+
"experimental"
|
|
14
|
+
],
|
|
15
|
+
"engine": "datafusion",
|
|
16
|
+
"group": "etlantic.dataframe_plugins",
|
|
17
|
+
"name": "datafusion",
|
|
18
|
+
"protocol": "etlantic.dataframe/1",
|
|
19
|
+
"target": "etlantic_datafusion:create_plugin"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"capabilities": [
|
|
23
|
+
"portable",
|
|
24
|
+
"experimental"
|
|
25
|
+
],
|
|
26
|
+
"engine": "datafusion",
|
|
27
|
+
"group": "etlantic.transform_compilers",
|
|
28
|
+
"name": "datafusion",
|
|
29
|
+
"protocol": "etlantic.transform-compiler/1",
|
|
30
|
+
"target": "etlantic_datafusion:create_transform_compiler"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"package": "etlantic-datafusion",
|
|
34
|
+
"privileges": [],
|
|
35
|
+
"protocol_range": "etlantic.dataframe/1,etlantic.transform-compiler/1",
|
|
36
|
+
"provenance": {
|
|
37
|
+
"publisher": "etlantic"
|
|
38
|
+
},
|
|
39
|
+
"schema": "etlantic.plugin_manifest/1",
|
|
40
|
+
"version": "0.20.0"
|
|
41
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"""Experimental DataFusion dataframe plugin stub."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from etlantic.capabilities import PluginCapabilities
|
|
8
|
+
from etlantic.dataframe.protocol import DataframePluginInfo
|
|
9
|
+
from etlantic.interchange.tabular import InterchangeMechanism
|
|
10
|
+
|
|
11
|
+
__version__ = "0.20.0"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class DataFusionPlugin:
|
|
15
|
+
"""Experimental dataframe plugin — kernel claims expand after conformance."""
|
|
16
|
+
|
|
17
|
+
info = DataframePluginInfo(
|
|
18
|
+
name="etlantic-datafusion",
|
|
19
|
+
version=__version__,
|
|
20
|
+
engine="datafusion",
|
|
21
|
+
capabilities=PluginCapabilities(
|
|
22
|
+
engine="datafusion",
|
|
23
|
+
dataframe=True,
|
|
24
|
+
eager=False,
|
|
25
|
+
lazy=True,
|
|
26
|
+
arrow_import=True,
|
|
27
|
+
arrow_export=True,
|
|
28
|
+
interchange_mechanisms=frozenset(
|
|
29
|
+
{
|
|
30
|
+
InterchangeMechanism.ARROW_C_DATA.value,
|
|
31
|
+
InterchangeMechanism.RECORDS_FALLBACK.value,
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
extras=frozenset({"experimental"}),
|
|
35
|
+
),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
def materialize(self, *args: Any, **kwargs: Any) -> Any:
|
|
39
|
+
raise NotImplementedError(
|
|
40
|
+
"etlantic-datafusion is experimental; kernel materialize is not "
|
|
41
|
+
"experimental as of 0.20.0. See CAPABILITIES and INTEROPERABILITY plan."
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
def execute_transformation(self, *args: Any, **kwargs: Any) -> Any:
|
|
45
|
+
raise NotImplementedError(
|
|
46
|
+
"etlantic-datafusion execute_transformation is experimental/ungraduated"
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
def to_records(
|
|
50
|
+
self, value: Any, *, contract_type: type[Any] | None = None
|
|
51
|
+
) -> list[Any]:
|
|
52
|
+
raise NotImplementedError("etlantic-datafusion to_records is ungraduated")
|
|
53
|
+
|
|
54
|
+
def from_records(
|
|
55
|
+
self, rows: list[Any], *, contract_type: type[Any] | None = None
|
|
56
|
+
) -> Any:
|
|
57
|
+
raise NotImplementedError("etlantic-datafusion from_records is ungraduated")
|