Interface SchemaParser<S,​U>


  • public interface SchemaParser<S,​U>
    Author:
    Fabian Martinez
    • Method Detail

      • artifactType

        String artifactType()
      • getSchemaFromData

        ParsedSchema<S> getSchemaFromData​(Record<U> data)
        In some artifact types, such as AVRO, it is possible to extract the schema from the java object. But this can be easily extended to other formats by using a custom Record implementation that adds additional fields that allows to build a ParsedSchema
        Parameters:
        data -
        Returns:
        the ParsedSchema, containing both the raw schema (bytes) and the parsed schema. Can be null.
      • getSchemaFromData

        ParsedSchema<S> getSchemaFromData​(Record<U> data,
                                          boolean dereference)
        In some artifact types, such as AVRO, it is possible to extract the schema from the java object. But this can be easily extended to other formats by using a custom Record implementation that adds additional fields that allows to build a ParsedSchema
        Parameters:
        data -
        dereference - indicate the schema parser whether to try to dereference the record schema.
        Returns:
        the ParsedSchema, containing both the raw schema (bytes) and the parsed schema. Can be null.
      • supportsExtractSchemaFromData

        default boolean supportsExtractSchemaFromData()
        Flag that indicates if getSchemaFromData(Record) is implemented or not.