Skip to content

Commit

Permalink
[Improve] Add conditional of start.mode with timestamp in mongo cdc o…
Browse files Browse the repository at this point in the history
…ption rule (#6770)
  • Loading branch information
Hisoka-X committed May 11, 2024
1 parent 5189991 commit 65ae778
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import org.apache.seatunnel.api.table.factory.TableSourceFactoryContext;
import org.apache.seatunnel.api.table.type.SeaTunnelDataType;
import org.apache.seatunnel.api.table.type.SeaTunnelRow;
import org.apache.seatunnel.connectors.cdc.base.option.SourceOptions;
import org.apache.seatunnel.connectors.cdc.base.option.StartupMode;
import org.apache.seatunnel.connectors.seatunnel.cdc.mongodb.config.MongodbSourceOptions;

import com.google.auto.service.AutoService;
Expand Down Expand Up @@ -60,6 +62,10 @@ public OptionRule optionRule() {
MongodbSourceOptions.INCREMENTAL_SNAPSHOT_CHUNK_SIZE_MB,
MongodbSourceOptions.STARTUP_MODE,
MongodbSourceOptions.STOP_MODE)
.conditional(
MongodbSourceOptions.STARTUP_MODE,
StartupMode.TIMESTAMP,
SourceOptions.STARTUP_TIMESTAMP)
.build();
}

Expand Down

0 comments on commit 65ae778

Please sign in to comment.