delta-rs icon indicating copy to clipboard operation
delta-rs copied to clipboard

Handle commitInfo action

Open xianwill opened this issue 4 years ago • 5 comments

This is likely a low priority issue, but is mentioned in the TODO list and is an aspect of the delta log protocol that is not yet implemented in delta-rs. As described in the protocol doc, commit provenance information, may be included in delta logs within a commitInfo action so delta-rs should be able to read and write these.

The reference implementation creates this action and prepends it to the others before writing the log entry.

A TODO exists in DeltaTransaction where we should be able to do something similar.

xianwill avatar Mar 18 '21 13:03 xianwill

Closing the dupe I just created in #152

This would be great to expose to the DeltaTransaction writer code such that a caller can supply their own serde_json::Value (map) of JSON that can be addied into the transaction log.

The use-case I have in mind for this is to enable improved auditability of transactions, for example kafka-delta-ingest could add a map such as:

{
  "commitInfo": {
    "kafka-delta-ingest": {
      "version" : "0.2.3",
      "delta-rs-version": "0.1.3",
      "topic": "originating-kafka-topic",
      "partition": 1
    }
  }
}

rtyler avatar Mar 24 '21 17:03 rtyler

Implementing that in #265, @rtyler please link the PR also to this issue.

nfx avatar May 24 '21 16:05 nfx

@rtyler what you're mentioning about kafka ingest is called "userMetadata" and it is a string. We can't get a struct there.

nfx avatar May 24 '21 16:05 nfx

@nfx based on https://github.com/delta-io/delta/blob/master/PROTOCOL.md#commit-provenance-information, commit info action is supposed to be schemaless and can store arbitrary json object right?

houqp avatar May 24 '21 17:05 houqp

@houqp we'd need to check to what extent is it arbitrary, as delta history technically returns commit infos.

nfx avatar May 24 '21 20:05 nfx

We do have the commit info action supported now, clearing this out

rtyler avatar Sep 20 '23 15:09 rtyler