Transform data from CSV files with Pandas in Python containers (in parallel)
Process a list of CSV files in parallel, each in its own isolated Python and Pandas container.
Audits RisingWave streaming lag, pausing sources, auto-scaling worker parallelism, and failing downstream runs to prevent stale reads.
Modern real-time analytics platforms rely on RisingWave to maintain continuously updated materialized views directly over high-velocity Kafka, Pulsar, and Kinesis event streams. However, upstream event volume surges, complex multi-way stream joins, or state store compaction latency can cause streaming workers to suffer backpressure. When this happens, streaming barrier latency spikes, materialized view freshness degrades, and downstream analytical dashboards show stale data. This blueprint provides a complete closed-loop operational workflow that actively resolves streaming lag: it interrogates RisingWave's native system catalog (rw_catalog.rw_streaming_jobs), evaluates lag severity in Python, temporarily pauses the upstream ingestion source to stop backpressure floods, scales materialized view worker parallelism in flight, resumes ingestion, verifies worker recovery, and halts downstream pipelines if lag cannot be resolved within SLA tolerance.
rw_catalog.rw_streaming_jobs.If conditional task executes active multi-step remediation.ALTER SOURCE ... PAUSE) to halt incoming records during rebalancing.ALTER MATERIALIZED VIEW ... SET PARALLELISM DDL command to expand worker compute capacity.ALTER SOURCE ... RESUME) to re-enable continuous stream processing.RUNNING state.graph TD
Trigger[Schedule Trigger: 15m] --> ProbeTelemetry[Postgres Query: Probe Streaming Jobs]
ProbeTelemetry --> EvalLag[Python Script: Evaluate Lag Severity]
EvalLag --> CheckLag{Remediation Required?}
CheckLag -- Yes --> PauseSource[Postgres Query: ALTER SOURCE PAUSE]
PauseSource --> ScaleMV[Postgres Query: ALTER MATERIALIZED VIEW SET PARALLELISM]
ScaleMV --> ResumeSource[Postgres Query: ALTER SOURCE RESUME]
ResumeSource --> VerifyDrain[Postgres Query: Verify Drained Latency]
VerifyDrain --> CheckState{State RUNNING?}
CheckState -- No --> FailDownstream[Fail: Abort Downstream Runs]
CheckState -- Yes --> FinalLog[Log: Record Verified Capacity]
CheckLag -- No --> NominalLog[Log: Throughput Optimal]
NominalLog --> FinalLog
ALTER SOURCE and ALTER MATERIALIZED VIEW commands.| Name | Type | Default | Description |
|---|---|---|---|
risingwave_host |
STRING | localhost |
Hostname or IP address of the RisingWave compute or frontend node. |
risingwave_port |
INT | 4566 |
PostgreSQL-wire compatible port for RisingWave (default 4566). |
database_name |
STRING | dev |
RisingWave database containing target streaming sources and views. |
risingwave_username |
STRING | root |
Database user with DDL privileges on target streaming objects. |
target_source_name |
STRING | src_kafka_orders |
Name of the upstream streaming source connector feeding the pipeline. |
target_materialized_view |
STRING | mv_realtime_order_aggregates |
Name of the streaming materialized view evaluated for barrier lag. |
max_allowable_lag_ms |
INT | 5000 |
Streaming barrier latency threshold in milliseconds triggering remediation. |
target_scale_parallelism |
INT | 8 |
Target worker thread count applied to relieve streaming backpressure. |
{{ outputs.probe_streaming_jobs_and_sources.row.total_streaming_jobs }}: Total number of registered streaming jobs in the database.{{ outputs.evaluate_streaming_lag_and_backpressure.vars.requires_remediation }}: Boolean flag indicating if source pausing and scaling were applied.{{ outputs.evaluate_streaming_lag_and_backpressure.vars.current_parallelism }}: Original worker parallelism observed prior to remediation.{{ outputs.verify_drained_barrier_latency.row.verified_parallelism }}: Post-remediation worker parallelism verified from system catalogs.{{ outputs.verify_drained_barrier_latency.row.verified_state }}: Operational state of the streaming job post-remediation.rw_catalog.RISINGWAVE_PASSWORD.RISINGWAVE_PASSWORD: Password for the RisingWave database user.RISINGWAVE_PASSWORD into your Kestra namespace secrets.risingwave_host, source in target_source_name, and view in target_materialized_view.periodic_streaming_audit schedule trigger to establish automated continuous surveillance.ALTER SOURCE and ALTER MATERIALIZED VIEW.target_materialized_view parameter must match the exact view identifier in rw_catalog.rw_streaming_jobs.