public class DeriveAvroSchema extends DeriveSchema
| Modifier and Type | Field and Description |
|---|---|
static String |
BOOLEAN |
static String |
DOUBLE |
static String |
INT |
static String |
LONG |
static String |
NULL |
static String |
STRING |
classToDataType, mapper, PRIMITIVE_SCHEMA_TYPE| Constructor and Description |
|---|
DeriveAvroSchema() |
| Modifier and Type | Method and Description |
|---|---|
protected com.fasterxml.jackson.databind.JsonNode |
convertToFormat(com.fasterxml.jackson.databind.JsonNode schema,
String name)
Convert json schema template to avro format and validate generated schema
|
protected com.fasterxml.jackson.databind.node.ObjectNode |
convertToFormatArray(com.fasterxml.jackson.databind.JsonNode schema,
String name) |
protected com.fasterxml.jackson.databind.node.ObjectNode |
convertToFormatForRecord(com.fasterxml.jackson.databind.JsonNode schema,
String name) |
protected com.fasterxml.jackson.databind.node.ObjectNode |
mergeMultipleDataTypes(com.fasterxml.jackson.databind.node.ObjectNode mergedArray,
List<com.fasterxml.jackson.databind.JsonNode> primitives,
List<com.fasterxml.jackson.databind.JsonNode> records,
List<com.fasterxml.jackson.databind.JsonNode> arrays,
boolean check2dArray) |
protected com.fasterxml.jackson.databind.node.ArrayNode |
mergeMultipleMessages(List<com.fasterxml.jackson.databind.JsonNode> uniqueSchemas,
Map<com.fasterxml.jackson.databind.JsonNode,com.fasterxml.jackson.databind.node.ArrayNode> schemaToIndex)
Using mergeRecords to combine number and union types of fields
|
protected void |
mergeUnions(List<com.fasterxml.jackson.databind.JsonNode> records,
List<com.fasterxml.jackson.databind.JsonNode> primitives)
Check for fields with type union and null value, and if possible merge them
Check recursively for records if there are multiple types
|
checkName, getNullSchema, getPrimitiveSchema, getSchemaForArray, getSchemaForMultipleMessages, getSchemaForRecord, getSchemaOfAllElements, getSingleDataType, mergeArrays, mergeRecords, updateSchemaInformationpublic static final String DOUBLE
public static final String STRING
public static final String BOOLEAN
public static final String INT
public static final String LONG
public static final String NULL
protected com.fasterxml.jackson.databind.node.ArrayNode mergeMultipleMessages(List<com.fasterxml.jackson.databind.JsonNode> uniqueSchemas, Map<com.fasterxml.jackson.databind.JsonNode,com.fasterxml.jackson.databind.node.ArrayNode> schemaToIndex)
mergeMultipleMessages in class DeriveSchemaprotected com.fasterxml.jackson.databind.node.ObjectNode mergeMultipleDataTypes(com.fasterxml.jackson.databind.node.ObjectNode mergedArray,
List<com.fasterxml.jackson.databind.JsonNode> primitives,
List<com.fasterxml.jackson.databind.JsonNode> records,
List<com.fasterxml.jackson.databind.JsonNode> arrays,
boolean check2dArray)
mergeMultipleDataTypes in class DeriveSchemaprotected com.fasterxml.jackson.databind.JsonNode convertToFormat(com.fasterxml.jackson.databind.JsonNode schema,
String name)
convertToFormat in class DeriveSchemaprotected com.fasterxml.jackson.databind.node.ObjectNode convertToFormatForRecord(com.fasterxml.jackson.databind.JsonNode schema,
String name)
protected com.fasterxml.jackson.databind.node.ObjectNode convertToFormatArray(com.fasterxml.jackson.databind.JsonNode schema,
String name)
Copyright © 2026 Confluent, Inc.. All rights reserved.