if you done have a schema registry, you need to pr...
# getting-started
n
if you done have a schema registry, you need to provide schema as a config in the stream config @User
p
what does providing table schema do then? i confused myself by thinking of it as the kafka record schema.
n
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
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