D
- return type for builder pattern@PublicEvolving public abstract class TableDescriptor<D extends TableDescriptor<D>> extends DescriptorBase
Modifier | Constructor and Description |
---|---|
protected |
TableDescriptor(ConnectorDescriptor connectorDescriptor) |
Modifier and Type | Method and Description |
---|---|
protected Map<String,String> |
additionalProperties()
Enables adding more specific properties to
toProperties() . |
D |
inAppendMode()
Declares how to perform the conversion between a dynamic table and an external connector.
|
D |
inRetractMode()
Declares how to perform the conversion between a dynamic table and an external connector.
|
D |
inUpsertMode()
Declares how to perform the conversion between a dynamic table and an external connector.
|
Map<String,String> |
toProperties()
Converts this descriptor into a set of properties.
|
D |
withFormat(FormatDescriptor format)
Specifies the format that defines how to read data from a connector.
|
toString
protected TableDescriptor(ConnectorDescriptor connectorDescriptor)
public D withFormat(FormatDescriptor format)
public D inAppendMode()
In append mode, a dynamic table and an external connector only exchange INSERT messages.
inRetractMode()
,
inUpsertMode()
public D inRetractMode()
In retract mode, a dynamic table and an external connector exchange ADD and RETRACT messages.
An INSERT change is encoded as an ADD message, a DELETE change as a RETRACT message, and an UPDATE change as a RETRACT message for the updated (previous) row and an ADD message for the updating (new) row.
In this mode, a key must not be defined as opposed to upsert mode. However, every update consists of two messages which is less efficient.
inAppendMode()
,
inUpsertMode()
public D inUpsertMode()
In upsert mode, a dynamic table and an external connector exchange UPSERT and DELETE messages.
This mode requires a (possibly composite) unique key by which updates can be propagated. The external connector needs to be aware of the unique key attribute in order to apply messages correctly. INSERT and UPDATE changes are encoded as UPSERT messages. DELETE changes as DELETE messages.
The main difference to a retract stream is that UPDATE changes are encoded with a single message and are therefore more efficient.
inAppendMode()
,
inRetractMode()
public final Map<String,String> toProperties()
protected Map<String,String> additionalProperties()
toProperties()
.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.