https://pinot.apache.org/ logo
#getting-started
Title
# getting-started
n

Neha Pawar

11/02/2021, 6:22 PM
if you done have a schema registry, you need to provide schema as a config in the stream config @User
p

Priyank Bagrecha

11/02/2021, 6:26 PM
what does providing table schema do then? i confused myself by thinking of it as the kafka record schema.
n

Neha Pawar

11/02/2021, 6:27 PM
table schema is for Pinot. The avroSchema.toString() value that you would set i the streamConfig, will be used by the SImpleAvroMessageDecoder to decode the payload from kafka
you can read
SimpleAvroMessageDecoder
code if you’re interested in seeing exactly where this is happening
Copy code
@Override
  public void init(Map<String, String> props, Set<String> fieldsToRead, String topicName)
      throws Exception {
    Preconditions.checkState(props.containsKey(SCHEMA), "Avro schema must be provided");
    _avroSchema = new org.apache.avro.Schema.Parser().parse(props.get(SCHEMA));
we literally read the property and parse it to acro schema and then use it in decoding
p

Priyank Bagrecha

11/02/2021, 6:29 PM
Yeah I saw that yesterday. For some reason I believed that somehow table schema was providing that schema and I just needed to figure out how to configure it 😂
🙂 1