public abstract class DeriveSchema extends Object
| Modifier and Type | Field and Description |
|---|---|
protected HashMap<String,String> |
classToDataType |
protected static com.fasterxml.jackson.databind.ObjectMapper |
mapper |
static String |
PRIMITIVE_SCHEMA_TYPE |
| Constructor and Description |
|---|
DeriveSchema() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkName(String name) |
protected abstract com.fasterxml.jackson.databind.JsonNode |
convertToFormat(com.fasterxml.jackson.databind.JsonNode schema,
String name) |
protected com.fasterxml.jackson.databind.JsonNode |
getNullSchema() |
Optional<com.fasterxml.jackson.databind.JsonNode> |
getPrimitiveSchema(com.fasterxml.jackson.databind.JsonNode field) |
com.fasterxml.jackson.databind.node.ObjectNode |
getSchemaForArray(List<com.fasterxml.jackson.databind.JsonNode> messages,
String name)
Generate schema for array in json format, this schema is used as template by other formats
|
com.fasterxml.jackson.databind.node.ObjectNode |
getSchemaForMultipleMessages(List<com.fasterxml.jackson.databind.JsonNode> messages) |
com.fasterxml.jackson.databind.node.ObjectNode |
getSchemaForRecord(com.fasterxml.jackson.databind.node.ObjectNode message)
Generate schema for record in json format, this schema is used as template by other formats
|
protected List<com.fasterxml.jackson.databind.JsonNode> |
getSchemaOfAllElements(List<com.fasterxml.jackson.databind.JsonNode> messages,
String name) |
protected void |
getSingleDataType(com.fasterxml.jackson.databind.node.ObjectNode mergedArray,
com.fasterxml.jackson.databind.node.ArrayNode items) |
com.fasterxml.jackson.databind.node.ObjectNode |
mergeArrays(List<com.fasterxml.jackson.databind.JsonNode> arrayList,
boolean useItems,
boolean check2dArray)
Merging different field types of array into one type
|
protected abstract 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 abstract 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) |
com.fasterxml.jackson.databind.node.ObjectNode |
mergeRecords(List<com.fasterxml.jackson.databind.JsonNode> recordList)
Merge fields in all the records together into one record
|
protected void |
updateSchemaInformation(com.fasterxml.jackson.databind.JsonNode mergedSchema,
com.fasterxml.jackson.databind.node.ArrayNode messagesMatched,
com.fasterxml.jackson.databind.node.ArrayNode schemaInformationList) |
protected static final com.fasterxml.jackson.databind.ObjectMapper mapper
public static final String PRIMITIVE_SCHEMA_TYPE
protected List<com.fasterxml.jackson.databind.JsonNode> getSchemaOfAllElements(List<com.fasterxml.jackson.databind.JsonNode> messages, String name) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionprotected void checkName(String name)
public Optional<com.fasterxml.jackson.databind.JsonNode> getPrimitiveSchema(com.fasterxml.jackson.databind.JsonNode field)
public com.fasterxml.jackson.databind.node.ObjectNode getSchemaForArray(List<com.fasterxml.jackson.databind.JsonNode> messages, String name) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic com.fasterxml.jackson.databind.node.ObjectNode getSchemaForRecord(com.fasterxml.jackson.databind.node.ObjectNode message)
throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic com.fasterxml.jackson.databind.node.ObjectNode mergeRecords(List<com.fasterxml.jackson.databind.JsonNode> recordList)
public com.fasterxml.jackson.databind.node.ObjectNode mergeArrays(List<com.fasterxml.jackson.databind.JsonNode> arrayList, boolean useItems, boolean check2dArray)
protected com.fasterxml.jackson.databind.JsonNode getNullSchema()
public com.fasterxml.jackson.databind.node.ObjectNode getSchemaForMultipleMessages(List<com.fasterxml.jackson.databind.JsonNode> messages) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionprotected void updateSchemaInformation(com.fasterxml.jackson.databind.JsonNode mergedSchema,
com.fasterxml.jackson.databind.node.ArrayNode messagesMatched,
com.fasterxml.jackson.databind.node.ArrayNode schemaInformationList)
protected void getSingleDataType(com.fasterxml.jackson.databind.node.ObjectNode mergedArray,
com.fasterxml.jackson.databind.node.ArrayNode items)
protected abstract com.fasterxml.jackson.databind.JsonNode convertToFormat(com.fasterxml.jackson.databind.JsonNode schema,
String name)
protected abstract 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)
Copyright © 2026 Confluent, Inc.. All rights reserved.