luckyQing opened a new issue, #7835:
URL: https://github.com/apache/iceberg/issues/7835
### Apache Iceberg version
1.2.1 (latest release)
### Query engine
None
### Please describe the bug 🐞
Use the TABLE_SCAN_THEN_INCREMENTAL strategy to read the iceberg table data
in real time. When the delete or update sql operation is executed in trino, the
following code will not read the changed data, but can only monitor the data of
the insert sql operation.
`IcebergSource<RowData> icebergSource = IcebergSource.forRowData()
.table(sourceTable)
.tableLoader(sourceTableLoader)
.assignerFactory(new SimpleSplitAssignerFactory())
.streaming(true)
.streamingStartingStrategy(StreamingStartingStrategy.TABLE_SCAN_THEN_INCREMENTAL)
.monitorInterval(Duration.ofSeconds(10))
.build();
StreamExecutionEnvironment env =
StreamExecutionEnvironment.createLocalEnvironmentWithWebUI(buildConfiguration());
DataStream<RowData> stream =
env.fromSource(icebergSource,
WatermarkStrategy.noWatermarks(), "icebergSource",
TypeInformation.of(RowData.class));
try (CloseableIterator<RowData> iterator =
stream.executeAndCollect()) {
while (iterator.hasNext()) {
System.out.println(iterator.next());
}
}`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]