feldera 0.40.0__py3-none-any.whl → 0.42.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/pipeline.py +1 -1
- feldera/rest/feldera_client.py +30 -3
- {feldera-0.40.0.dist-info → feldera-0.42.0.dist-info}/METADATA +4 -4
- {feldera-0.40.0.dist-info → feldera-0.42.0.dist-info}/RECORD +6 -6
- {feldera-0.40.0.dist-info → feldera-0.42.0.dist-info}/WHEEL +1 -1
- {feldera-0.40.0.dist-info → feldera-0.42.0.dist-info}/top_level.txt +0 -0
feldera/pipeline.py
CHANGED
|
@@ -534,7 +534,7 @@ resume a paused pipeline."""
|
|
|
534
534
|
def checkpoint(self):
|
|
535
535
|
"""
|
|
536
536
|
Checkpoints this pipeline, if fault-tolerance is enabled.
|
|
537
|
-
Fault Tolerance in Feldera: <https://docs.feldera.com/fault-tolerance/>
|
|
537
|
+
Fault Tolerance in Feldera: <https://docs.feldera.com/pipelines/fault-tolerance/>
|
|
538
538
|
|
|
539
539
|
:raises FelderaAPIError: If checkpointing is not enabled.
|
|
540
540
|
"""
|
feldera/rest/feldera_client.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import pathlib
|
|
2
|
-
from typing import Optional
|
|
2
|
+
from typing import Any, Dict, Optional
|
|
3
3
|
import logging
|
|
4
4
|
import time
|
|
5
5
|
import json
|
|
@@ -12,6 +12,21 @@ from feldera.rest.pipeline import Pipeline
|
|
|
12
12
|
from feldera.rest._httprequests import HttpRequests
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
def _validate_no_none_keys_in_map(data):
|
|
16
|
+
def validate_no_none_keys(d: Dict[Any, Any]) -> None:
|
|
17
|
+
for k, v in d.items():
|
|
18
|
+
if isinstance(v, dict) and any(k is None for k in v.keys()):
|
|
19
|
+
raise ValueError("keys of SQL MAP objects cannot be NULL")
|
|
20
|
+
|
|
21
|
+
if isinstance(data, list):
|
|
22
|
+
for datum in data:
|
|
23
|
+
validate_no_none_keys(datum)
|
|
24
|
+
elif isinstance(data, dict):
|
|
25
|
+
validate_no_none_keys(data)
|
|
26
|
+
else:
|
|
27
|
+
return
|
|
28
|
+
|
|
29
|
+
|
|
15
30
|
def _prepare_boolean_input(value: bool) -> str:
|
|
16
31
|
return "true" if value else "false"
|
|
17
32
|
|
|
@@ -57,7 +72,7 @@ class FelderaClient:
|
|
|
57
72
|
Create a FelderaClient that connects to the local Feldera instance
|
|
58
73
|
"""
|
|
59
74
|
|
|
60
|
-
return FelderaClient(f"http://
|
|
75
|
+
return FelderaClient(f"http://127.0.0.1:{port}")
|
|
61
76
|
|
|
62
77
|
def get_pipeline(self, pipeline_name) -> Pipeline:
|
|
63
78
|
"""
|
|
@@ -343,7 +358,7 @@ Reason: The pipeline is in a FAILED state due to the following error:
|
|
|
343
358
|
pipeline_name: str,
|
|
344
359
|
table_name: str,
|
|
345
360
|
format: str,
|
|
346
|
-
data: list[list | str | dict],
|
|
361
|
+
data: list[list | str | dict] | dict,
|
|
347
362
|
array: bool = False,
|
|
348
363
|
force: bool = False,
|
|
349
364
|
update_format: str = "raw",
|
|
@@ -393,6 +408,18 @@ Reason: The pipeline is in a FAILED state due to the following error:
|
|
|
393
408
|
"json_flavor must be one of 'default', 'debezium_mysql', 'snowflake', 'kafka_connect_json_converter', 'pandas'"
|
|
394
409
|
)
|
|
395
410
|
|
|
411
|
+
if update_format == "insert_delete":
|
|
412
|
+
if array:
|
|
413
|
+
for datum in data:
|
|
414
|
+
_validate_no_none_keys_in_map(datum.get("insert", {}))
|
|
415
|
+
_validate_no_none_keys_in_map(datum.get("delete", {}))
|
|
416
|
+
else:
|
|
417
|
+
data: dict = data
|
|
418
|
+
_validate_no_none_keys_in_map(data.get("insert", {}))
|
|
419
|
+
_validate_no_none_keys_in_map(data.get("delete", {}))
|
|
420
|
+
else:
|
|
421
|
+
_validate_no_none_keys_in_map(data)
|
|
422
|
+
|
|
396
423
|
# python sends `True` which isn't accepted by the backend
|
|
397
424
|
array = _prepare_boolean_input(array)
|
|
398
425
|
force = _prepare_boolean_input(force)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: feldera
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.42.0
|
|
4
4
|
Summary: The feldera python client
|
|
5
5
|
Author-email: Abhinav <abhinav.gyawali@feldera.com>
|
|
6
6
|
License: MIT
|
|
@@ -16,9 +16,9 @@ Classifier: Operating System :: OS Independent
|
|
|
16
16
|
Requires-Python: >=3.10
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
Requires-Dist: requests
|
|
19
|
-
Requires-Dist: pandas
|
|
19
|
+
Requires-Dist: pandas>=2.1.2
|
|
20
20
|
Requires-Dist: typing-extensions
|
|
21
|
-
Requires-Dist: numpy
|
|
21
|
+
Requires-Dist: numpy>=2.2.4
|
|
22
22
|
Requires-Dist: pretty-errors
|
|
23
23
|
Requires-Dist: ruff>=0.6.9
|
|
24
24
|
|
|
@@ -3,18 +3,18 @@ feldera/_callback_runner.py,sha256=Tdf6BXN4zppyoy8t_y-Ooa3B0wEfvyezMHU9jxY2ZhA,4
|
|
|
3
3
|
feldera/_helpers.py,sha256=rN0WuGSCCQlXWFMimZUQrgs-LJAfUo074d79sLElncQ,3023
|
|
4
4
|
feldera/enums.py,sha256=tI48tTF65AU5ZLem_IDnC5ycPVMKMv591lW2T__U4C8,7281
|
|
5
5
|
feldera/output_handler.py,sha256=64J3ljhOaKIhxdjOKYi-BUz_HnMwROfmN8eE-btYygU,1930
|
|
6
|
-
feldera/pipeline.py,sha256=
|
|
6
|
+
feldera/pipeline.py,sha256=Sj12-anPQ783FqIU89HnEWbWcChcXceDpuRigHfnRVc,29715
|
|
7
7
|
feldera/pipeline_builder.py,sha256=4rmklRZ0-otvTUb-HTESfNsJopEK-E2jxpJXiYlKpps,3664
|
|
8
8
|
feldera/runtime_config.py,sha256=hlIm2QTEqnUy7ucqS1iQN23ElR5d5aMwGvv_PxjHk8I,3243
|
|
9
9
|
feldera/rest/__init__.py,sha256=Eg-EKUU3RSTDcdxTR_7wNDnCly8VpXEzsZCQUmf-y2M,308
|
|
10
10
|
feldera/rest/_httprequests.py,sha256=e22YbpzOzy7MGo7hk9MOU7ZRTj3F314grY0Ygr-_goI,6636
|
|
11
11
|
feldera/rest/config.py,sha256=DYzZKngDEhouTEwqVFd-rDrBN9tWqsU07Jl_BTT4mXs,1008
|
|
12
12
|
feldera/rest/errors.py,sha256=b4i2JjrbSmej7jdko_FL8UeXklLKenSipwMT80jowaM,1720
|
|
13
|
-
feldera/rest/feldera_client.py,sha256=
|
|
13
|
+
feldera/rest/feldera_client.py,sha256=Hf3CzY9Vr5LApNXDsH9mNtYWldk_qORL_sgJnZeD4Hc,21832
|
|
14
14
|
feldera/rest/pipeline.py,sha256=a1lx-64SYak5mHX5yKElVijdfaAt5sDYVhVIXCJ97QQ,2839
|
|
15
15
|
feldera/rest/sql_table.py,sha256=qrw-YwMzx5T81zDefNO1KOx7EyypFz1vPwGBzSUB7kc,652
|
|
16
16
|
feldera/rest/sql_view.py,sha256=hN12mPM0mvwLCIPYywpb12s9Hd2Ws31IlTMXPriMisw,644
|
|
17
|
-
feldera-0.
|
|
18
|
-
feldera-0.
|
|
19
|
-
feldera-0.
|
|
20
|
-
feldera-0.
|
|
17
|
+
feldera-0.42.0.dist-info/METADATA,sha256=ZeJ2Udr31IXdHg2IzyOXsk7-b7l_8S2S1yS3n54X0Dg,2594
|
|
18
|
+
feldera-0.42.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
19
|
+
feldera-0.42.0.dist-info/top_level.txt,sha256=fB6yTqrQiO6RCbY1xP2T_mpPoTjDFtJvkJJodiee7d0,8
|
|
20
|
+
feldera-0.42.0.dist-info/RECORD,,
|
|
File without changes
|