Open ion-elgreco opened 5 months ago
In order for this function to be useful, we first need to implement an updateAll / insertAll functionality. Currently you need to specify all updates and inserts manually.
In the future something like that would be helpfull together with schema evolution:
let (table, metrics) = DeltaOps(table)
.merge(source, "target.id = source.id")
.with_source_alias("source")
.with_target_alias("target")
.when_matched_update(|update| {
update.updateAll()
}).unwrap()
.when_not_matched_insert(|insert| {
insert.insertAll()
}).unwrap()
.await
.unwrap();
@ion-elgreco I think with your recent improvements, we have this now right?
@ion-elgreco I think with your recent improvements, we have this now right?
No not on merge yet, we need to built it differently there since it needs to part of the projection expressions. We can reuse the merge schema functionality though to check whether the source and table schema is different and if they can be merged
Discussed in https://github.com/delta-io/delta-rs/discussions/2281