R
risingwave-best-practices
About risingwave-best-practices
risingwave-best-practices is a review skill for RisingWave designs and SQL. It organizes 14 rules across schema design, materialized views, streaming SQL, sinks, and performance, explaining issues and fixes.
Key features
- 01覆盖 14 条设计与性能规则
- 02检查 Schema 与数据源选择
- 03审查物化视图及流式 SQL
- 04检查 Sink 配置与输出行为
- 05评估共享数据源、索引和并行度
Use cases
- 01审查 RisingWave Schema 设计
- 02检查物化视图定义与创建方式
- 03评估流式 SQL 和 CDC 模式
- 04排查 Sink 配置与性能问题
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ risingwavelabs/ agent-skills --skill risingwave-best-practicesAfter installing, type/risingwave-best-practicesin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
README.mdrules/_sections.md_template.mdmv-background-ddl.mdmv-emit-on-window-close.mdmv-no-order-by.mdperf-indexes-on-mv.mdperf-parallelism.mdperf-shared-source.mdschema-append-only.mdschema-source-vs-table.mdschema-watermark.mdsink-force-compaction.mdsink-snapshot-false.mdstream-cdc-pattern.mdstream-temporal-join.mdstream-tumble-windows.mdDetails
From the project READMERisingWave Best Practices
14 rules covering schema design, streaming SQL patterns, sink configuration, and performance.
How to Apply
- Read the relevant rule files for the review type below
- Apply rules to the design or code under review
- Explain violations with their impact and the fix
Review Procedures
Schema Review
- schema-source-vs-table.md — SOURCE vs TABLE selection
- schema-append-only.md — APPEND ONLY for immutable streams
- schema-watermark.md — Watermark placement
Materialized View Review
- mv-emit-on-window-close.md — EOWC for windowed queries
- mv-background-ddl.md — Non-blocking DDL for large tables
- mv-no-order-by.md — ORDER BY in MVs
Streaming SQL Review
- stream-tumble-windows.md — Time window functions
- stream-cdc-pattern.md — Two-step CDC setup
- stream-temporal-join.md — Joining streams with CDC tables
Sink Review
- sink-snapshot-false.md — Prevent backfill duplicates
- sink-force-compaction.md — Reduce output volume
Performance Review
- perf-shared-source.md — Shared Kafka source
- perf-indexes-on-mv.md — Indexes on materialized views
- perf-parallelism.md — MV parallelism tuning
Rule Categories
| Priority | Category | Impact | Prefix | Rules |
|---|---|---|---|---|
| 1 | Schema Design | CRITICAL / HIGH | schema- | 3 |
| 2 | Materialized Views | CRITICAL / HIGH | mv- | 3 |
| 3 | Streaming SQL | CRITICAL / HIGH | stream- | 3 |
| 4 | Sink Configuration | HIGH / MEDIUM | sink- | 2 |
| 5 | Performance | HIGH / MEDIUM | perf- | 3 |
Quick Reference
Schema:
schema-source-vs-table— CDC requires TABLE; SOURCE is for append-only streamsschema-append-only— APPEND ONLY enables optimizations; use for immutable event dataschema-watermark— Define watermarks at ingestion point (source/table), not in MVs
Materialized Views:
mv-emit-on-window-close— Use EOWC for final window results; default emits partial updatesmv-background-ddl— SET BACKGROUND_DDL=true before creating MVs over large tablesmv-no-order-by— ORDER BY in MV applies only at creation, not to ongoing results
Streaming SQL:
stream-tumble-windows— Use TUMBLE/HOP/SESSION, not date_trunc, for streaming windowsstream-cdc-pattern— Two-step: CREATE SOURCE (shared) → CREATE TABLE ... FROM sourcestream-temporal-join— Join streaming source with CDC table using FOR SYSTEM_TIME AS OF
Sinks:
sink-snapshot-false— Always usesnapshot = falsewhen adding sinks to existing MVssink-force-compaction— Useforce_compaction = truefor high-cardinality upsert sinks
Performance:
perf-shared-source— Multiple MVs from one Kafka topic should use shared sourceperf-indexes-on-mv— Create indexes on MV columns used in WHERE/JOIN predicatesperf-parallelism— Increase parallelism for high-throughput MVs
Comments
Markdown supported