feldera 0.101.0__py3-none-any.whl → 0.102.0__py3-none-any.whl
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/enums.py +35 -0
- feldera/pipeline.py +5 -7
- feldera/pipeline_builder.py +5 -3
- feldera/rest/feldera_client.py +1 -1
- feldera/runtime_config.py +14 -1
- {feldera-0.101.0.dist-info → feldera-0.102.0.dist-info}/METADATA +1 -1
- {feldera-0.101.0.dist-info → feldera-0.102.0.dist-info}/RECORD +9 -9
- {feldera-0.101.0.dist-info → feldera-0.102.0.dist-info}/WHEEL +0 -0
- {feldera-0.101.0.dist-info → feldera-0.102.0.dist-info}/top_level.txt +0 -0
feldera/enums.py
CHANGED
|
@@ -276,3 +276,38 @@ class StorageStatus(Enum):
|
|
|
276
276
|
|
|
277
277
|
def __eq__(self, other):
|
|
278
278
|
return self.value == other.value
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
class FaultToleranceModel(Enum):
|
|
282
|
+
"""
|
|
283
|
+
The fault tolerance model.
|
|
284
|
+
"""
|
|
285
|
+
|
|
286
|
+
AtLeastOnce = 1
|
|
287
|
+
"""
|
|
288
|
+
Each record is output at least once. Crashes may duplicate output, but
|
|
289
|
+
no input or output is dropped.
|
|
290
|
+
"""
|
|
291
|
+
|
|
292
|
+
ExactlyOnce = 2
|
|
293
|
+
"""
|
|
294
|
+
Each record is output exactly once. Crashes do not drop or duplicate
|
|
295
|
+
input or output.
|
|
296
|
+
"""
|
|
297
|
+
|
|
298
|
+
def __str__(self) -> str:
|
|
299
|
+
match self:
|
|
300
|
+
case FaultToleranceModel.AtLeastOnce:
|
|
301
|
+
return "at_least_once"
|
|
302
|
+
case FaultToleranceModel.ExactlyOnce:
|
|
303
|
+
return "exactly_once"
|
|
304
|
+
|
|
305
|
+
@staticmethod
|
|
306
|
+
def from_str(value):
|
|
307
|
+
for member in FaultToleranceModel:
|
|
308
|
+
if str(member) == value.lower():
|
|
309
|
+
return member
|
|
310
|
+
|
|
311
|
+
raise ValueError(
|
|
312
|
+
f"Unknown value '{value}' for enum {FaultToleranceModel.__name__}"
|
|
313
|
+
)
|
feldera/pipeline.py
CHANGED
|
@@ -145,7 +145,7 @@ class Pipeline:
|
|
|
145
145
|
:param data: The JSON encoded data to be pushed to the pipeline. The data should be in the form:
|
|
146
146
|
`{'col1': 'val1', 'col2': 'val2'}` or `[{'col1': 'val1', 'col2': 'val2'}, {'col1': 'val1', 'col2': 'val2'}]`
|
|
147
147
|
:param update_format: The update format of the JSON data to be pushed to the pipeline. Must be one of:
|
|
148
|
-
"raw", "insert_delete".
|
|
148
|
+
"raw", "insert_delete". https://docs.feldera.com/formats/json#the-insertdelete-format
|
|
149
149
|
:param force: `True` to push data even if the pipeline is paused. `False` by default.
|
|
150
150
|
|
|
151
151
|
:raises ValueError: If the update format is invalid.
|
|
@@ -180,7 +180,7 @@ class Pipeline:
|
|
|
180
180
|
All connectors are RUNNING by default.
|
|
181
181
|
|
|
182
182
|
Refer to the connector documentation for more information:
|
|
183
|
-
|
|
183
|
+
https://docs.feldera.com/connectors/#input-connector-orchestration
|
|
184
184
|
|
|
185
185
|
:param table_name: The name of the table that the connector is attached to.
|
|
186
186
|
:param connector_name: The name of the connector to pause.
|
|
@@ -199,7 +199,7 @@ class Pipeline:
|
|
|
199
199
|
All connectors are RUNNING by default.
|
|
200
200
|
|
|
201
201
|
Refer to the connector documentation for more information:
|
|
202
|
-
|
|
202
|
+
https://docs.feldera.com/connectors/#input-connector-orchestration
|
|
203
203
|
|
|
204
204
|
:param table_name: The name of the table that the connector is attached to.
|
|
205
205
|
:param connector_name: The name of the connector to resume.
|
|
@@ -533,15 +533,13 @@ metrics"""
|
|
|
533
533
|
|
|
534
534
|
def checkpoint(self, wait: bool = False, timeout_s=300) -> int:
|
|
535
535
|
"""
|
|
536
|
-
Checkpoints this pipeline
|
|
537
|
-
Fault Tolerance in Feldera:
|
|
538
|
-
<https://docs.feldera.com/pipelines/fault-tolerance/>
|
|
536
|
+
Checkpoints this pipeline.
|
|
539
537
|
|
|
540
538
|
:param wait: If true, will block until the checkpoint completes.
|
|
541
539
|
:param timeout_s: The maximum time (in seconds) to wait for the
|
|
542
540
|
checkpoint to complete.
|
|
543
541
|
|
|
544
|
-
:raises FelderaAPIError: If
|
|
542
|
+
:raises FelderaAPIError: If enterprise features are not enabled.
|
|
545
543
|
"""
|
|
546
544
|
|
|
547
545
|
seq = self.client.checkpoint_pipeline(self.name)
|
feldera/pipeline_builder.py
CHANGED
|
@@ -10,14 +10,16 @@ class PipelineBuilder:
|
|
|
10
10
|
"""
|
|
11
11
|
A builder for creating a Feldera Pipeline.
|
|
12
12
|
|
|
13
|
-
:param client: The
|
|
13
|
+
:param client: The :class:`.FelderaClient` instance
|
|
14
14
|
:param name: The name of the pipeline
|
|
15
15
|
:param description: The description of the pipeline
|
|
16
16
|
:param sql: The SQL code of the pipeline
|
|
17
17
|
:param udf_rust: Rust code for UDFs
|
|
18
18
|
:param udf_toml: Rust dependencies required by UDFs (in the TOML format)
|
|
19
|
-
:param compilation_profile: The
|
|
20
|
-
:param runtime_config: The
|
|
19
|
+
:param compilation_profile: The :class:`.CompilationProfile` to use
|
|
20
|
+
:param runtime_config: The :class:`.RuntimeConfig` to use. Enables
|
|
21
|
+
configuring the runtime behavior of the pipeline such as:
|
|
22
|
+
fault tolerance, storage and :class:`.Resources`
|
|
21
23
|
"""
|
|
22
24
|
|
|
23
25
|
def __init__(
|
feldera/rest/feldera_client.py
CHANGED
|
@@ -404,7 +404,7 @@ Reason: The pipeline is in a STOPPED state due to the following error:
|
|
|
404
404
|
|
|
405
405
|
def checkpoint_pipeline(self, pipeline_name: str) -> int:
|
|
406
406
|
"""
|
|
407
|
-
Checkpoint a
|
|
407
|
+
Checkpoint a pipeline.
|
|
408
408
|
|
|
409
409
|
:param pipeline_name: The name of the pipeline to checkpoint
|
|
410
410
|
"""
|
feldera/runtime_config.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from typing import Optional, Any, Mapping
|
|
3
|
+
from feldera.enums import FaultToleranceModel
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
class Resources:
|
|
@@ -59,6 +60,11 @@ class Storage:
|
|
|
59
60
|
class RuntimeConfig:
|
|
60
61
|
"""
|
|
61
62
|
Runtime configuration class to define the configuration for a pipeline.
|
|
63
|
+
To create runtime config from a dictionary, use
|
|
64
|
+
:meth:`.RuntimeConfig.from_dict`.
|
|
65
|
+
|
|
66
|
+
Documentation:
|
|
67
|
+
https://docs.feldera.com/pipelines/configuration/#runtime-configuration
|
|
62
68
|
"""
|
|
63
69
|
|
|
64
70
|
def __init__(
|
|
@@ -74,6 +80,8 @@ class RuntimeConfig:
|
|
|
74
80
|
provisioning_timeout_secs: Optional[int] = None,
|
|
75
81
|
resources: Optional[Resources] = None,
|
|
76
82
|
runtime_version: Optional[str] = None,
|
|
83
|
+
fault_tolerance_model: Optional[FaultToleranceModel] = None,
|
|
84
|
+
checkpoint_interval_secs: Optional[int] = None,
|
|
77
85
|
):
|
|
78
86
|
self.workers = workers
|
|
79
87
|
self.tracing = tracing
|
|
@@ -86,6 +94,11 @@ class RuntimeConfig:
|
|
|
86
94
|
self.runtime_version = runtime_version or os.environ.get(
|
|
87
95
|
"FELDERA_RUNTIME_VERSION"
|
|
88
96
|
)
|
|
97
|
+
if fault_tolerance_model is not None:
|
|
98
|
+
self.fault_tolerance = {
|
|
99
|
+
"model": str(fault_tolerance_model),
|
|
100
|
+
"checkpoint_interval_secs": checkpoint_interval_secs,
|
|
101
|
+
}
|
|
89
102
|
if resources is not None:
|
|
90
103
|
self.resources = resources.__dict__
|
|
91
104
|
if isinstance(storage, bool):
|
|
@@ -100,7 +113,7 @@ class RuntimeConfig:
|
|
|
100
113
|
@classmethod
|
|
101
114
|
def from_dict(cls, d: Mapping[str, Any]):
|
|
102
115
|
"""
|
|
103
|
-
Create a
|
|
116
|
+
Create a :class:`.RuntimeConfig` object from a dictionary.
|
|
104
117
|
"""
|
|
105
118
|
|
|
106
119
|
conf = cls()
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
feldera/__init__.py,sha256=EiY3bTj_mnfNhCGrZo6J__brfovIJ-YYAdy77PyaEoo,378
|
|
2
2
|
feldera/_callback_runner.py,sha256=GNOg3TrKJg9zJU0HvpWxCHqzjMUX8ORiHhtiEEdVQzE,4758
|
|
3
3
|
feldera/_helpers.py,sha256=rN0WuGSCCQlXWFMimZUQrgs-LJAfUo074d79sLElncQ,3023
|
|
4
|
-
feldera/enums.py,sha256=
|
|
4
|
+
feldera/enums.py,sha256=MTHBojVANsdRnjbrzCyIOniDIUaH8nTYRfxB7QvajEE,9570
|
|
5
5
|
feldera/output_handler.py,sha256=64J3ljhOaKIhxdjOKYi-BUz_HnMwROfmN8eE-btYygU,1930
|
|
6
|
-
feldera/pipeline.py,sha256=
|
|
7
|
-
feldera/pipeline_builder.py,sha256=
|
|
8
|
-
feldera/runtime_config.py,sha256=
|
|
6
|
+
feldera/pipeline.py,sha256=edNcJ28PnVPabCALSwg_30-IVrCR42zqPj8QPJn0JZI,34287
|
|
7
|
+
feldera/pipeline_builder.py,sha256=pK8t93PIyM3zHzVTNg2jAafI7g2ZThNQyZER-_6e3G0,4081
|
|
8
|
+
feldera/runtime_config.py,sha256=rPO1abLSJmozR4z1QwI93kt1rZMkFq-CBdqqmpKCSMU,4369
|
|
9
9
|
feldera/stats.py,sha256=XBhkRsV7FXErwWuPP0i3q9W77mzkMo-oThPVEZy5y3U,5028
|
|
10
10
|
feldera/rest/__init__.py,sha256=Eg-EKUU3RSTDcdxTR_7wNDnCly8VpXEzsZCQUmf-y2M,308
|
|
11
11
|
feldera/rest/_helpers.py,sha256=q7jWInKp9IiIli8N5o31lDG3hNUbcsJqufZXYHG04ps,222
|
|
12
12
|
feldera/rest/_httprequests.py,sha256=e22YbpzOzy7MGo7hk9MOU7ZRTj3F314grY0Ygr-_goI,6636
|
|
13
13
|
feldera/rest/config.py,sha256=DYzZKngDEhouTEwqVFd-rDrBN9tWqsU07Jl_BTT4mXs,1008
|
|
14
14
|
feldera/rest/errors.py,sha256=b4i2JjrbSmej7jdko_FL8UeXklLKenSipwMT80jowaM,1720
|
|
15
|
-
feldera/rest/feldera_client.py,sha256=
|
|
15
|
+
feldera/rest/feldera_client.py,sha256=Aic8PvBMG_aP_7d1qKx2C3RZ44rwLXN-OjvtV-a_dE8,25275
|
|
16
16
|
feldera/rest/feldera_config.py,sha256=1pnGbLFMSLvp7Qh_OlPLALSKCSHIktNWKvx6gYU00U4,1374
|
|
17
17
|
feldera/rest/pipeline.py,sha256=-dGGUdtHMABKrQEclaeuwGI_FOCrQOk6p2aCFV0FdU8,2890
|
|
18
18
|
feldera/rest/sql_table.py,sha256=qrw-YwMzx5T81zDefNO1KOx7EyypFz1vPwGBzSUB7kc,652
|
|
19
19
|
feldera/rest/sql_view.py,sha256=hN12mPM0mvwLCIPYywpb12s9Hd2Ws31IlTMXPriMisw,644
|
|
20
|
-
feldera-0.
|
|
21
|
-
feldera-0.
|
|
22
|
-
feldera-0.
|
|
23
|
-
feldera-0.
|
|
20
|
+
feldera-0.102.0.dist-info/METADATA,sha256=vxgcnxIFUUAaG8yPqmTgXG2_vGXSudRPwuUwrVDh3PQ,4101
|
|
21
|
+
feldera-0.102.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
22
|
+
feldera-0.102.0.dist-info/top_level.txt,sha256=fB6yTqrQiO6RCbY1xP2T_mpPoTjDFtJvkJJodiee7d0,8
|
|
23
|
+
feldera-0.102.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|