Declare data processing logic in SQL
RisingWave uses Postgres-compatible SQL as the interface for declaring data processing. We are committed to making it easy to use while being powerful in expression. Easy to use: By aligning with PostgreSQL’s syntax, functions, and data types, RisingWave eases the learning curve and enhances accessibility for users.Even when creating stream tasks, there is no need to know many concepts related to streaming processing. Powerful: RisingWave fully supports and optimizes a variety of SQL features, including advanced features such OVER window and different kinds of JOINs. At the same time, we are also committed to expanding the expressive power of SQL, such as by adding semi-structured data types and corresponding expressions.Ad hoc (on read) vs. Streaming (on write)
There are 2 execution modes in our system serving different analytics purposes. The results of these two modes are the same and the difference lies in the timing of data processing, whether it occurs at the time of data ingestion(on write) or when the query is executed(on read).Understanding execution modes
Streaming: RisingWave allows users to predefine SQL queries with CREATE MATERIALIZED VIEW statement. RisingWave continuously listens changes in upstream tables (in theFROM
clause) and incrementally update the results automatically.
Ad-hoc: Also like traditional databases, RisingWave allows users to send SELECT statement to query the result. At this point, RisingWave reads the data from the current snapshot, processes it, and returns the results.

Examples
Create a table
To illustrate, let’s consider a hypothetical scenario where we have a table calledsales_data
. This table stores information about product IDs (product_id
) and their corresponding sales amounts (sales_amount
).
table of sales_data
Create a materialized view to build continuous streaming pipeline
Based on thesales_data
table, we can create a materialized view called mv_sales_summary
to calculate the total sales amount for each product.
sales_data
table into a materialized view called mv_sales_summary
. This materialized view provides the total sales amount for each product. Utilizing materialized views allows for precomputing and storing aggregated data, which in turn improves query performance and simplifies data analysis tasks.