risingwave-best-practices
Use when designing RisingWave schemas, writing materialized views, configuring sources or sinks, optimizing streaming SQL performance, troubleshooting slow backfills, setting up CDC, designing time-windowed aggregations, or reviewing a RisingWave streaming pipeline
- License 许可
- Apache-2.0
- 最近更新
- 2026-05-06
- Stars
- ★ 14
- Forks
- 2
01 前言 Front Matter
- name
- risingwave-best-practices
- license
- Apache-2.0
- metadata
- { "date": "April 2026", "author": "RisingWave Labs", "version": "0.3.1", "abstract": "14 best-practice rules for RisingWave covering schema design, materialized view patterns, CDC setup, streaming SQL patterns, sink configuration, and performance optimization. Rules are organized by category and impact level (CRITICAL > HIGH > MEDIUM).", "organization": "RisingWave Labs" }
- description
- Use when designing RisingWave schemas, writing materialized views, configuring sources or sinks, optimizing streaming SQL performance, troubleshooting slow backfills, setting up CDC, designing time-windowed aggregations, or reviewing a RisingWave streaming pipeline
02 资源文件 17
- 参考文档README.md1.5 KB
- 参考文档rules/_sections.md567 B
- 参考文档rules/_template.md762 B
- 参考文档rules/mv-background-ddl.md2.1 KB
- 参考文档rules/mv-emit-on-window-close.md2.5 KB
- 参考文档rules/mv-no-order-by.md1.7 KB
- 参考文档rules/perf-indexes-on-mv.md2.3 KB
- 参考文档rules/perf-parallelism.md2.0 KB
- 参考文档rules/perf-shared-source.md2.3 KB
- 参考文档rules/schema-append-only.md1.9 KB
- 参考文档rules/schema-source-vs-table.md2.2 KB
- 参考文档rules/schema-watermark.md2.2 KB
- 参考文档rules/sink-force-compaction.md2.3 KB
- 参考文档rules/sink-snapshot-false.md2.1 KB
- 参考文档rules/stream-cdc-pattern.md2.5 KB
- 参考文档rules/stream-temporal-join.md2.1 KB
- 参考文档rules/stream-tumble-windows.md2.1 KB
03 SKILL.md 正文
RisingWave 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
04 同仓库更多 Skills
write-contracts
Generates secure Aptos Move V2 smart contracts with Object model, Digital Asset integration, security patterns, and storage type guidance. Includes comprehensive storage decision framework for optimal data structure selection. Triggers on: 'write contract', 'create NFT collection', 'build marketplace', 'implement minting', 'generate Move module', 'create token contract', 'build DAO', 'implement staking'. Ask storage questions when: 'store', 'track', 'registry', 'mapping', 'list', 'collection'.
web-search
通用网络搜索技能,支持多引擎搜索(百度、必应、DuckDuckGo),无需API密钥即可获取实时信息
solo-build
Execute implementation plan tasks with TDD workflow, auto-commit, and phase gates. Use when user says "build it", "start building", "execute plan", "implement tasks", "ship it", or references a track ID. Do NOT use for planning (use /plan) or scaffolding (use /scaffold).
react-email
Use when building HTML email templates with React components, adding a visual email editor to an application using the React Email visual editor, rendering emails to HTML, or sending emails with Resend. Covers welcome emails, password resets, notifications, order confirmations, newsletters, transactional emails, and the embeddable email editor component.
APITester Agent-Driven API Testing
Test API endpoints and document responses. Define tests in plain English, run them, get formatted results. Agent-driven Postman alternative.
hubspot-implementation-plan
Generate a phased implementation plan from a HubSpot audit report. Creates prioritized, sequenced cleanup processes with effort estimates, dependencies, and automation feasibility. Use after running /hubspot-audit.