feldera 0.134.0__py3-none-any.whl → 0.135.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/_callback_runner.py +10 -9
- feldera/_helpers.py +2 -2
- feldera/rest/feldera_client.py +4 -0
- feldera/testutils.py +5 -1
- {feldera-0.134.0.dist-info → feldera-0.135.0.dist-info}/METADATA +1 -1
- {feldera-0.134.0.dist-info → feldera-0.135.0.dist-info}/RECORD +8 -8
- {feldera-0.134.0.dist-info → feldera-0.135.0.dist-info}/WHEEL +0 -0
- {feldera-0.134.0.dist-info → feldera-0.135.0.dist-info}/top_level.txt +0 -0
feldera/_callback_runner.py
CHANGED
|
@@ -39,14 +39,12 @@ class CallbackRunner(Thread):
|
|
|
39
39
|
"""
|
|
40
40
|
|
|
41
41
|
pipeline = self.client.get_pipeline(self.pipeline_name)
|
|
42
|
-
schema = pipeline.program_info["schema"]
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
break
|
|
43
|
+
schemas = pipeline.tables + pipeline.views
|
|
44
|
+
for schema in schemas:
|
|
45
|
+
if schema.name == self.view_name:
|
|
46
|
+
self.schema = schema
|
|
47
|
+
break
|
|
50
48
|
|
|
51
49
|
if self.schema is None:
|
|
52
50
|
raise ValueError(
|
|
@@ -66,7 +64,10 @@ class CallbackRunner(Thread):
|
|
|
66
64
|
case _CallbackRunnerInstruction.PipelineStarted:
|
|
67
65
|
# listen to the pipeline
|
|
68
66
|
gen_obj = self.client.listen_to_pipeline(
|
|
69
|
-
self.pipeline_name,
|
|
67
|
+
self.pipeline_name,
|
|
68
|
+
self.view_name,
|
|
69
|
+
format="json",
|
|
70
|
+
case_sensitive=self.schema.case_sensitive,
|
|
70
71
|
)
|
|
71
72
|
|
|
72
73
|
# if there is a queue set up, inform the main thread that the listener has been started, and it can
|
|
@@ -83,7 +84,7 @@ class CallbackRunner(Thread):
|
|
|
83
84
|
seq_no: Optional[int] = chunk.get("sequence_number")
|
|
84
85
|
if data is not None and seq_no is not None:
|
|
85
86
|
self.callback(
|
|
86
|
-
dataframe_from_response([data], self.schema), seq_no
|
|
87
|
+
dataframe_from_response([data], self.schema.fields), seq_no
|
|
87
88
|
)
|
|
88
89
|
|
|
89
90
|
if self.queue:
|
feldera/_helpers.py
CHANGED
|
@@ -60,7 +60,7 @@ def ensure_dataframe_has_columns(df: pd.DataFrame):
|
|
|
60
60
|
)
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
def dataframe_from_response(buffer: list[list[dict]],
|
|
63
|
+
def dataframe_from_response(buffer: list[list[dict]], fields: list[dict]):
|
|
64
64
|
"""
|
|
65
65
|
Converts the response from Feldera to a pandas DataFrame.
|
|
66
66
|
"""
|
|
@@ -70,7 +70,7 @@ def dataframe_from_response(buffer: list[list[dict]], schema: dict):
|
|
|
70
70
|
decimal_col = []
|
|
71
71
|
uuid_col = []
|
|
72
72
|
|
|
73
|
-
for column in
|
|
73
|
+
for column in fields:
|
|
74
74
|
column_name = column["name"]
|
|
75
75
|
if not column["case_sensitive"]:
|
|
76
76
|
column_name = column_name.lower()
|
feldera/rest/feldera_client.py
CHANGED
|
@@ -830,6 +830,7 @@ Reason: The pipeline is in a STOPPED state due to the following error:
|
|
|
830
830
|
backpressure: bool = True,
|
|
831
831
|
array: bool = False,
|
|
832
832
|
timeout: Optional[float] = None,
|
|
833
|
+
case_sensitive: bool = False,
|
|
833
834
|
):
|
|
834
835
|
"""
|
|
835
836
|
Listen for updates to views for pipeline, yields the chunks of data
|
|
@@ -845,6 +846,7 @@ Reason: The pipeline is in a STOPPED state due to the following error:
|
|
|
845
846
|
"json" format, the default value is False
|
|
846
847
|
|
|
847
848
|
:param timeout: The amount of time in seconds to listen to the stream for
|
|
849
|
+
:param case_sensitive: True if the table name is case sensitive or a reserved keyword, False by default
|
|
848
850
|
"""
|
|
849
851
|
|
|
850
852
|
params = {
|
|
@@ -855,6 +857,8 @@ Reason: The pipeline is in a STOPPED state due to the following error:
|
|
|
855
857
|
if format == "json":
|
|
856
858
|
params["array"] = _prepare_boolean_input(array)
|
|
857
859
|
|
|
860
|
+
table_name = f'"{table_name}"' if case_sensitive else table_name
|
|
861
|
+
|
|
858
862
|
resp = self.http.post(
|
|
859
863
|
path=f"/pipelines/{pipeline_name}/egress/{table_name}",
|
|
860
864
|
params=params,
|
feldera/testutils.py
CHANGED
|
@@ -23,6 +23,7 @@ KAFKA_SERVER = os.environ.get("FELDERA_KAFKA_SERVER", "localhost:19092")
|
|
|
23
23
|
PIPELINE_TO_KAFKA_SERVER = os.environ.get(
|
|
24
24
|
"FELDERA_PIPELINE_TO_KAFKA_SERVER", "redpanda:9092"
|
|
25
25
|
)
|
|
26
|
+
FELDERA_TLS_INSECURE = True if os.environ.get("FELDERA_TLS_INSECURE") else False
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
class _LazyClient:
|
|
@@ -36,7 +37,10 @@ class _LazyClient:
|
|
|
36
37
|
def _ensure(self):
|
|
37
38
|
if self._client is None:
|
|
38
39
|
self._client = FelderaClient(
|
|
39
|
-
BASE_URL,
|
|
40
|
+
BASE_URL,
|
|
41
|
+
api_key=API_KEY,
|
|
42
|
+
connection_timeout=10,
|
|
43
|
+
requests_verify=not FELDERA_TLS_INSECURE,
|
|
40
44
|
)
|
|
41
45
|
return self._client
|
|
42
46
|
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
feldera/__init__.py,sha256=EiY3bTj_mnfNhCGrZo6J__brfovIJ-YYAdy77PyaEoo,378
|
|
2
|
-
feldera/_callback_runner.py,sha256
|
|
3
|
-
feldera/_helpers.py,sha256=
|
|
2
|
+
feldera/_callback_runner.py,sha256=v3PD2DcT190ObYWoZDtWfS2zF9KU63gVKpguvAAEtJk,4786
|
|
3
|
+
feldera/_helpers.py,sha256=TQnDQW19fpljD19ppd5dASy1gUC4y8GNnnJjXxbaUmM,3019
|
|
4
4
|
feldera/enums.py,sha256=MTHBojVANsdRnjbrzCyIOniDIUaH8nTYRfxB7QvajEE,9570
|
|
5
5
|
feldera/output_handler.py,sha256=64J3ljhOaKIhxdjOKYi-BUz_HnMwROfmN8eE-btYygU,1930
|
|
6
6
|
feldera/pipeline.py,sha256=yhUGKbagA--_D-vB8k8Mm9rZFhc7NbcpXh1OK8zPmBo,41742
|
|
7
7
|
feldera/pipeline_builder.py,sha256=a750hp5SgTmlyrobTHFh1fTaK9Ed4A5qnXaYRctRM-8,4250
|
|
8
8
|
feldera/runtime_config.py,sha256=MuYJPd5G_hnu_eDz4ge4BfYvSBSOvOEtv4NYh5sEwqU,4452
|
|
9
9
|
feldera/stats.py,sha256=1qDlWhI-ORx3FktxH3b93mXWwtCOb4XuP0iJePHJTrE,5030
|
|
10
|
-
feldera/testutils.py,sha256=
|
|
10
|
+
feldera/testutils.py,sha256=cL7A_XNhDMRXdHeswOFX1CXbnwF_KG1-EKxBK6AU8dY,6477
|
|
11
11
|
feldera/rest/__init__.py,sha256=Eg-EKUU3RSTDcdxTR_7wNDnCly8VpXEzsZCQUmf-y2M,308
|
|
12
12
|
feldera/rest/_helpers.py,sha256=q7jWInKp9IiIli8N5o31lDG3hNUbcsJqufZXYHG04ps,222
|
|
13
13
|
feldera/rest/_httprequests.py,sha256=WbMeFodRV0ZHjA4LhcsbGUtVO-j8HQ98SRfgogOFA8A,8074
|
|
14
14
|
feldera/rest/config.py,sha256=ag8Vh1Ul0wmo--3kvfwL_vUfu4CHESnn07xUuIJRbv4,1213
|
|
15
15
|
feldera/rest/errors.py,sha256=wKWwlL5WI3SVXC8rQTy3rS3wQ9Hjjn_EY7iRHXZFIVE,2341
|
|
16
|
-
feldera/rest/feldera_client.py,sha256=
|
|
16
|
+
feldera/rest/feldera_client.py,sha256=0KWd3ZFbgsaNzIC-NWzvXMZwLkFCWPnA-M2IQBZnWbM,37323
|
|
17
17
|
feldera/rest/feldera_config.py,sha256=1pnGbLFMSLvp7Qh_OlPLALSKCSHIktNWKvx6gYU00U4,1374
|
|
18
18
|
feldera/rest/pipeline.py,sha256=Rmbflbwjvd86iZ5aSJ5b_bTSs6vgvEKQFwMZDtm0nxE,2835
|
|
19
19
|
feldera/rest/sql_table.py,sha256=qrw-YwMzx5T81zDefNO1KOx7EyypFz1vPwGBzSUB7kc,652
|
|
20
20
|
feldera/rest/sql_view.py,sha256=hN12mPM0mvwLCIPYywpb12s9Hd2Ws31IlTMXPriMisw,644
|
|
21
21
|
feldera/tests/test_datafusionize.py,sha256=NGriTaTWf_WnXFud1wmpFwLFa_-XGjfCh6La3dWc3QA,1337
|
|
22
|
-
feldera-0.
|
|
23
|
-
feldera-0.
|
|
24
|
-
feldera-0.
|
|
25
|
-
feldera-0.
|
|
22
|
+
feldera-0.135.0.dist-info/METADATA,sha256=n-PWnfPsiYpBBWYtE-0NGXTrPh1urwxpmsWgyR7l6uU,2368
|
|
23
|
+
feldera-0.135.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
24
|
+
feldera-0.135.0.dist-info/top_level.txt,sha256=fB6yTqrQiO6RCbY1xP2T_mpPoTjDFtJvkJJodiee7d0,8
|
|
25
|
+
feldera-0.135.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|