feldera 0.34.1__py3-none-any.whl → 0.36.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/_helpers.py +13 -0
- feldera/rest/_httprequests.py +2 -1
- {feldera-0.34.1.dist-info → feldera-0.36.0.dist-info}/METADATA +1 -1
- {feldera-0.34.1.dist-info → feldera-0.36.0.dist-info}/RECORD +6 -6
- {feldera-0.34.1.dist-info → feldera-0.36.0.dist-info}/WHEEL +0 -0
- {feldera-0.34.1.dist-info → feldera-0.36.0.dist-info}/top_level.txt +0 -0
feldera/_helpers.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import uuid
|
|
2
|
+
|
|
1
3
|
import pandas as pd
|
|
2
4
|
from decimal import Decimal
|
|
3
5
|
|
|
@@ -8,6 +10,8 @@ def sql_type_to_pandas_type(sql_type: str):
|
|
|
8
10
|
"""
|
|
9
11
|
|
|
10
12
|
match sql_type.upper():
|
|
13
|
+
case "UUID":
|
|
14
|
+
return None
|
|
11
15
|
case "BOOLEAN":
|
|
12
16
|
return "boolean"
|
|
13
17
|
case "TINYINT":
|
|
@@ -64,6 +68,7 @@ def dataframe_from_response(buffer: list[list[dict]], schema: dict):
|
|
|
64
68
|
pd_schema = {}
|
|
65
69
|
|
|
66
70
|
decimal_col = []
|
|
71
|
+
uuid_col = []
|
|
67
72
|
|
|
68
73
|
for column in schema["fields"]:
|
|
69
74
|
column_name = column["name"]
|
|
@@ -72,6 +77,8 @@ def dataframe_from_response(buffer: list[list[dict]], schema: dict):
|
|
|
72
77
|
column_type = column["columntype"]["type"]
|
|
73
78
|
if column_type == "DECIMAL":
|
|
74
79
|
decimal_col.append(column_name)
|
|
80
|
+
elif column_type == "UUID":
|
|
81
|
+
uuid_col.append(column_name)
|
|
75
82
|
|
|
76
83
|
pd_schema[column_name] = sql_type_to_pandas_type(column_type)
|
|
77
84
|
|
|
@@ -89,6 +96,12 @@ def dataframe_from_response(buffer: list[list[dict]], schema: dict):
|
|
|
89
96
|
if datum[col] is not None:
|
|
90
97
|
datum[col] = Decimal(datum[col])
|
|
91
98
|
|
|
99
|
+
if len(uuid_col) != 0:
|
|
100
|
+
for datum in data:
|
|
101
|
+
for col in uuid_col:
|
|
102
|
+
if datum[col] is not None:
|
|
103
|
+
datum[col] = uuid.UUID(datum[col])
|
|
104
|
+
|
|
92
105
|
df = pd.DataFrame(data)
|
|
93
106
|
df = df.astype(pd_schema)
|
|
94
107
|
|
feldera/rest/_httprequests.py
CHANGED
|
@@ -14,7 +14,8 @@ from typing import Callable, Optional, Any, Union, Mapping, Sequence, List
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
def json_serialize(body: Any) -> str:
|
|
17
|
-
|
|
17
|
+
# serialize as string if this object cannot be serialized (e.g. UUID)
|
|
18
|
+
return json.dumps(body, default=str) if body else "" if body == "" else "null"
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
class HttpRequests:
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
feldera/__init__.py,sha256=PxkgCtEAuFwo4u8NGEDio-bF3M-GnbeV45tAQVoBbqE,297
|
|
2
2
|
feldera/_callback_runner.py,sha256=Tdf6BXN4zppyoy8t_y-Ooa3B0wEfvyezMHU9jxY2ZhA,4713
|
|
3
|
-
feldera/_helpers.py,sha256=
|
|
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
6
|
feldera/pipeline.py,sha256=yDU5vSRk-2I5P1VeV_Ix5rCDLbjNIkIYEP_gA2vWSIU,29705
|
|
7
7
|
feldera/pipeline_builder.py,sha256=4rmklRZ0-otvTUb-HTESfNsJopEK-E2jxpJXiYlKpps,3664
|
|
8
8
|
feldera/runtime_config.py,sha256=PfYXsrLrs5Duty-7x3dGDf2uvp5hwp3Yb5n3bRQtLVk,2898
|
|
9
9
|
feldera/rest/__init__.py,sha256=Eg-EKUU3RSTDcdxTR_7wNDnCly8VpXEzsZCQUmf-y2M,308
|
|
10
|
-
feldera/rest/_httprequests.py,sha256=
|
|
10
|
+
feldera/rest/_httprequests.py,sha256=kMW0yG1a0Mdcxnc6ShXUiL5zpBZZyGkhB5X3RGyaEUE,6269
|
|
11
11
|
feldera/rest/config.py,sha256=84Lj2QX6SYNZJdBfrCHPMh29Nj4MY7nRB-uddytx_ok,795
|
|
12
12
|
feldera/rest/errors.py,sha256=b4i2JjrbSmej7jdko_FL8UeXklLKenSipwMT80jowaM,1720
|
|
13
13
|
feldera/rest/feldera_client.py,sha256=kTNN3DaxQ5gnCpTYAggpdlMpBKJJ15bYh_WXI6FzGzU,20570
|
|
14
14
|
feldera/rest/pipeline.py,sha256=o6BFLL3DuurvAhneX1LH7mLjbvX3dn4lCXziYRciUI4,2788
|
|
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.36.0.dist-info/METADATA,sha256=cdqXJqGOx7omP4oQVlHJ8wndlhVqhQ-3pVExeD5pok0,2582
|
|
18
|
+
feldera-0.36.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
19
|
+
feldera-0.36.0.dist-info/top_level.txt,sha256=fB6yTqrQiO6RCbY1xP2T_mpPoTjDFtJvkJJodiee7d0,8
|
|
20
|
+
feldera-0.36.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|