Integration Architect (Presenter)
Continuing with the orders
stream from previous exercises, this exercise teaches you how to transform data in ksqlDB.
Begin by selecting everything from the orders
stream:
SELECT * FROM orders EMIT CHANGES;
Click Run query.
Scroll down to see the returned records. View the structure of one of the records by clicking on the caret in its upper left-hand corner.
Now Stop your orders query.
Create a persistent transformation with no address data:
CREATE STREAM orders_no_address_data AS
SELECT TIMESTAMPTOSTRING(ordertime, 'yyyy-MM-dd HH:mm:ss') AS order_timestamp, orderid, itemid, orderunits
FROM orders EMIT CHANGES;
Now select from the transformed stream:
SELECT * FROM orders_no_address_data EMIT CHANGES;
Click Run query.
Expand the record to see the transformed data.
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.