Class RelationalDatabaseConnectorConfig

java.lang.Object
io.debezium.config.CommonConnectorConfig
io.debezium.relational.RelationalDatabaseConnectorConfig
Direct Known Subclasses:
HistorizedRelationalDatabaseConnectorConfig

public abstract class RelationalDatabaseConnectorConfig extends CommonConnectorConfig
Configuration options shared across the relational CDC connectors.
Author:
Gunnar Morling
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • SCHEMA_INCLUDE_LIST_NAME

      protected static final String SCHEMA_INCLUDE_LIST_NAME
      See Also:
    • SCHEMA_EXCLUDE_LIST_NAME

      protected static final String SCHEMA_EXCLUDE_LIST_NAME
      See Also:
    • DATABASE_INCLUDE_LIST_NAME

      protected static final String DATABASE_INCLUDE_LIST_NAME
      See Also:
    • DATABASE_EXCLUDE_LIST_NAME

      protected static final String DATABASE_EXCLUDE_LIST_NAME
      See Also:
    • TABLE_EXCLUDE_LIST_NAME

      protected static final String TABLE_EXCLUDE_LIST_NAME
      See Also:
    • TABLE_INCLUDE_LIST_NAME

      protected static final String TABLE_INCLUDE_LIST_NAME
      See Also:
    • COLUMN_INCLUDE_LIST_ALREADY_SPECIFIED_ERROR_MSG

      public static final String COLUMN_INCLUDE_LIST_ALREADY_SPECIFIED_ERROR_MSG
      See Also:
    • DEFAULT_SNAPSHOT_LOCK_TIMEOUT_MILLIS

      public static final long DEFAULT_SNAPSHOT_LOCK_TIMEOUT_MILLIS
    • DEFAULT_UNAVAILABLE_VALUE_PLACEHOLDER

      public static final String DEFAULT_UNAVAILABLE_VALUE_PLACEHOLDER
      See Also:
    • HOSTNAME_PATTERN

      public static final Pattern HOSTNAME_PATTERN
    • HOSTNAME

      public static final io.debezium.config.Field HOSTNAME
    • PORT

      public static final io.debezium.config.Field PORT
    • USER

      public static final io.debezium.config.Field USER
    • PASSWORD

      public static final io.debezium.config.Field PASSWORD
    • DATABASE_NAME

      public static final io.debezium.config.Field DATABASE_NAME
    • QUERY_TIMEOUT_MS

      public static final io.debezium.config.Field QUERY_TIMEOUT_MS
    • TABLE_INCLUDE_LIST

      public static final io.debezium.config.Field TABLE_INCLUDE_LIST
      A comma-separated list of regular expressions that match the fully-qualified names of tables to be monitored. Fully-qualified names for tables are of the form <databaseName>.<tableName> or <databaseName>.<schemaName>.<tableName>. Must not be used with TABLE_EXCLUDE_LIST, and superseded by database inclusions/exclusions.
    • TABLE_EXCLUDE_LIST

      public static final io.debezium.config.Field TABLE_EXCLUDE_LIST
      A comma-separated list of regular expressions that match the fully-qualified names of tables to be excluded from monitoring. Fully-qualified names for tables are of the form <databaseName>.<tableName> or <databaseName>.<schemaName>.<tableName>. Must not be used with TABLE_INCLUDE_LIST.
    • TABLE_IGNORE_BUILTIN

      public static final io.debezium.config.Field TABLE_IGNORE_BUILTIN
    • COLUMN_EXCLUDE_LIST

      public static final io.debezium.config.Field COLUMN_EXCLUDE_LIST
      A comma-separated list of regular expressions that match fully-qualified names of columns to be excluded from monitoring and change messages. The exact form of fully qualified names for columns might vary between connector types. For instance, they could be of the form <databaseName>.<tableName>.<columnName> or <schemaName>.<tableName>.<columnName> or <databaseName>.<schemaName>.<tableName>.<columnName>.
    • COLUMN_INCLUDE_LIST

      public static final io.debezium.config.Field COLUMN_INCLUDE_LIST
      A comma-separated list of regular expressions that match fully-qualified names of columns to be excluded from monitoring and change messages. The exact form of fully qualified names for columns might vary between connector types. For instance, they could be of the form <databaseName>.<tableName>.<columnName> or <schemaName>.<tableName>.<columnName> or <databaseName>.<schemaName>.<tableName>.<columnName>.
    • MSG_KEY_COLUMNS

      public static final io.debezium.config.Field MSG_KEY_COLUMNS
    • DECIMAL_HANDLING_MODE

      public static final io.debezium.config.Field DECIMAL_HANDLING_MODE
    • SNAPSHOT_SELECT_STATEMENT_OVERRIDES_BY_TABLE

      public static final io.debezium.config.Field SNAPSHOT_SELECT_STATEMENT_OVERRIDES_BY_TABLE
    • SCHEMA_INCLUDE_LIST

      public static final io.debezium.config.Field SCHEMA_INCLUDE_LIST
      A comma-separated list of regular expressions that match schema names to be monitored. Must not be used with SCHEMA_EXCLUDE_LIST.
    • SCHEMA_EXCLUDE_LIST

      public static final io.debezium.config.Field SCHEMA_EXCLUDE_LIST
      A comma-separated list of regular expressions that match schema names to be excluded from monitoring. Must not be used with SCHEMA_INCLUDE_LIST.
    • DATABASE_INCLUDE_LIST

      public static final io.debezium.config.Field DATABASE_INCLUDE_LIST
      A comma-separated list of regular expressions that match database names to be monitored. Must not be used with DATABASE_EXCLUDE_LIST.
    • DATABASE_EXCLUDE_LIST

      public static final io.debezium.config.Field DATABASE_EXCLUDE_LIST
      A comma-separated list of regular expressions that match database names to be excluded from monitoring. Must not be used with DATABASE_INCLUDE_LIST.
    • TIME_PRECISION_MODE

      public static final io.debezium.config.Field TIME_PRECISION_MODE
    • SNAPSHOT_LOCK_TIMEOUT_MS

      public static final io.debezium.config.Field SNAPSHOT_LOCK_TIMEOUT_MS
    • INCLUDE_SCHEMA_CHANGES

      public static final io.debezium.config.Field INCLUDE_SCHEMA_CHANGES
    • INCLUDE_SCHEMA_COMMENTS

      public static final io.debezium.config.Field INCLUDE_SCHEMA_COMMENTS
    • MASK_COLUMN_WITH_HASH

      public static final io.debezium.config.Field MASK_COLUMN_WITH_HASH
    • MASK_COLUMN

      public static final io.debezium.config.Field MASK_COLUMN
    • TRUNCATE_COLUMN

      public static final io.debezium.config.Field TRUNCATE_COLUMN
    • PROPAGATE_COLUMN_SOURCE_TYPE

      public static final io.debezium.config.Field PROPAGATE_COLUMN_SOURCE_TYPE
    • PROPAGATE_DATATYPE_SOURCE_TYPE

      public static final io.debezium.config.Field PROPAGATE_DATATYPE_SOURCE_TYPE
    • SNAPSHOT_FULL_COLUMN_SCAN_FORCE

      public static final io.debezium.config.Field SNAPSHOT_FULL_COLUMN_SCAN_FORCE
    • UNAVAILABLE_VALUE_PLACEHOLDER

      public static final io.debezium.config.Field UNAVAILABLE_VALUE_PLACEHOLDER
    • SNAPSHOT_TABLES_ORDER_BY_ROW_COUNT

      public static final io.debezium.config.Field SNAPSHOT_TABLES_ORDER_BY_ROW_COUNT
    • SCHEMA_STORAGE_CLASS

      public static final io.debezium.config.Field SCHEMA_STORAGE_CLASS
      The fully-qualified class name of the storage implementation for schema metadata. Due to the serialization currently only in-memory storage implementations are supported, and the default is ConcurrentMapTableMappingStorage.
    • TABLE_STORAGE_CLASS

      public static final io.debezium.config.Field TABLE_STORAGE_CLASS
    • CONFIG_DEFINITION

      protected static final io.debezium.config.ConfigDefinition CONFIG_DEFINITION
    • tableFilters

      private final RelationalTableFilters tableFilters
    • columnFilter

      private final Tables.ColumnNameFilter columnFilter
    • columnsFiltered

      private final boolean columnsFiltered
    • temporalPrecisionMode

      private final TemporalPrecisionMode temporalPrecisionMode
    • keyMapper

      private final Key.KeyMapper keyMapper
    • tableIdMapper

      private final Selectors.TableIdToStringMapper tableIdMapper
    • jdbcConfig

      private final JdbcConfiguration jdbcConfig
    • heartbeatActionQuery

      private final String heartbeatActionQuery
    • fieldNamer

      private final FieldNameSelector.FieldNamer<Column> fieldNamer
    • snapshotOrderByRowCount

  • Constructor Details

  • Method Details

    • getTableFilters

      public RelationalTableFilters getTableFilters()
    • getDecimalMode

      public JdbcValueConverters.DecimalMode getDecimalMode()
      Returns the Decimal mode Enum for decimal.handling.mode configuration. This defaults to precise if nothing is provided.
    • getTemporalPrecisionMode

      public TemporalPrecisionMode getTemporalPrecisionMode()
      Returns the temporal precision mode Enum for time.precision.mode configuration. This defaults to adaptive if nothing is provided.
    • getKeyMapper

      public Key.KeyMapper getKeyMapper()
    • getJdbcConfig

      public JdbcConfiguration getJdbcConfig()
      Returns a "raw" configuration object exposing all the database driver related settings, without the "database." prefix. Typically used for passing through driver settings.
    • getHeartbeatActionQuery

      public String getHeartbeatActionQuery()
    • getUnavailableValuePlaceholder

      public byte[] getUnavailableValuePlaceholder()
    • snapshotLockTimeout

      public Duration snapshotLockTimeout()
    • schemaExcludeList

      public String schemaExcludeList()
    • schemaIncludeList

      public String schemaIncludeList()
    • tableExcludeList

      public String tableExcludeList()
    • tableIncludeList

      public String tableIncludeList()
    • getColumnFilter

      public Tables.ColumnNameFilter getColumnFilter()
    • isColumnsFiltered

      public boolean isColumnsFiltered()
    • isFullColumnScanRequired

      public Boolean isFullColumnScanRequired()
    • snapshotOrderByRowCount

    • validateExcludeList

      private static int validateExcludeList(io.debezium.config.Configuration config, io.debezium.config.Field includeField, io.debezium.config.Field excludeField, io.debezium.config.Field.ValidationOutput problems)
      Validates that include and exclude lists are not both specified for the same filter type.
      Parameters:
      config - the configuration
      includeField - the include list field
      excludeField - the exclude list field
      problems - the validation output
      Returns:
      1 if both lists are specified, 0 otherwise
    • validateColumnExcludeList

      private static int validateColumnExcludeList(io.debezium.config.Configuration config, io.debezium.config.Field field, io.debezium.config.Field.ValidationOutput problems)
    • isSchemaChangesHistoryEnabled

      public boolean isSchemaChangesHistoryEnabled()
      Overrides:
      isSchemaChangesHistoryEnabled in class CommonConnectorConfig
      Returns:
      true if the connector should emit messages about schema changes into a public facing topic.
    • isSchemaCommentsHistoryEnabled

      public boolean isSchemaCommentsHistoryEnabled()
      Overrides:
      isSchemaCommentsHistoryEnabled in class CommonConnectorConfig
      Returns:
      true if the connector should emit messages which include table and column comments.
    • getTableIdMapper

      public Selectors.TableIdToStringMapper getTableIdMapper()
    • validateTableExcludeList

      private static int validateTableExcludeList(io.debezium.config.Configuration config, io.debezium.config.Field field, io.debezium.config.Field.ValidationOutput problems)
    • getSnapshotSelectOverridesByTable

      public Map<io.debezium.spi.schema.DataCollectionId,String> getSnapshotSelectOverridesByTable()
      Returns any SELECT overrides, if present.
    • validateSchemaExcludeList

      private static int validateSchemaExcludeList(io.debezium.config.Configuration config, io.debezium.config.Field field, io.debezium.config.Field.ValidationOutput problems)
    • validateDatabaseExcludeList

      private static int validateDatabaseExcludeList(io.debezium.config.Configuration config, io.debezium.config.Field field, io.debezium.config.Field.ValidationOutput problems)
    • validateMessageKeyColumnsField

      private static int validateMessageKeyColumnsField(io.debezium.config.Configuration config, io.debezium.config.Field field, io.debezium.config.Field.ValidationOutput problems)
    • validateHostname

      private static int validateHostname(io.debezium.config.Configuration config, io.debezium.config.Field field, io.debezium.config.Field.ValidationOutput problems)
    • getFieldNamer

      public FieldNameSelector.FieldNamer<Column> getFieldNamer()
    • createSchemaStorage

      public TableMappingStorage<TableSchema> createSchemaStorage(boolean tableIdCaseInsensitive)
      Creates and configures a schema storage instance.
      Parameters:
      tableIdCaseInsensitive - whether table identifiers should be treated case-insensitively
      Returns:
      the configured schema storage instance
    • createTableStorage

      public TableMappingStorage<Table> createTableStorage(boolean tableIdCaseInsensitive)
      Creates and configures a table storage instance.
      Parameters:
      tableIdCaseInsensitive - whether table identifiers should be treated case-insensitively
      Returns:
      the configured table storage instance