airflow
How to get these credentialsConnection to one Airflow deployment's stable REST API: its base URL plus a bearer token, or a username and password (basic auth on Airflow 2, a /auth/token exchange on Airflow 3).
CREATE SECRET airflow (
TYPE airflow,
base_url '<base_url>', -- required
token '<AIRFLOW_TOKEN>', -- secret
username '<username>',
password '<AIRFLOW_PASSWORD>', -- secret
auth '<auth>',
api_version '<api_version>',
platform '<platform>',
page_size '<page_size>',
timeout '<timeout>'
);
| Key | Type | Required | Description |
|---|---|---|---|
| base_url | VARCHAR | Yes | Root URL of the Airflow webserver / API server, without /api/v1 or /api/v2, e.g. 'http://localhost:8080' or an Astronomer deployment URL. |
| token secret | VARCHAR | No | Bearer token: an Airflow 3 JWT, an Astronomer deployment API token, or a Cloud Composer OAuth access token. Takes precedence over username/password. |
| username | VARCHAR | No | Airflow username for basic auth (2.x) or the /auth/token exchange (3.x). |
| password secret | VARCHAR | No | Password for `username`. |
| auth | VARCHAR | No | How to authenticate: 'auto' (default; token if set, else basic on 2.x and /auth/token on 3.x), 'token', 'basic' or 'password' (force the Airflow 3 /auth/token exchange). |
| api_version | VARCHAR | No | 'auto' (default; probe /api/v2/version), 'v1' (Airflow 2.x) or 'v2' (Airflow 3.x). |
| platform | VARCHAR | No | Hosting flavour: 'airflow' (default, self-managed), 'astronomer' or 'composer' (both bearer token). 'mwaa' is reserved and not yet supported. |
| page_size | BIGINT | No | Items requested per API page, 1 to 1000 (default 100). |
| timeout | DOUBLE | No | Per-request timeout in seconds (default 30). |
Needed by task_logsvariable_values