feldera 0.108.0__tar.gz → 0.109.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.
Potentially problematic release.
This version of feldera might be problematic. Click here for more details.
- {feldera-0.108.0 → feldera-0.109.0}/PKG-INFO +1 -1
- {feldera-0.108.0 → feldera-0.109.0}/feldera/pipeline.py +20 -2
- {feldera-0.108.0 → feldera-0.109.0}/feldera/pipeline_builder.py +2 -6
- {feldera-0.108.0 → feldera-0.109.0}/feldera/rest/feldera_client.py +20 -6
- {feldera-0.108.0 → feldera-0.109.0}/feldera/runtime_config.py +10 -4
- {feldera-0.108.0 → feldera-0.109.0}/feldera.egg-info/PKG-INFO +1 -1
- {feldera-0.108.0 → feldera-0.109.0}/pyproject.toml +1 -1
- {feldera-0.108.0 → feldera-0.109.0}/README.md +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera/__init__.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera/_callback_runner.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera/_helpers.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera/enums.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera/output_handler.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera/rest/__init__.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera/rest/_helpers.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera/rest/_httprequests.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera/rest/config.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera/rest/errors.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera/rest/feldera_config.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera/rest/pipeline.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera/rest/sql_table.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera/rest/sql_view.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera/stats.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera.egg-info/SOURCES.txt +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera.egg-info/dependency_links.txt +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera.egg-info/requires.txt +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/feldera.egg-info/top_level.txt +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/setup.cfg +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/tests/test_pipeline_builder.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/tests/test_shared_pipeline0.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/tests/test_shared_pipeline1.py +0 -0
- {feldera-0.108.0 → feldera-0.109.0}/tests/test_udf.py +0 -0
|
@@ -19,6 +19,7 @@ from feldera.output_handler import OutputHandler
|
|
|
19
19
|
from feldera._helpers import ensure_dataframe_has_columns, chunk_dataframe
|
|
20
20
|
from feldera.rest.sql_table import SQLTable
|
|
21
21
|
from feldera.rest.sql_view import SQLView
|
|
22
|
+
from feldera.runtime_config import RuntimeConfig
|
|
22
23
|
from feldera.stats import PipelineStatistics
|
|
23
24
|
|
|
24
25
|
|
|
@@ -827,13 +828,30 @@ pipeline '{self.name}' to sync checkpoint '{uuid}'"""
|
|
|
827
828
|
self.refresh()
|
|
828
829
|
return self._inner.program_config
|
|
829
830
|
|
|
830
|
-
def runtime_config(self) ->
|
|
831
|
+
def runtime_config(self) -> RuntimeConfig:
|
|
831
832
|
"""
|
|
832
833
|
Return the runtime config of the pipeline.
|
|
833
834
|
"""
|
|
834
835
|
|
|
835
836
|
self.refresh()
|
|
836
|
-
return self._inner.runtime_config
|
|
837
|
+
return RuntimeConfig.from_dict(self._inner.runtime_config)
|
|
838
|
+
|
|
839
|
+
def set_runtime_config(self, runtime_config: RuntimeConfig):
|
|
840
|
+
"""Updates the runtime config of the pipeline. The pipeline
|
|
841
|
+
must be stopped and, in addition, changing some pipeline
|
|
842
|
+
configuration requires storage to be cleared.
|
|
843
|
+
|
|
844
|
+
For example, to set 'min_batch_size_records' on a pipeline:
|
|
845
|
+
|
|
846
|
+
runtime_config = pipeline.runtime_config()
|
|
847
|
+
runtime_config.min_batch_size_records = 500
|
|
848
|
+
pipeline.set_runtime_config(runtime_config)
|
|
849
|
+
|
|
850
|
+
"""
|
|
851
|
+
|
|
852
|
+
self.client.patch_pipeline(
|
|
853
|
+
name=self._inner.name, runtime_config=runtime_config.to_dict()
|
|
854
|
+
)
|
|
837
855
|
|
|
838
856
|
def id(self) -> str:
|
|
839
857
|
"""
|
|
@@ -68,9 +68,7 @@ class PipelineBuilder:
|
|
|
68
68
|
program_config={
|
|
69
69
|
"profile": self.compilation_profile.value,
|
|
70
70
|
},
|
|
71
|
-
runtime_config=
|
|
72
|
-
(k, v) for k, v in self.runtime_config.__dict__.items() if v is not None
|
|
73
|
-
),
|
|
71
|
+
runtime_config=self.runtime_config.to_dict(),
|
|
74
72
|
)
|
|
75
73
|
|
|
76
74
|
inner = self.client.create_pipeline(inner)
|
|
@@ -108,9 +106,7 @@ class PipelineBuilder:
|
|
|
108
106
|
program_config={
|
|
109
107
|
"profile": self.compilation_profile.value,
|
|
110
108
|
},
|
|
111
|
-
runtime_config=
|
|
112
|
-
(k, v) for k, v in self.runtime_config.__dict__.items() if v is not None
|
|
113
|
-
),
|
|
109
|
+
runtime_config=self.runtime_config.to_dict(),
|
|
114
110
|
)
|
|
115
111
|
|
|
116
112
|
inner = self.client.create_or_update_pipeline(inner)
|
|
@@ -4,7 +4,7 @@ import logging
|
|
|
4
4
|
import time
|
|
5
5
|
import json
|
|
6
6
|
from decimal import Decimal
|
|
7
|
-
from typing import Generator
|
|
7
|
+
from typing import Generator, Mapping
|
|
8
8
|
|
|
9
9
|
from feldera.rest.config import Config
|
|
10
10
|
from feldera.rest.feldera_config import FelderaConfig
|
|
@@ -191,18 +191,32 @@ class FelderaClient:
|
|
|
191
191
|
|
|
192
192
|
return self.__wait_for_compilation(pipeline.name)
|
|
193
193
|
|
|
194
|
-
def patch_pipeline(
|
|
194
|
+
def patch_pipeline(
|
|
195
|
+
self,
|
|
196
|
+
name: str,
|
|
197
|
+
sql: Optional[str] = None,
|
|
198
|
+
udf_rust: Optional[str] = None,
|
|
199
|
+
udf_toml: Optional[str] = None,
|
|
200
|
+
program_config: Optional[Mapping[str, Any]] = None,
|
|
201
|
+
runtime_config: Optional[Mapping[str, Any]] = None,
|
|
202
|
+
description: Optional[str] = None,
|
|
203
|
+
):
|
|
195
204
|
"""
|
|
196
|
-
Incrementally update
|
|
205
|
+
Incrementally update pipeline
|
|
197
206
|
|
|
198
207
|
:param name: The name of the pipeline
|
|
199
|
-
:param sql: The SQL snippet. Replaces the existing SQL code with this
|
|
200
|
-
one.
|
|
201
208
|
"""
|
|
202
209
|
|
|
203
210
|
self.http.patch(
|
|
204
211
|
path=f"/pipelines/{name}",
|
|
205
|
-
body={
|
|
212
|
+
body={
|
|
213
|
+
"program_code": sql,
|
|
214
|
+
"udf_rust": udf_rust,
|
|
215
|
+
"udf_toml": udf_toml,
|
|
216
|
+
"program_config": program_config,
|
|
217
|
+
"runtime_config": runtime_config,
|
|
218
|
+
"description": description,
|
|
219
|
+
},
|
|
206
220
|
)
|
|
207
221
|
|
|
208
222
|
def delete_pipeline(self, name: str):
|
|
@@ -101,10 +101,13 @@ class RuntimeConfig:
|
|
|
101
101
|
}
|
|
102
102
|
if resources is not None:
|
|
103
103
|
self.resources = resources.__dict__
|
|
104
|
-
if
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
if storage is not None:
|
|
105
|
+
if isinstance(storage, bool):
|
|
106
|
+
self.storage = storage
|
|
107
|
+
elif isinstance(storage, Storage):
|
|
108
|
+
self.storage = storage.__dict__
|
|
109
|
+
else:
|
|
110
|
+
raise ValueError(f"Unknown value '{storage}' for storage")
|
|
108
111
|
|
|
109
112
|
@staticmethod
|
|
110
113
|
def default() -> "RuntimeConfig":
|
|
@@ -119,3 +122,6 @@ class RuntimeConfig:
|
|
|
119
122
|
conf = cls()
|
|
120
123
|
conf.__dict__ = d
|
|
121
124
|
return conf
|
|
125
|
+
|
|
126
|
+
def to_dict(self) -> dict:
|
|
127
|
+
return dict((k, v) for k, v in self.__dict__.items() if v is not None)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|