Hello , I have a csv file which is as follows: id,first_name,last_name,email,key 1,one,one,email@example.com,one I want to push this data to my kafka topic. I gone through the documentation and found that : This component is an end component. It requires a tJavaRow or tJava component to transform the incoming data into serialized byte arrays.
So I have used tJavaRow and following is my job; tFileInputDelimited --> (Main) --> tJavaRow --> (Main) --> tKafkaOutput. I have written the following code in tJavaRow to make columns seralized byte arrays. output_row.id = input_row.id.toString().getBytes(); output_row.first_name = input_row.first_name.getBytes(); output_row.last_name = input_row.last_name.getBytes(); output_row.email = input_row.email.getBytes(); output_row.key = input_row.key.getBytes();
I have also changed schema in tJavaRow and made each column type to byte I have my job running without any errors but I don't think my tKafkaOutput is working because I am not able to see any messages in my topic.
Hi, Can you get the expected result by using tlogrow instead on console? tFileInputDelimited --> (Main) --> tJavaRow --> (Main) --> tlogrow Could you please post your tKafkaOutput component setting screenshot into forum? Best regards Sabrina
-- Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.