public class PostgresSyncTableAction extends SyncTableActionBase
Action
which synchronize one or multiple PostgreSQL tables into one Paimon table.
You should specify PostgreSQL source table in postgresConfig
. 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 PostgreSQL tables. If the Paimon table already exists, its schema will be compared against the schema of all specified PostgreSQL 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
allowUpperCase, cdcSourceConfig, database, metadataConverters, syncJobHandler, tableConfig, typeMapping
batchTEnv, catalog, catalogName, catalogOptions, env, flinkCatalog
Constructor and Description |
---|
PostgresSyncTableAction(String warehouse,
String database,
String table,
Map<String,String> catalogConfig,
Map<String,String> postgresConfig) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.flink.cdc.connectors.base.source.jdbc.JdbcIncrementalSource<CdcSourceRecord> |
buildSource() |
protected Schema |
retrieveSchema() |
beforeBuildingSourceSink, buildEventParserFactory, buildPaimonSchema, buildSink, fileStoreTable, recordParse, validateCaseSensitivity, withComputedColumnArgs, withPartitionKeys, withPartitionKeys, withPrimaryKeys, withPrimaryKeys
alterTableOptions, build, createCdcTimestampExtractor, run, tableConfig, 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.base.source.jdbc.JdbcIncrementalSource<CdcSourceRecord> buildSource()
buildSource
in class SynchronizationActionBase
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.