Is it possible to add a column with the ingestion ...
# general
t
Is it possible to add a column with the ingestion time to a supervisor? I’d like to do something like:
"transforms":[ { "type": "expression", "name": "ingestion_time", "expression": *"_timestamp(now())_"* } ]
Unfortunately `timestamp(now())`does not exist 😞
b
Generally, I would recommend using the kafka header timestamp to capture the time the event was inserted into Kafka, rather than Druid. The reason
NOW
isn't supported is because of how Druid guarantees exactly-once delivery of messages. Using the current timestamp in the ingestion would cause it to no longer be idempotent and could cause problems if the ingestion were to fail. https://docs.imply.io/latest/druid/development/extensions-core/kafka-ingestion/#kafka-input-format-supervisor-spec-example
t
Sounds reasonable! I wasn’t aware of the header features. Thanks for pointing that out, this should do the trick! 🙏
🙌 1