moose-lib 0.6.139__tar.gz → 0.6.141__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.

Files changed (52) hide show
  1. {moose_lib-0.6.139 → moose_lib-0.6.141}/PKG-INFO +1 -1
  2. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/dmv2/olap_table.py +12 -0
  3. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/internal.py +7 -3
  4. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib.egg-info/PKG-INFO +1 -1
  5. {moose_lib-0.6.139 → moose_lib-0.6.141}/README.md +0 -0
  6. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/__init__.py +0 -0
  7. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/blocks.py +0 -0
  8. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/clients/__init__.py +0 -0
  9. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/clients/redis_client.py +0 -0
  10. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/commons.py +0 -0
  11. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/config/__init__.py +0 -0
  12. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/config/config_file.py +0 -0
  13. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/config/runtime.py +0 -0
  14. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/data_models.py +0 -0
  15. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/dmv2/__init__.py +0 -0
  16. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/dmv2/_registry.py +0 -0
  17. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/dmv2/consumption.py +0 -0
  18. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/dmv2/ingest_api.py +0 -0
  19. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/dmv2/ingest_pipeline.py +0 -0
  20. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/dmv2/life_cycle.py +0 -0
  21. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/dmv2/materialized_view.py +0 -0
  22. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/dmv2/registry.py +0 -0
  23. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/dmv2/sql_resource.py +0 -0
  24. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/dmv2/stream.py +0 -0
  25. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/dmv2/types.py +0 -0
  26. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/dmv2/view.py +0 -0
  27. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/dmv2/web_app.py +0 -0
  28. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/dmv2/web_app_helpers.py +0 -0
  29. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/dmv2/workflow.py +0 -0
  30. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/dmv2_serializer.py +0 -0
  31. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/main.py +0 -0
  32. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/query_builder.py +0 -0
  33. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/query_param.py +0 -0
  34. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/streaming/__init__.py +0 -0
  35. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/streaming/streaming_function_runner.py +0 -0
  36. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/utilities/__init__.py +0 -0
  37. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib/utilities/sql.py +0 -0
  38. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib.egg-info/SOURCES.txt +0 -0
  39. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib.egg-info/dependency_links.txt +0 -0
  40. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib.egg-info/requires.txt +0 -0
  41. {moose_lib-0.6.139 → moose_lib-0.6.141}/moose_lib.egg-info/top_level.txt +0 -0
  42. {moose_lib-0.6.139 → moose_lib-0.6.141}/setup.cfg +0 -0
  43. {moose_lib-0.6.139 → moose_lib-0.6.141}/setup.py +0 -0
  44. {moose_lib-0.6.139 → moose_lib-0.6.141}/tests/__init__.py +0 -0
  45. {moose_lib-0.6.139 → moose_lib-0.6.141}/tests/conftest.py +0 -0
  46. {moose_lib-0.6.139 → moose_lib-0.6.141}/tests/test_moose.py +0 -0
  47. {moose_lib-0.6.139 → moose_lib-0.6.141}/tests/test_olap_table_versioning.py +0 -0
  48. {moose_lib-0.6.139 → moose_lib-0.6.141}/tests/test_query_builder.py +0 -0
  49. {moose_lib-0.6.139 → moose_lib-0.6.141}/tests/test_redis_client.py +0 -0
  50. {moose_lib-0.6.139 → moose_lib-0.6.141}/tests/test_s3queue_config.py +0 -0
  51. {moose_lib-0.6.139 → moose_lib-0.6.141}/tests/test_simple_aggregate.py +0 -0
  52. {moose_lib-0.6.139 → moose_lib-0.6.141}/tests/test_web_app.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moose_lib
3
- Version: 0.6.139
3
+ Version: 0.6.141
4
4
  Home-page: https://www.fiveonefour.com/moose
5
5
  Author: Fiveonefour Labs Inc.
6
6
  Author-email: support@fiveonefour.com
@@ -112,6 +112,8 @@ class OlapConfig(BaseModel):
112
112
  `order_by_expression="(id, name)"` is equivalent to order_by_fields=["id", "name"], or
113
113
  "tuple()" for no sorting.
