Slide 12
Slide 12 text
© 2021 Ververica
Temporal Table Joins
• Allows enrichment of data with changing metadata
• Joining a table against a versioned table wrt time
• FLIP-132
How to easily handle time
12
SELECT
order_id,
price * conversion_rate,
order_time,
FROM orders
LEFT JOIN currency_rates FOR SYSTEM_TIME AS OF
orders.order_time
ON orders.currency = currency_rates.currency
Timestamp Currency Conversion
Rate
11:00 ¥ 0,13
12:00 ¥ 0,11
13:00 ¥ 0,15
1, 11:00, 100, ¥
3, 13:00, 50, ¥
2, 12:00, 200, ¥
1, 11:00, 13, €
3, 13:00, 7.5, €
2, 12:00, 22, €