Sending key with the event

2024-01-23 Thread Oscar Perez via user
Hi flink experts! I have a question regarding apache flink. We want to send an event to a certain topic but for some reason we fail to send a proper key with the event. The event is published properly in the topic but the key for this event is null. I only see the method out.collect(event) to pu

Re: Sending key with the event

2024-01-23 Thread Yaroslav Tkachenko
Hi Oscar, The only way you can define the Kafka message key is by providing a custom KafkaRecordSerializationSchema to your FlinkKafkaSink via "setRecordSerializer" method. KafkaRecordSerializationSchema.serialize method return a ProducerRecord, so you can set things like the message key, message

Long execution of SQL query to Kafka + Hive (q77 TPC-DS)

2024-01-23 Thread Вова Фролов
Hello, I am executing a heterogeneous SQL query (part of the data is in Hive and part in Kafka. The query utilizes TPC-DS benchmark 100GB data.) in BatchMode. However, the execution time is excessively long, taking approximately 11 minutes to complete , although the request to Hive only (without