public class DMSRecordParser extends AbstractJsonRecordParser
DMSRecordParser
class extends the abstract AbstractJsonRecordParser
and is
designed to parse records from AWS DMS's JSON change data capture (CDC) format. AWS DMS is a CDC
solution for RDMS that captures row-level changes to database tables and outputs them in JSON
format. This parser extracts relevant information from the DMS-JSON format and converts it into a
list of RichCdcMultiplexRecord
objects.
The class supports various database operations such as INSERT, UPDATE, and DELETE, and creates
corresponding RichCdcMultiplexRecord
objects to represent these changes.
Validation is performed to ensure that the JSON records contain all necessary fields, and the class also supports schema extraction for the Kafka topic.
root
computedColumns, typeMapping
Constructor and Description |
---|
DMSRecordParser(TypeMapping typeMapping,
List<ComputedColumn> computedColumns) |
Modifier and Type | Method and Description |
---|---|
protected String |
dataField() |
protected List<RichCdcMultiplexRecord> |
extractRecords() |
protected String |
format() |
protected String |
getDatabaseName() |
protected String |
getTableName() |
protected boolean |
isDDL() |
protected String |
primaryField() |
checkNotNull, checkNotNull, extractPrimaryKeys, extractRowData, fillDefaultTypes, getAndCheck, getAndCheck, mergeOldRecord, processRecord, setRoot
buildSchema, createRecord, evalComputedColumns, flatMap
public DMSRecordParser(TypeMapping typeMapping, List<ComputedColumn> computedColumns)
@Nullable protected String getTableName()
getTableName
in class AbstractJsonRecordParser
protected List<RichCdcMultiplexRecord> extractRecords()
extractRecords
in class AbstractRecordParser
@Nullable protected String getDatabaseName()
getDatabaseName
in class AbstractJsonRecordParser
protected String primaryField()
primaryField
in class AbstractJsonRecordParser
protected String dataField()
dataField
in class AbstractJsonRecordParser
protected String format()
format
in class AbstractRecordParser
protected boolean isDDL()
isDDL
in class AbstractRecordParser
Copyright © 2023–2025 The Apache Software Foundation. All rights reserved.