Can I have sequence guarantee when replicate with CDF

MikeGo
Valued Contributor

Hi team,

I have a delta table src, and somehow I want to replicate it to another table tgt with CDF, sort of

 

(spark
    .readStream
    .format("delta")
    .option("readChangeFeed", "true")
    .table('src')
    .writeStream
    .format("delta")
    .outputMode("append")
    .option("checkpointLocation", 'xxx')
    .toTable('tgt'))

 

Thanks to CDF, in tgt table I can have _commit_version. Can I have guarantee the _commit_version shows in the right sequence as they are in src table?

Thanks