Java Code Examples for io.debezium.relational.history.DatabaseHistory

Following code examples demonstrate how to use io.debezium.relational.history.DatabaseHistoryfrom debezium. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use io.debezium.relational.history.DatabaseHistoryand various code implementation of this class.

    public DatabaseHistory getDatabaseHistory() {
        Configuration config = getConfig();

        DatabaseHistory databaseHistory = config.getInstance(HistorizedRelationalDatabaseConnectorConfig.DATABASE_HISTORY, DatabaseHistory.class);
        if (databaseHistory == null) {
            throw new ConnectException("Unable to instantiate the database history class " +
                    config.getString(HistorizedRelationalDatabaseConnectorConfig.DATABASE_HISTORY));
        }

        Configuration dbHistoryConfig = config.subset(DatabaseHistory.CONFIGURATION_FIELD_PREFIX_STRING, false)
                                              .edit()
                                              .withDefault(DatabaseHistory.NAME, getLogicalName() + "-dbhistory")
                                              .build();

        HistoryRecordComparator historyComparator = getHistoryRecordComparator();

        return databaseHistory;
    } 


Advertisement
Javadoc
A history of the database schema described by a Tables. Changes to the database schema can be #recor

d(Map, Map, String, Tables, String) recorded, and a Tables database schema can be #record(Map, Map, String, Tables, String) recovered to various points in that history. @author Randall Hauch

Read More
Advertisement