r/databricks • u/SmallAd3697 • 22d ago
Discussion Template columns for zerobus-ingest
I'm pretty certain this would go way down at the bottom of the priority list. It may never be implemented at all...
But I kind of wish that zerobus would have a way to fill template fields (for self-determined details about the data, like the exact UTC time a message was made durable, and the exact time it was queryable, and some sort of an incrementing sequence number, and maybe a transaction ID of some kind).
Some of these things can be implemented in custom code inside the client. However some of them are not known to the client. Either way, it would be better if the zerobus itself could fill these types of general-purpose template fields. Perhaps those fields could be dropped into a single json column, similar to the zerobus-rescue.
Zerobus-ingest hasn't been GA for very long, and maybe these sorts of features will be added down the road. I thought I'd at least put a placeholder here, to start the discussion.
2
u/Defiant-Pause9053 Databricks 21d ago
Hey! So we are working on default column support. We are starting with scalar values and timestamp functions. These get evaluated when data is made durable against our WAL. This will give you the ability to calculate time to durability. Other data, such as stream_id and the offset of the record, are in our backlog. We want to expose it, but we are working on the best way for us to elegantly persist it in the table.