Where to keep state of stateful transforms
The choice of state storage depends on your data volume, latency requirements, and computational resources.
- Keep state in RAM if it can be cheaply reconstructed from limited historical data (example - 1-minute candles)
- Keep state in ClickHouse and use materialized views if your transforms meet these criteria:
For very frequent changes on lightweight data, prefer plain (non-materialized) views. You must have computational resources to spare on the database machine to take this approach.
- If your destination requires pre-transformed data, consider using stateful transformers:
- SQLite-based - for small applications
- For large applications consider connecting your pipe to Apache Flink

