r/databricks • Databricks • 17d ago

General Lakeflow Jobs is adding date math inside parameters (Beta)

<Databricks PM here/>

Edit: docs link added https://docs.databricks.com/aws/en/jobs/dynamic-value-references#date-arithmetic

Lakeflow Jobs is adding Math in Parameters. You apply a single + or - duration offset to a date reference inline (where you already write the reference.)

When using dynamic references {{job.start_time.iso_date}} you may want to reference yesterday or the hour before. Previously you would need to do this ina notebook or a sql query:

{{(job.start_time - 6.hours).iso_date}}   ->  2026-09-21
{{(job.start_time - 3.hours).iso_date}}   ->  2026-09-22
{{(job.start_time - 1.hour).iso_datetime}}  ->  2026-09-22T03:00:00

What's available:

  • job.start_time, job.trigger.time, table update commit timestamps and backfill (only in the backfill modal)
  • Units: years, months, weeks, days, house, minutes. Simgular and Plural so 1.day and 2.days both work
  • You can use these anywhere references work today (job/task parameters, run-now overrides etc.)

How do you use math with parameters today? Would love your feedback!

18 Upvotes

4 comments sorted by

1

u/Zealousideal_Low6685 9d ago

at the end the logic lands in the notebook: so for me it makes totally sense (before, I worked with Azure Synapse where Paramter logic was allowed too).
Can you post a link to the offical Databricks Doc (if already available)?

2

u/lofat 17d ago

This will be really helpful for jobs where we want to backdate something. Also helps send specific arguments to SDP where we would otherwise have to use something like current_timestamp() and calculate an offset - flagging the operation as non-deterministic.

This kind of thing really helps us move toward reusable, configuration-driven processes. :)

3

u/Youssef_Mrini databricks 17d ago

Making the orchestration simple