Перейти к содержимому

🎄Twelve Days of SMT 🎄 - Day 9: Cast

Robin Moffatt

0:00 / 0:00

🎄Twelve Days of SMT 🎄 - Day 9: Cast

977 просмотров · 5 л. назад
Robin Moffatt
4,4 тыс. подписчиков
977 просмотров · 5 л. назад
The Cast Single Message Transform lets you change the data type of fields in a Kafka message, supporting numerics, string, and boolean. Cast takes one argument listing the field(s) that you would like to transform and the target data type. Multiple fields can be specified by separating each specification with a comma. "transforms" : "castTypes", "transforms.castTypes.type" : "org.apache.kafka.connect.transforms.Cast$Value", "transforms.castTypes.spec" : "cost:float32,units:int16" --- ⏱️Time code: 00:00:00 Brief introduction 00:01:26 Inspecting the schema in the Schema Registry 00:02:09 Should you transform in the Source or the Sink? 00:03:18 Cast data types in Kafka Connect source connector 00:04:45 Examining the schema with data types set correctly 00:05:17 Tangent: Kafka Connect connects to lots of different systems :-) 00:06:42 Writing the data with a sink connector 00:07:57 Adding a TimestampConverter transform to the sink connector 00:09:55 Deleting Kafka Connect connectors selectively using peco 00:10:30 Recreating the sink connector with the TimestampConverter transform included 00:12:15 Recap --- 👾 Demo code and details: https://github.com/confluentinc/demo-... 🗒️ SMT reference: https://docs.confluent.io/platform/cu... Learn more about Kafka Connect here: 🏃‍♂️ Quick:    • Kafka Connect in 60 seconds   🚶 More detail: https://rmoff.dev/kafka-connect-zero-... --- ☁️ Confluent Cloud: https://confluent.cloud/signup?utm_so... 💾Download Confluent Platform: https://www.confluent.io/download/?ut... 📺 Kafka Connect connector deep-dives:    • Kafka Connect   ✍️Kafka Connect documentation: https://docs.confluent.io/current/con... 🧩Confluent Hub: https://www.confluent.io/hub/?utm_sou...