Integration Architect (Presenter)
This exercise will demonstrate how to split streams in ksqlDB.
Begin by looking at the orders_combined
stream from the module 9 exercise, which has orders from both the US and the UK:
SELECT * FROM orders_combined EMIT CHANGES;
Click Run query and see that the results contain orders from both the US and the UK.
Create a new stream to contain only orders from the US:
CREATE STREAM us_orders AS
SELECT * FROM orders_combined
WHERE source = 'US';
Click Run query.
Create another new stream to contain only orders from the UK:
CREATE STREAM uk_orders AS
SELECT * FROM orders_combined
WHERE source = 'UK';
Click Run query.
US_ORDERS
stream. On the right-hand side, you see that the stream contains only orders from the US. Click on the UK_ORDERS
stream and you see that it likewise contains only orders from the UK.We will only share developer content and updates, including notifications when new content is added. We will never send you sales emails. 🙂 By subscribing, you understand we will process your personal information in accordance with our Privacy Statement.