public interface MongoVersionStrategy
Modifier and Type | Field and Description |
---|---|
static String |
ID_FIELD |
static String |
OID_FIELD |
Modifier and Type | Method and Description |
---|---|
default List<String> |
extractPrimaryKeys()
Extracts primary keys from the MongoDB record.
|
List<RichCdcMultiplexRecord> |
extractRecords(org.apache.paimon.shade.jackson2.com.fasterxml.jackson.databind.JsonNode root)
Extracts records from the provided JsonNode.
|
default Map<String,String> |
getExtractRow(org.apache.paimon.shade.jackson2.com.fasterxml.jackson.databind.JsonNode jsonNode,
RowType.Builder rowTypeBuilder,
List<ComputedColumn> computedColumns,
org.apache.flink.configuration.Configuration mongodbConfig)
Determines the extraction mode and retrieves the row accordingly.
|
default Map<String,String> |
parseAndTypeJsonRow(String evaluate,
RowType.Builder rowTypeBuilder,
List<ComputedColumn> computedColumns)
Parses and types a JSON row based on the given parameters.
|
static Map<String,String> |
parseFieldsFromJsonRecord(String record,
String fieldPaths,
String fieldNames,
List<ComputedColumn> computedColumns,
RowType.Builder rowTypeBuilder)
Parses fields from a JSON record based on the given parameters.
|
static Map<String,String> |
processParsedData(Map<String,String> parsedRow,
RowType.Builder rowTypeBuilder,
List<ComputedColumn> computedColumns)
Processes the parsed data to generate the result map and update field types.
|
static final String ID_FIELD
static final String OID_FIELD
List<RichCdcMultiplexRecord> extractRecords(org.apache.paimon.shade.jackson2.com.fasterxml.jackson.databind.JsonNode root) throws org.apache.paimon.shade.jackson2.com.fasterxml.jackson.core.JsonProcessingException
root
- The root JsonNode containing the MongoDB record.org.apache.paimon.shade.jackson2.com.fasterxml.jackson.core.JsonProcessingException
- If there's an error during JSON processing.default List<String> extractPrimaryKeys()
default Map<String,String> getExtractRow(org.apache.paimon.shade.jackson2.com.fasterxml.jackson.databind.JsonNode jsonNode, RowType.Builder rowTypeBuilder, List<ComputedColumn> computedColumns, org.apache.flink.configuration.Configuration mongodbConfig) throws org.apache.paimon.shade.jackson2.com.fasterxml.jackson.core.JsonProcessingException
jsonNode
- The JsonNode representing the MongoDB document.rowTypeBuilder
- row type builder.mongodbConfig
- Configuration for the MongoDB connection.org.apache.paimon.shade.jackson2.com.fasterxml.jackson.core.JsonProcessingException
- If there's an error during JSON processing.default Map<String,String> parseAndTypeJsonRow(String evaluate, RowType.Builder rowTypeBuilder, List<ComputedColumn> computedColumns)
static Map<String,String> parseFieldsFromJsonRecord(String record, String fieldPaths, String fieldNames, List<ComputedColumn> computedColumns, RowType.Builder rowTypeBuilder)
static Map<String,String> processParsedData(Map<String,String> parsedRow, RowType.Builder rowTypeBuilder, List<ComputedColumn> computedColumns)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.