Creating a Kafka sink

You can use the registered Kafka source to create a Kafka Virtual Table Sink. You only need to specify the Kafka topic where the data should be generated when executing your SQL Stream job.

  • Make sure that you have created a Kafka topic.
  • Make sure that you have the right permissions set in Ranger.
  1. Go to your cluster in Cloudera Manager.
  2. Click on SQL Stream Builder from the list of Services.
  3. Click on SQLStreamBuilder Console.
    The Streaming SQL Console opens up in a new window.
  4. Select Console from the main menu.
  5. Select the Virtual Tables tab.
  6. Select the Virtual Table Sink sub-tab.
  7. Select Add Sink > Apache Kafka.
    The Kafka Sink window appears.
  8. Provide a name to the Virtual Table.
  9. Select a Kafka topic from the list.
  10. Click Save Changes.
The Kafka Virtual Table Sink is ready for queries to be run. You can add the created sink on the Compose tab by selecting its name from the list of sinks.