Тёмный

ksqlDB HOWTO: Handling Time 

Robin Moffatt
Подписаться 4,2 тыс.
Просмотров 2,4 тыс.
50% 1

When you do processing in ksqlDB that is based on time (such as windowed aggregations, or stream-stream joins) it is important that you define correctly the timestamp by which you want your data to be processed. This could be the timestamp that's part of the Kafka message metadata, or it could be a field in the value of the Kafka message itself.
By default ksqlDB will use the timestamp of the Kafka message. You can change this by specifying WITH TIMESTAMP='…' in your CREATE STREAM statement, and instead identify a value field to use as the timestamp.
Use the ROWTIME system field to view the timestamp of the ksqlDB row.
-----
💾 Run ksqlDB yourself: ksqldb.io?.devx_ch.rmoff_youtube_scpbbl71CD8&
☁️ Use ksqlDB as a managed service: www.confluent.io/confluent-cl...
👾 Demo code: github.com/confluentinc/demo-...
🤔 Questions? Join the Confluent Community at confluent.io/community/ask-th...
📎 Syntax for the TIMESTAMP and TIMESTAMP_FORMAT arguments in the WITH clause: docs.ksqldb.io/en/latest/deve...
-----
⏱ Time codes
00:00:00 Introduction
00:02:52 Examining a timestamp in the message value
00:03:22 Creating a time-based aggregate - without considering timestamps properly :)
00:04:09 ROWTIME in ksqlDB
00:05:01 Event time vs Processing time
00:05:56 How to change the timestamp that ksqlDB uses for ROWTIME
00:06:50 Validating that ROWTIME has been set to the timestamp field in the message value
00:07:35 Aggregating data based on the timestamp in a field in the message value (not the Kafka message timestamp)
00:08:24 Recap

Наука

Опубликовано:

 

3 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 8   
@toenytv7946
@toenytv7946 3 года назад
Very good Robin lots of material to share. You guys are awesome at Confluent. Open and thanks for the explanation. Very advanced I’d like to see more videos like this.
@rmoff
@rmoff 3 года назад
Thank you for your kind words :)
@muttuhosurhosur346
@muttuhosurhosur346 2 года назад
Very useful for my use case...i am handling live ais data, capturing the original timestamp for processing is what i wanted...
@rmoff
@rmoff 2 года назад
Nice - interesting that you are using AIS data. Did you see this talk too? ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-7ZBxgjo52qk.html I'd be interested to hear how you're using Kafka with AIS.
@muttuhosurhosur346
@muttuhosurhosur346 2 года назад
@@rmoff yes, Robin offcourse,,,,, i could implement it.. And able to integrate offline opnstreetmap with kibana and done lot of live dashboards....
@user-zc7vb8mc8s
@user-zc7vb8mc8s 2 месяца назад
Awesome content Robin. Thanks. One question, if possible. In a topic where I can't guarantee the order of the messages, does changing timestamp for TABLE, solves the problem with late messages? The table records should reflect the last event, based not on the topic arrival, but in the event it self ...
@bhomiktakhar8226
@bhomiktakhar8226 3 года назад
Hi Robin, when you run the count(*) aggregation on first "orders" stream , I am seeing multiple count values for same window start? I faced a similar problem ,how to resolve that? EX- for "9 june 2019 , 4 pm" - window start ., mutliple count rows.
@rmoff
@rmoff 3 года назад
A "push query" will emit changes to the aggregate as it changes, and since new data was arriving the aggregate was changing, and thus you see the new state written to the screen.
Далее
ksqlDB HOWTO: Split and Merge Kafka Topics
10:18
Просмотров 3,5 тыс.
ksqlDB HOWTO: Stateful Aggregates
13:56
Просмотров 2,8 тыс.
ЗЕНИТ - РОСТОВ: обзор матча
01:03
Просмотров 137 тыс.
ksqlDB HOWTO: Reserialising data in Apache Kafka
17:42
Просмотров 1,9 тыс.
Processing Streaming Data with KSQL - Tim Berglund
48:59
Why The Windows Phone Failed
24:08
Просмотров 122 тыс.
We Need to Rethink Exercise - The Workout Paradox
12:00
ksqlDB HOWTO: Schema Manipulation
10:56
Просмотров 1,6 тыс.
Samsung laughing on iPhone #techbyakram
0:12
Просмотров 6 млн