

# Template Variables, Filters and Macros
Supported Airflow macros and Jinja paramters

 Amazon MWAA Serverless supports [Jinja templates](https://airflow.apache.org/docs/apache-airflow/stable/templates-ref.html) that come out of the box with Apache Airflow. Please refer below for the supported list of Jinja Variables, and Macros. 

**Topics**
+ [

## Supported Jinja template Variables
](#jinja-variables)
+ [

## Supported Macros
](#jinja-macros)

## Supported Jinja template Variables


 The following table lists the supported Vriabls available for Jinja templating in Amazon MWAA Serverless. 


| Variable | Type | Description | 
| --- | --- | --- | 
| \$1\$1 macros \$1\$1 |  | A reference to the macros package. See Macros below. | 
| \$1\$1 task\$1instance \$1\$1 | TaskInstance | The currently running TaskInstance. | 
| \$1\$1 ti \$1\$1 | TaskInstance | Same as \$1\$1 task\$1instance \$1\$1. | 
| \$1\$1 params \$1\$1 | dict[str, Any] | The user-defined params. This can be overridden by the mapping passed to trigger\$1dag -c if dag\$1run\$1conf\$1overrides\$1params is enabled in airflow.cfg. | 
| \$1\$1 ds \$1\$1 | str | The Dag run's logical date as YYYY-MM-DD. Same as \$1\$1 logical\$1date \$1\$1 ds \$1\$1. | 
| \$1\$1 ds\$1nodash \$1\$1 | str | Same as \$1\$1 logical\$1date \$1\$1 ds\$1nodash \$1\$1. | 
| \$1\$1 ts \$1\$1 | str | Same as \$1\$1 logical\$1date \$1\$1 ts \$1\$1. Example: 2018-01-01T00:00:00\$100:00. | 
| \$1\$1 ts\$1nodash \$1\$1 | str | Same as \$1\$1 logical\$1date \$1\$1 ts\$1nodash \$1\$1. Example: 20180101T000000. | 
| \$1\$1 macros \$1\$1 |  |  | 

## Supported Macros


 The following table lists the supported Macros that are supported in Amazon MWAA Serverless. 


| Macro | Type | 
| --- | --- | 
| macros.datetime | The standard lib's datetime.datetime | 
| macros.timedelta | The standard lib's datetime.timedelta | 
| macros.dateutil | A reference to the dateutil package | 
| macros.time | The standard lib's time | 
| macros.uuid | The standard lib's uuid | 
| macros.random | The standard lib's random.random | 
| datetime\$1diff\$1for\$1humans | datetime\$1diff\$1for\$1humans(dt, since=None): Return a human-readable/approximate difference between datetimes. When only one datetime is provided, the comparison will be based on now. | 
| ds\$1add | ds\$1add(ds, days): Add or subtract days from a YYYY-MM-DD. | 
| ds\$1format | ds\$1format(ds, input\$1format, output\$1format): Output datetime string in a given format. | 
| random | The standard lib's random.random | 