How to Connect Grafana to a Streaming Database
RisingWave is a PostgreSQL-compatible streaming database. This tutorial gets you from zero to your first streaming pipeline in 10 minutes.
Quick Start with Docker
docker run -d --name risingwave -p 4566:4566 -p 5691:5691 risingwavelabs/risingwave:latest
Connect:
psql -h localhost -p 4566 -d dev -U root
Your First Pipeline
-- 1. Create a table (simulating a stream for this tutorial)
CREATE TABLE orders (order_id INT, customer VARCHAR, amount DECIMAL, ts TIMESTAMP);
-- 2. Create a materialized view
CREATE MATERIALIZED VIEW revenue_by_customer AS
SELECT customer, SUM(amount) as total, COUNT(*) as orders
FROM orders GROUP BY customer;
-- 3. Insert some data
INSERT INTO orders VALUES (1, 'Alice', 100, NOW());
INSERT INTO orders VALUES (2, 'Bob', 200, NOW());
INSERT INTO orders VALUES (3, 'Alice', 150, NOW());
-- 4. Query the view (instantly updated!)
SELECT * FROM revenue_by_customer;
-- Alice | 250 | 2
-- Bob | 200 | 1
Next Steps
- Connect to Kafka:
CREATE SOURCE ... WITH (connector='kafka', ...) - Set up PostgreSQL CDC:
CREATE SOURCE ... WITH (connector='postgres-cdc', ...) - Sink to Iceberg:
CREATE SINK ... WITH (connector='iceberg', ...)
Frequently Asked Questions
Is RisingWave free?
Yes. RisingWave is open source under Apache 2.0. Self-host for free. A managed cloud service is also available.

