Defining the schema of a Kafka table

The schema defines the columns of a Kafka table and the data type of each column. You define it on the Schema Definition tab of the Kafka table editor.

  1. In the Streaming SQL Console, click Projects in the left navigation pane, and click the name of your project.
    The project opens, with the Explorer panel on the left. To open the Streaming SQL Console, see Accessing Cloudera SQL Stream Builder.
  2. In the Explorer, click the Kafka table, or create one with New Kafka Table.
  3. Click the Schema Definition tab.
  4. Enter the schema in the editor, or click Detect Schema for a JSON topic.
    Cloudera SQL Stream Builder (SSB) displays Detecting schema... while it reads messages. When it finishes, it fills in the editor and displays a notification that the schema was imported.
  5. Check the status.
    The tab displays Schema is valid or Schema is invalid. Fix the errors that it reports.
  6. Click Create or Save.