114
114
  partition_by: Optional PARTITION BY expression (single ClickHouse SQL expression).
115
+ sample_by_expression: Optional SAMPLE BY expression for data sampling (single ClickHouse SQL expression).
116
+ Used to enable efficient approximate query processing with SAMPLE clause.
115
117
  engine: The ClickHouse table engine to use. Can be either a ClickHouseEngines enum value
116
118
  (for backward compatibility) or an EngineConfig instance (recommended).
117
119
  version: Optional version string for tracking configuration changes.
@@ -123,11 +125,21 @@ class OlapConfig(BaseModel):
123
125
  order_by_fields: list[str] = []
124
126
  order_by_expression: Optional[str] = None
125
127
  partition_by: Optional[str] = None
128
+ sample_by_expression: Optional[str] = None
126
129
  engine: Optional[Union[ClickHouseEngines, EngineConfig]] = None
127
130
  version: Optional[str] = None
128
131
  metadata: Optional[dict] = None
129
132
  life_cycle: Optional[LifeCycle] = None
130
133
  settings: Optional[dict[str, str]] = None
134
+ # Optional secondary/data-skipping indexes
135
+ class TableIndex(BaseModel):
136
+ name: str
137
+ expression: str
138
+ type: str
139
+ arguments: Optional[list[str]] = None
140
+ granularity: int
141
+
142
+ indexes: list[TableIndex] = []
131
143
 
132
144
  def model_post_init(self, __context):
133
145
  has_fields = bool(self.order_by_fields)
@@ -21,8 +21,7 @@ from moose_lib.dmv2 import (
21
21
  get_workflows,
22
22
  get_web_apps,
23
23
  OlapTable,
24
- View,
25
- MaterializedView,
24
+ OlapConfig,
26
25
  SqlResource
27
26
  )
28
27
  from moose_lib.dmv2.stream import KafkaSchemaConfig
@@ -151,6 +150,7 @@ class TableConfig(BaseModel):
151
150
  columns: List of columns with their types and attributes.
152
151
  order_by: List of columns used for the ORDER BY clause.
153
152
  partition_by: The column name used for the PARTITION BY clause.
153
+ sample_by_expression: Optional SAMPLE BY expression for data sampling.
154
154
  engine_config: Engine configuration with type-safe, engine-specific parameters.
155
155
  version: Optional version string of the table configuration.
156
156
  metadata: Optional metadata for the table.
@@ -163,11 +163,13 @@ class TableConfig(BaseModel):
163
163
  columns: List[Column]
164
164
  order_by: List[str] | str
165
165
  partition_by: Optional[str]
166
+ sample_by_expression: Optional[str] = None
166
167
  engine_config: Optional[EngineConfigDict] = Field(None, discriminator='engine')
167
168
  version: Optional[str] = None
168
169
  metadata: Optional[dict] = None
169
170
  life_cycle: Optional[str] = None
170
- table_settings: Optional[Dict[str, str]] = None
171
+ table_settings: Optional[dict[str, str]] = None
172
+ indexes: list[OlapConfig.TableIndex] = []
171
173
 
172
174
 
173
175
  class TopicConfig(BaseModel):
@@ -601,12 +603,14 @@ def to_infra_map() -> dict:
601
603
  columns=table._column_list,
602
604
  order_by=order_by_value,
603
605
  partition_by=table.config.partition_by,
606
+ sample_by_expression=table.config.sample_by_expression,
604
607
  engine_config=engine_config,
605
608
  version=table.config.version,
606
609
  metadata=getattr(table, "metadata", None),
607
610
  life_cycle=table.config.life_cycle.value if table.config.life_cycle else None,
608
611
  # Map 'settings' to 'table_settings' for internal use
609
612
  table_settings=table_settings if table_settings else None,
613
+ indexes=table.config.indexes,
610
614
  )
611
615
 
612
616
  for name, stream in get_streams().items():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moose_lib
3
- Version: 0.6.139
3
+ Version: 0.6.141
4
4
  Home-page: https://www.fiveonefour.com/moose
5
5
  Author: Fiveonefour Labs Inc.
6
6
  Author-email: support@fiveonefour.com
File without changes
File without changes
File without changes