aeroyorch opened a new issue, #65080:
URL: https://github.com/apache/airflow/issues/65080

   ### Description
   
   Airflow Params are based on JSON Schema, but there is no clear support for 
duration values. Since JSON Schema already [defines a `duration` 
format](https://json-schema.org/understanding-json-schema/reference/type#dates-and-times),
 it could be useful to support something like `Param("PT15M", type="string", 
format="duration")`.
   
   Pendulum also seems to support parsing ISO 8601 durations, although that 
support is not properly documented yet. I just opened a related issue about 
that: python-pendulum/pendulum#961.
   
   Open points:
   - How this should be rendered in the Trigger DAG form.
   - I would assume full ISO 8601 durations are supported.
   - Whether Airflow should also support a fixed-duration subset, meaning 
durations limited to non-calendar units such as days, hours, minutes, and 
seconds, excluding months or years.
   
   ### Use case/motivation
   
   This could be useful for data pipelines that need to configure time windows, 
offsets, or latency thresholds through Params, for example to consume data for 
the last X hours, apply a 1 hour offset, etc.
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to