obarisk opened a new issue, #62457:
URL: https://github.com/apache/airflow/issues/62457
### Apache Airflow version
3.1.7
### If "Other Airflow 3 version" selected, which one?
_No response_
### What happened?
the template variable `start_date` listed in document doesn't exist
an example dag
```python
@dag
def report_no_start_date():
@task
def print_context(**context):
print(context["start_date"])
@task(templates_exts=[".sql"])
def print_template(sql):
print(sql)
print_context()
print_template("demo.sql")
report_no_start_date()
```
with a template file `demo.sql`
```sql
select '{{ start_date }}';
```
### What you think should happen instead?
at least two options
a. remove `start_date` from the template document.
dag developer could find start_date from `dag_run.start_date` or
`task_instance.start_date` (the type is `datetime.datetime`)
b. add `start_date` (`pendulum.DateTime`) into context
### How to reproduce
use the dag in the description.
### Operating System
debian
### Versions of Apache Airflow Providers
_No response_
### Deployment
Other Docker-based deployment
### Deployment details
_No response_
### Anything else?
_No response_
### Are you willing to submit 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]