bazaarvoice / jolt

JSON to JSON transformation library written in Java.
Apache License 2.0
1.55k stars 330 forks source link

Support for adding uuid or timestamp in defaultr #1215

Open pradeeppattamatta opened 1 year ago

pradeeppattamatta commented 1 year ago

Hi,

Is there a way to add UUID or timestamp as part of the transformation?

If not, I am thinking that it can be part of the default operation. We can eventually add support to some other such values, by providing standard functions.

Please let me know if there was any prior discussion or direction around providing support for standard functions? I can look into to see I can pick that up and submit a PR.

It can look something like

    "operation": "default",
    "spec": {
      "Range": 5,
      "messageId": uuid(),
      "messagetimestamp": now(<format>)

    }
  }