moose-lib 0.6.61__tar.gz → 0.6.62__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 moose-lib might be problematic. Click here for more details.
- {moose_lib-0.6.61 → moose_lib-0.6.62}/PKG-INFO +1 -1
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/main.py +15 -5
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib.egg-info/PKG-INFO +1 -1
- {moose_lib-0.6.61 → moose_lib-0.6.62}/README.md +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/__init__.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/blocks.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/clients/__init__.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/clients/redis_client.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/commons.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/config/__init__.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/config/config_file.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/config/runtime.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/data_models.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/dmv2/__init__.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/dmv2/_registry.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/dmv2/consumption.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/dmv2/ingest_api.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/dmv2/ingest_pipeline.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/dmv2/life_cycle.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/dmv2/materialized_view.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/dmv2/olap_table.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/dmv2/registry.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/dmv2/sql_resource.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/dmv2/stream.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/dmv2/types.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/dmv2/view.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/dmv2/workflow.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/dmv2_serializer.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/internal.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/query_param.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/streaming/__init__.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/streaming/streaming_function_runner.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/utilities/__init__.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib/utilities/sql.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib.egg-info/SOURCES.txt +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib.egg-info/dependency_links.txt +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib.egg-info/requires.txt +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/moose_lib.egg-info/top_level.txt +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/setup.cfg +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/setup.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/tests/__init__.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/tests/conftest.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/tests/test_moose.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/tests/test_redis_client.py +0 -0
- {moose_lib-0.6.61 → moose_lib-0.6.62}/tests/test_s3queue_config.py +0 -0
|
@@ -203,15 +203,27 @@ class QueryClient:
|
|
|
203
203
|
|
|
204
204
|
clickhouse_query = input.format_map(params)
|
|
205
205
|
preview_query = input.format_map(preview_params)
|
|
206
|
+
print(f"[QueryClient] | Query: {' '.join(preview_query.split())}")
|
|
207
|
+
return self.execute_raw(
|
|
208
|
+
clickhouse_query, values, row_type
|
|
209
|
+
)
|
|
206
210
|
|
|
211
|
+
def execute_raw(
|
|
212
|
+
self,
|
|
213
|
+
clickhouse_query: str,
|
|
214
|
+
parameters: Optional[dict[str, Any]],
|
|
215
|
+
row_type: Type[BaseModel] = None
|
|
216
|
+
):
|
|
217
|
+
"""
|
|
218
|
+
Uses raw clickhouse SQL syntax.
|
|
219
|
+
"""
|
|
207
220
|
# We are not using the result of the ping
|
|
208
221
|
# but this ensures that if the clickhouse cloud service is idle, we
|
|
209
222
|
# wake it up, before we send the query.
|
|
210
223
|
self.ch_client.ping()
|
|
211
224
|
|
|
212
|
-
print(f"[QueryClient] | Query: {' '.join(preview_query.split())}")
|
|
213
225
|
start = perf_counter()
|
|
214
|
-
val = self.ch_client.query(clickhouse_query,
|
|
226
|
+
val = self.ch_client.query(clickhouse_query, parameters)
|
|
215
227
|
secs = perf_counter() - start
|
|
216
228
|
if secs < 1:
|
|
217
229
|
print(f"[QueryClient] | Query completed: {secs * 1000:.0f} ms")
|
|
@@ -354,7 +366,7 @@ class WorkflowClient:
|
|
|
354
366
|
dmv2_workflow = get_workflow(name)
|
|
355
367
|
if dmv2_workflow is None:
|
|
356
368
|
raise ValueError(f"DMv2 workflow '{name}' not found")
|
|
357
|
-
|
|
369
|
+
|
|
358
370
|
return {
|
|
359
371
|
'retry_count': dmv2_workflow.config.retries or 3,
|
|
360
372
|
'timeout_str': dmv2_workflow.config.timeout or "1h",
|
|
@@ -388,8 +400,6 @@ class WorkflowClient:
|
|
|
388
400
|
"""Build workflow arguments for DMv2 workflow."""
|
|
389
401
|
return [{"workflow_name": name, "execution_mode": "start"}, input_data]
|
|
390
402
|
|
|
391
|
-
|
|
392
|
-
|
|
393
403
|
def parse_timeout_to_timedelta(self, timeout_str: str) -> Optional[timedelta]:
|
|
394
404
|
if timeout_str == "never":
|
|
395
405
|
return None # Unlimited execution timeout
|
|
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
|
|
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
|