public class ConnectUnion extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
LOGICAL_PARAMETER |
| Constructor and Description |
|---|
ConnectUnion() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.kafka.connect.data.SchemaBuilder |
builder(String annotation)
Returns a SchemaBuilder for a Union.
|
static Object |
fromLogical(org.apache.kafka.connect.data.Schema schema,
org.apache.kafka.connect.data.Struct value)
Convert a value from its logical format (Union) to it's encoded format.
|
static boolean |
isUnion(org.apache.kafka.connect.data.Schema schema)
Returns whether a schema represents a Union.
|
static org.apache.kafka.connect.data.Struct |
toLogical(org.apache.kafka.connect.data.Schema schema,
Object value)
Convert a value from its encoded format to its logical format (Union).
|
static org.apache.kafka.connect.data.Struct |
toLogicalUsingName(org.apache.kafka.connect.data.Schema schema,
String fieldName,
Object value)
Convert a value from its encoded format to its logical format (Union).
|
public static final String LOGICAL_PARAMETER
public static org.apache.kafka.connect.data.SchemaBuilder builder(String annotation)
annotation - an arbitrary annotation to be associated with the unionpublic static boolean isUnion(org.apache.kafka.connect.data.Schema schema)
schema - the schemapublic static Object fromLogical(org.apache.kafka.connect.data.Schema schema, org.apache.kafka.connect.data.Struct value)
schema - the schemavalue - the logical valuepublic static org.apache.kafka.connect.data.Struct toLogical(org.apache.kafka.connect.data.Schema schema,
Object value)
schema - the schemavalue - the encoded valuepublic static org.apache.kafka.connect.data.Struct toLogicalUsingName(org.apache.kafka.connect.data.Schema schema,
String fieldName,
Object value)
schema - the schemafieldName - the field namevalue - the encoded valueCopyright © 2026 Confluent, Inc.. All rights reserved.