SIENTIAPDE-1084
Remove deprecated files and configurations, including .env, Dockerfile, docker-compose.yml, and client-schedule.py. Update README.md to reflect new architecture and features, enhancing clarity on system capabilities and workflows. Adjust values.yaml for image tag and replica count, and improve code documentation across various modules for better maintainability.
This commit is contained in:
@@ -10,27 +10,54 @@ with workflow.unsafe.imports_passed_through():
|
||||
|
||||
@workflow.defn(name="core_scouter")
|
||||
class CoreScouter:
|
||||
"""
|
||||
Core data processing workflow that handles data quality, aggregation, and export.
|
||||
|
||||
This workflow implements the core data processing pipeline for industrial data:
|
||||
- Data quality validation and filtering
|
||||
- Time-series data aggregation using configurable functions
|
||||
- Data grouping and temporary storage in Redis
|
||||
- Asynchronous export to PostgreSQL for persistent storage
|
||||
- Metrics collection and monitoring
|
||||
|
||||
The workflow is designed for high-throughput data processing with configurable
|
||||
quality gates and aggregation strategies.
|
||||
"""
|
||||
|
||||
@workflow.run
|
||||
async def run(self, input_data: dict[str, Any]):
|
||||
async def run(self, input_data: dict[str, Any]) -> None:
|
||||
"""
|
||||
Core scouter workflow. Passes data through data_quality_gate,
|
||||
group_and_hold_data, and then asynchronously exports data to postgres
|
||||
using export_data_to_postgres and in the future will trigger_laborious
|
||||
if needed.
|
||||
Execute the core data processing workflow.
|
||||
|
||||
This method processes industrial time-series data through a series of stages:
|
||||
1. Data Quality Gate: Applies configurable filters for data validation
|
||||
2. Data Aggregation: Groups and aggregates data using specified functions
|
||||
3. Data Grouping: Organizes data by tags and applies retention policies
|
||||
4. Data Export: Persists processed data to PostgreSQL
|
||||
5. Metrics Collection: Records processing metrics for monitoring
|
||||
|
||||
Args:
|
||||
input_data (dict[str, Any]): The data to process. Contains:
|
||||
metadata (dict[str, Any]): The metadata of the workflow.
|
||||
workflow_name (str): The name of the workflow.
|
||||
schedule_name (str): The name of the schedule.
|
||||
model_name (str): The name of the model.
|
||||
model_id (str): The id of the model.
|
||||
data (dict[str, Any]): The data to process.
|
||||
trigger_laborious (bool): Whether to trigger laborious.
|
||||
filters (dict[str, str]): The filters to apply.
|
||||
schema (str): The schema of the table to export data to.
|
||||
table_name (str): The name of the table to export data to.
|
||||
retention_time (int): The retention time for data in redis in seconds.
|
||||
input_data (dict[str, Any]): Complete workflow configuration and data.
|
||||
Required fields:
|
||||
- metadata (dict[str, Any]): Workflow execution metadata
|
||||
- workflow_name (str): Name of the parent workflow
|
||||
- schedule_name (str): Data collection schedule identifier
|
||||
- model_name (str): Data model name
|
||||
- model_id (str): Unique model identifier
|
||||
- data (dict[str, Any]): Raw time-series data to process
|
||||
- trigger_laborious (bool): Enable intensive processing mode
|
||||
- filters (dict[str, str]): Data quality filter configurations
|
||||
- schema (str): Target database schema
|
||||
- table_name (str): Target database table
|
||||
- retention_time (int): Redis data retention period (seconds)
|
||||
- model_tags (dict[str, Any]): Tag-specific processing rules
|
||||
|
||||
Returns:
|
||||
None: This workflow processes data but doesn't return results
|
||||
|
||||
Raises:
|
||||
WorkflowExecutionError: If workflow execution fails
|
||||
ActivityExecutionError: If any activity fails after retry attempts
|
||||
"""
|
||||
|
||||
metadata = input_data['metadata']
|
||||
|
||||
Reference in New Issue
Block a user