public class MySqlSyncTableAction extends SyncTableActionBase
Action
which synchronize one or multiple MySQL tables into one Paimon table.
You should specify MySQL source table in mySqlConfig
. See document
of flink-cdc-connectors for detailed keys and values.
If the specified Paimon table does not exist, this action will automatically create the table. Its schema will be derived from all specified MySQL tables. If the Paimon table already exists, its schema will be compared against the schema of all specified MySQL tables.
This action supports a limited number of schema changes. Currently, the framework can not drop columns, so the behaviors of `DROP` will be ignored, `RENAME` will add a new column. Currently supported schema changes includes:
SyncTableActionBase.SchemaRetrievalException
computedColumnArgs, computedColumns, fileStoreTable, partitionKeys, primaryKeys, table
caseSensitive, cdcSourceConfig, database, metadataConverters, syncJobHandler, tableConfig, typeMapping
batchTEnv, catalog, catalogName, catalogOptions, env, flinkCatalog
Constructor and Description |
---|
MySqlSyncTableAction(String database,
String table,
Map<String,String> catalogConfig,
Map<String,String> mySqlConfig) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.flink.cdc.connectors.mysql.source.MySqlSource<CdcSourceRecord> |
buildSource() |
protected CdcTimestampExtractor |
createCdcTimestampExtractor() |
protected Schema |
retrieveSchema() |
beforeBuildingSourceSink, buildEventParserFactory, buildPaimonSchema, buildSink, fileStoreTable, recordParse, withComputedColumnArgs, withPartitionKeys, withPartitionKeys, withPrimaryKeys, withPrimaryKeys
alterTableOptions, build, run, tableConfig, validateRuntimeExecutionMode, withMetadataColumns, withTableConfig, withTypeMapping
catalogConfig, catalogLoader, compatibleCheck, execute, initFlinkCatalog, initFlinkEnv, initPaimonCatalog, toPaimonTypes, withStreamExecutionEnvironment
protected Schema retrieveSchema() throws Exception
retrieveSchema
in class SyncTableActionBase
Exception
protected org.apache.flink.cdc.connectors.mysql.source.MySqlSource<CdcSourceRecord> buildSource()
buildSource
in class SynchronizationActionBase
protected CdcTimestampExtractor createCdcTimestampExtractor()
createCdcTimestampExtractor
in class SynchronizationActionBase
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.