Apache Flink is the right tool for complex event processing, custom stateful operators and very large keyed state. For teams whose streaming logic already fits in SQL, the realistic alternatives in 2026 are RisingWave and Materialize (streaming databases that also serve results), ksqlDB (SQL over Kafka only), Spark Structured Streaming (micro-batch for Spark shops) and Bytewax (Python). This guide is written for SQL teams: it covers when to stay on Flink, how Flink SQL concepts map onto the alternatives, what a migration actually involves, and where each alternative, including RisingWave, is the wrong choice.
Disclosure. This article is published by RisingWave Labs, the company behind RisingWave, one of the systems discussed here. We do not rank the systems. Each vendor section links to that vendor's documentation and license so you can verify what we say. The only performance figure referenced is a vendor-run benchmark with a published configuration, labelled as such. Facts were last verified on 8 November 2026. A companion article, choosing a Flink alternative by architecture, covers the same decision from the architecture side, and the streaming database comparison hub covers more systems.
When Flink is the right tool
Be honest about this before evaluating anything else. Flink earns its complexity for specific requirements, and none of the alternatives below replaces it for them.
Complex event processing. Detecting a pattern across a sequence of events, such as a product view followed by cart abandonment followed by a retargeting click within thirty minutes, is what Flink SQL's MATCH_RECOGNIZE and the CEP library are for. No SQL-first streaming database in this article offers an equivalent.
Custom stateful operators. If your logic needs per-key state machines, custom timers or external calls that cannot be expressed as joins and aggregations, the DataStream API in Java, Scala or Python is the tool. Process functions are not something you rewrite in SQL.
Very large keyed state with hands-on control. Flink lets you choose and tune state backends, checkpoint intervals and incremental checkpointing. At hundreds of gigabytes of keyed state with strict latency targets, that control matters.
An existing Flink platform that works. If Flink is in production, the team knows it, and the operational cost is acceptable, there is rarely a reason to migrate. The rest of this article is for teams starting new work or for teams whose Flink operational overhead is actively hurting them.
Flink is Apache 2.0, has the largest community in stream processing, and is available as a managed service from Confluent, Ververica, AWS, Decodable and DeltaStream. If any of the four situations above describes you, stop here and keep using Flink.
What a SQL team actually runs on Flink
The more common situation at mid-sized companies looks like this: Kafka topics, a PostgreSQL or MySQL database, and a business team asking for live dashboards, alerts or an API that returns current numbers. The logic is filters, joins, windowed aggregations and the occasional top-N. It is written in Flink SQL, not the DataStream API.
That workload requires the following in Flink:
- A JobManager and TaskManagers, deployed and monitored
- A state backend configured, usually RocksDB for anything beyond a few gigabytes
- Checkpoint storage on S3 or HDFS
- Savepoints managed for every job upgrade and schema change
- JVM heap sizing per workload
- A separate serving database, because a Flink job writes to a sink and cannot be queried itself
The last point is the one SQL teams underestimate. A Flink SQL job computes a result and writes it to Kafka, a JDBC table or Iceberg. To answer "what is revenue by region right now" you connect to the sink, not to Flink. You are operating a processor and a database, plus the connector and schema coordination between them.
For logic that fits in SQL and results that need to be queried, a streaming database collapses that into one system. For logic that fits in SQL but whose results only need to land in Iceberg or Kafka, a lighter stream processor may also do.
Concept mapping: Flink SQL to the alternatives
| Flink SQL concept | RisingWave | Materialize | ksqlDB | Spark Structured Streaming |
|---|---|---|---|---|
CREATE TABLE ... WITH ('connector' = 'kafka') | CREATE SOURCE ... WITH (connector = 'kafka') | CREATE SOURCE ... FROM KAFKA CONNECTION | CREATE STREAM ... WITH (KAFKA_TOPIC = ...) | spark.readStream.format("kafka") |
| Flink CDC connector table | CREATE SOURCE with postgres-cdc, mysql-cdc, sqlserver-cdc, mongodb-cdc, then CREATE TABLE ... FROM source | CREATE SOURCE FROM POSTGRES / MYSQL / SQL SERVER CONNECTION | Not available; use Kafka Connect and Debezium | Not available natively; use Debezium or vendor tooling |
WATERMARK FOR ts AS ts - INTERVAL '5' SECOND | Same clause, optional, needed for EMIT ON WINDOW CLOSE | Temporal filters with mz_now() | WITH (TIMESTAMP = ...) and grace periods | withWatermark("ts", "5 seconds") |
Window TVF TUMBLE(TABLE t, DESCRIPTOR(ts), INTERVAL '1' HOUR) | TUMBLE(t, ts, INTERVAL '1' HOUR) table function | date_trunc or date_bin in GROUP BY | WINDOW TUMBLING (SIZE 1 HOUR) | window(ts, "1 hour") |
INSERT INTO sink_table SELECT ... | CREATE MATERIALIZED VIEW ... AS SELECT ...; optional CREATE SINK | CREATE MATERIALIZED VIEW; optional CREATE SINK | CREATE TABLE AS SELECT | writeStream.format(...) |
| Query the result | SELECT on the view, PostgreSQL protocol | SELECT on the view, PostgreSQL protocol | Pull query on a table | Query the sink in another system |
MATCH_RECOGNIZE | Not available | Not available | Not available | Not available |
The mapping is cleanest for RisingWave and Materialize because both are SQL databases with PostgreSQL semantics. It is partial for ksqlDB because the dialect and the Kafka-only data model differ. It is a reimplementation rather than a translation for Spark.
The alternatives for SQL teams
RisingWave
RisingWave is an open source, PostgreSQL-compatible streaming database. Streaming logic is written as materialized views; the engine maintains them incrementally; any PostgreSQL client queries them on port 4566. It is the closest thing to a drop-in replacement for the "Flink SQL plus a serving database" pattern because it does both halves in one system. Documentation is at docs.risingwave.com and the license is Apache 2.0.
-- Define a source from Kafka
CREATE SOURCE user_events (
user_id BIGINT,
event_type VARCHAR,
amount NUMERIC,
occurred_at TIMESTAMPTZ
)
WITH (
connector = 'kafka',
topic = 'user-events',
properties.bootstrap.server = 'kafka:9092'
)
FORMAT PLAIN ENCODE JSON;
-- Maintain a continuously updated materialized view
CREATE MATERIALIZED VIEW user_activity_summary AS
SELECT
user_id,
COUNT(*) AS event_count,
SUM(amount) AS total_amount,
MAX(occurred_at) AS last_seen
FROM user_events
GROUP BY user_id;
The view is queryable immediately. There is no sink to configure and no second database to keep in sync.
Native CDC reads changes from PostgreSQL, MySQL, SQL Server and MongoDB without Debezium or Kafka in the path:
CREATE SOURCE pg_source WITH (
connector = 'postgres-cdc',
hostname = 'prod.internal',
port = '5432',
username = 'rw',
password = 'secret',
database.name = 'app'
);
CREATE TABLE orders (
order_id BIGINT PRIMARY KEY,
customer_id BIGINT,
amount NUMERIC,
order_time TIMESTAMPTZ
) FROM pg_source TABLE 'public.orders';
What SQL teams gain. One system instead of Flink plus a sink. PostgreSQL types, functions and client compatibility, so dbt, Grafana, Metabase and application drivers work unchanged. State on S3-compatible object storage with stateless compute, so scaling and recovery do not involve moving RocksDB state around. Continuous writes into Apache Iceberg with a hosted REST catalog and compaction handled by RisingWave. A vector(n) type, HNSW indexes and an openai_embedding() function for AI feature pipelines, and an official MCP server for agents.
What SQL teams give up. No MATCH_RECOGNIZE, no CEP library, no custom operators beyond SQL and user-defined functions. Exactly-once processing and snapshot-consistent reads across views, but not Materialize's strict serializability across interactive transactions. A smaller community and ecosystem than Flink's. If you have Flink SQL jobs that lean on Flink-specific hints or connectors, those parts need rework.
Choose RisingWave when your Flink workload is Flink SQL rather than DataStream, your results need to be queried by applications, dashboards or agents, you want CDC without Kafka, and an Apache 2.0 license matters to you.
Materialize
Materialize is a streaming SQL database built on Timely and Differential Dataflow, also PostgreSQL wire compatible, also based on incrementally maintained materialized views. For a SQL team, the migration shape from Flink SQL is the same as for RisingWave: sources, views, optional sinks, and queries against the views. Documentation is at materialize.com/docs.
What SQL teams gain. Strong consistency as a design centre, with strict serializability as the default isolation level across views. Broad SQL coverage and good documentation on idiomatic streaming SQL patterns. Native sources for PostgreSQL, MySQL, SQL Server, Kafka, Redpanda and webhooks, and an Iceberg sink. A mature managed cloud.
What SQL teams give up. The Business Source License: source-available, not OSI open source, with each release converting to an open license four years later. Self-managed deployments need a license key even for the free Community edition, which has documented resource caps. Enterprise and Cloud pricing is quoted by sales. Compute is memory driven, so large state can be costly. As of November 2026 the documentation does not describe a vector type or an official MCP server.
Choose Materialize when your application's correctness argument needs strict serializability across views, you are comfortable with the license and pricing model, and you want a PostgreSQL-compatible streaming database built around that guarantee.
ksqlDB
ksqlDB is Confluent's SQL layer on Kafka Streams. It is a reasonable landing spot for a narrow slice of Flink SQL workloads: ones where every input and every output is a Kafka topic and the logic is filters, aggregations and stream-table joins. Documentation is at docs.ksqldb.io and the license is the Confluent Community License, which is not OSI-approved.
What SQL teams gain. No new cluster if you already run Confluent Platform or Confluent Cloud. Push queries for continuous results and pull queries for point lookups against tables.
What SQL teams give up. Any source that is not Kafka: CDC has to arrive through Kafka Connect. A dialect that is not PostgreSQL, so BI tools and dbt do not connect directly. Restricted joins. Results that live in topics or in ksqlDB tables with limited query flexibility, so most analytical use cases still need a downstream store. Confluent's documentation also states that for new workloads Confluent Platform for Apache Flink is the recommended engine, with ksqlDB supported for existing applications.
Choose ksqlDB when you are committed to Confluent, everything is already a topic, the logic is simple, and you have checked Confluent's roadmap and are comfortable with it. Migrating from Flink SQL to ksqlDB to escape Flink is unusual given Confluent's own direction; it mostly makes sense when consolidating onto Confluent tooling you already pay for.
Spark Structured Streaming
Spark Structured Streaming runs streaming logic as micro-batches on the Spark DataFrame API, with Spark SQL available for the transformations. Documentation is at spark.apache.org and the license is Apache 2.0.
What SQL teams gain. If your organisation already runs Spark or Databricks, you reuse the cluster, the skills and the data access patterns. Joining a stream against a large dimension table in object storage is natural. PySpark opens the door to Python-first analysts. Delta Lake and Iceberg integration is mature.
What SQL teams give up. Latency measured in seconds, not milliseconds. No serving layer, so the Flink-plus-sink problem remains. A Flink SQL job becomes a Spark job, so this is a rewrite into a different programming model, not a translation. Event-time semantics are less expressive than Flink's.
Choose Spark Structured Streaming when seconds of latency are acceptable, your pipeline is mostly batch with a streaming edge, and your team already lives in Spark.
Bytewax
Bytewax is a Python stream processor with a dataflow API in the spirit of Flink's DataStream API. It is Apache 2.0 and documented from its GitHub repository.
What teams gain. Python-native stateful stream processing for data science and ML teams, custom enrichment with Python libraries, and streaming inference pipelines without Java.
What teams give up. It is not SQL, so a SQL team gains nothing here directly. There is no serving layer; results go to a sink. The ecosystem and production tooling are smaller than Flink's.
Choose Bytewax when the part of your Flink workload that does not fit SQL is Python logic rather than Java, and you would rather write it in Python than operate the JVM.
Migration example: a Flink SQL job rewritten for RisingWave
Flink SQL jobs are the straightforward case. The concepts map directly and the syntax differs in predictable ways. The example uses Flink's windowing table-valued functions, which Flink recommends over the older GROUP BY TUMBLE(...) form.
A Flink SQL job computing hourly revenue per customer and writing it to a PostgreSQL serving table:
-- Flink SQL
CREATE TABLE kafka_orders (
order_id STRING,
customer_id BIGINT,
amount DECIMAL(10, 2),
order_time TIMESTAMP(3),
WATERMARK FOR order_time AS order_time - INTERVAL '5' SECOND
) WITH (
'connector' = 'kafka',
'topic' = 'orders',
'properties.bootstrap.servers' = 'kafka:9092',
'format' = 'json'
);
CREATE TABLE revenue_sink (
customer_id BIGINT,
window_start TIMESTAMP(3),
window_end TIMESTAMP(3),
total_revenue DECIMAL(10, 2),
PRIMARY KEY (customer_id, window_start) NOT ENFORCED
) WITH (
'connector' = 'jdbc',
'url' = 'jdbc:postgresql://serving-db:5432/analytics',
'table-name' = 'hourly_revenue'
);
INSERT INTO revenue_sink
SELECT
customer_id,
window_start,
window_end,
SUM(amount) AS total_revenue
FROM TABLE(
TUMBLE(TABLE kafka_orders, DESCRIPTOR(order_time), INTERVAL '1' HOUR)
)
GROUP BY customer_id, window_start, window_end;
The equivalent in RisingWave:
-- RisingWave SQL
CREATE SOURCE kafka_orders (
order_id TEXT,
customer_id BIGINT,
amount NUMERIC,
order_time TIMESTAMPTZ,
WATERMARK FOR order_time AS order_time - INTERVAL '5' SECOND
)
WITH (
connector = 'kafka',
topic = 'orders',
properties.bootstrap.server = 'kafka:9092'
)
FORMAT PLAIN ENCODE JSON;
CREATE MATERIALIZED VIEW hourly_revenue AS
SELECT
customer_id,
window_start,
window_end,
SUM(amount) AS total_revenue
FROM TUMBLE(kafka_orders, order_time, INTERVAL '1' HOUR)
GROUP BY customer_id, window_start, window_end
EMIT ON WINDOW CLOSE;
Query it directly:
SELECT customer_id, total_revenue
FROM hourly_revenue
WHERE window_start = date_trunc('hour', now()) - INTERVAL '1' HOUR
ORDER BY total_revenue DESC
LIMIT 10;
The sink table, the JDBC connector and the serving database schema are gone. The view is the serving layer.
Syntax differences worth noting:
- Flink's window TVF is
TUMBLE(TABLE t, DESCRIPTOR(ts), INTERVAL); RisingWave's isTUMBLE(t, ts, INTERVAL). Both exposewindow_startandwindow_end. - RisingWave uses PostgreSQL types:
TEXTforSTRING,NUMERICforDECIMAL,TIMESTAMPTZforTIMESTAMP(3)with time zone handling. - The
WATERMARKclause exists in both. In RisingWave it is optional. Without it, a windowed view keeps updating as late rows arrive. With it andEMIT ON WINDOW CLOSE, the view emits each window once, which is the behaviour the Flink job above has. See the watermarks documentation. - No sink definition is needed to query results. If you also need the results in Kafka or Iceberg, add a
CREATE SINKfrom the view.
The same migration into Materialize keeps the view logic and changes the source DDL and the time-window idiom to date_bin or temporal filters. Into ksqlDB it becomes a CREATE STREAM plus CREATE TABLE AS SELECT ... WINDOW TUMBLING, with the result in a topic.
What does not migrate
Be realistic about these before committing a timeline.
MATCH_RECOGNIZEqueries and CEP jobs. No destination in this article runs them. They stay on Flink or are redesigned.- DataStream API jobs. These are a rewrite, either into SQL (if the logic allows) or into Bytewax for Python logic. Budget for discovery; the hardest part is usually finding out what the operator actually does.
- Flink-specific connectors and hints. Check the connector list of your destination before assuming a source is covered. RisingWave's list is in the ingestion overview.
- Jobs whose output only lands in Iceberg or Kafka with no one querying it. These do not need a serving layer, so a streaming database is not automatically the better home. Weigh it against staying on Flink or using a lighter processor.
A migration plan that works
- Inventory every Flink job. Tag each as Flink SQL, DataStream, or CEP. Note which sinks are queried by people or applications and which are not.
- Pick the Flink SQL jobs with a queried sink. They have the highest payoff because you retire a job and a sink table together.
- Stand up the candidate alongside Flink in staging. Recreate sources, then views, one at a time.
- Compare outputs on the same input for at least one full business cycle. Pay attention to late data and window boundary behaviour; this is where
EMIT ON WINDOW CLOSEversus continuous update matters. - Repoint dashboards and applications to the new system. Both RisingWave and Materialize speak PostgreSQL protocol, so this is usually a connection string change.
- Decommission the Flink job and its sink. Leave CEP and DataStream jobs on Flink unless you have a concrete redesign.
When RisingWave is the wrong choice
- Your Flink estate is mostly DataStream or CEP. Moving the SQL fraction buys little and adds a system.
- Strict serializability across interactive transactions is a hard requirement. Materialize was built around that guarantee; RisingWave does not offer it.
- Nobody queries the results. If the output only needs to land in Iceberg or Kafka, keeping Flink or using a lighter processor may be simpler than introducing a database.
- Your team's pain is not operational. If Flink works and the problem is elsewhere, a migration will not fix it.
- You need ad hoc analytics over years of history. That is a real-time OLAP engine, possibly fed by RisingWave, not RisingWave itself.
What is published on performance
RisingWave Labs publishes a Nexmark benchmark against Flink with the hardware, configuration and queries documented. It is vendor-run; we publish the setup so it can be reproduced and challenged, and Flink was faster on some stateless queries in that run. There is no independent cross-system benchmark as of November 2026. Run your own top queries at your own event rate before deciding.
FAQ
What are the Apache Flink alternatives for a SQL team in 2026?
RisingWave and Materialize are streaming databases that run streaming SQL and serve the results over PostgreSQL protocol. ksqlDB runs SQL over Kafka topics only. Spark Structured Streaming runs Spark SQL in micro-batches for Spark shops. Bytewax is a Python processor for logic that does not fit SQL. Which one fits depends on whether results need to be queried, whether Kafka is already in place, your consistency requirement and your license requirement.
When should I stay on Flink?
Stay when you use MATCH_RECOGNIZE or CEP, when your jobs are DataStream API code with custom operators, when you need hands-on control over very large keyed state, or when Flink already works and its operational cost is acceptable.
Can a Flink SQL job be moved to RisingWave without rewriting it?
Mostly. Sources, windowed aggregations, joins and watermarks have direct equivalents, and the sink table disappears because the materialized view is queryable. Window TVF syntax and type names change. Flink-specific hints, connectors and anything using MATCH_RECOGNIZE do not carry over.
What is the operational difference between Flink and a streaming database?
Flink needs a JobManager, TaskManagers, a state backend, checkpoint storage, savepoint handling for upgrades and a separate serving store. RisingWave runs as a single binary or a Kubernetes deployment with state on object storage and the serving layer built in; Materialize runs as a managed cloud or a self-managed deployment with a license key. In both, you write SQL and the system handles checkpointing and recovery.
Is Materialize or RisingWave the better Flink SQL destination?
It depends on your consistency requirement and your license requirement. Materialize offers strict serializability across views under the Business Source License. RisingWave offers exactly-once processing with snapshot-consistent reads, native CDC for four databases, Iceberg catalog management and vector support under Apache 2.0. Both are PostgreSQL compatible, so the migration shape is the same.
Where to go next
For the same decision approached from architecture (library versus cluster versus database, where state lives, how recovery works), read how to choose a Flink alternative by architecture. For a broader field including Timeplus Proton, Feldera and Arroyo, see the streaming database comparison hub. If you spot an error, open an issue and we will fix it.

