---
source: crates/ruff_linter/src/rules/airflow/mod.rs
---
AIR302_postgres.py:6:1: AIR302 [*] `airflow.hooks.postgres_hook.PostgresHook` is moved into `postgres` provider in Airflow 3.0;
  |
4 | from airflow.operators.postgres_operator import Mapping
5 |
6 | PostgresHook()
  | ^^^^^^^^^^^^ AIR302
7 | Mapping()
  |
  = help: Install `apache-airflow-providers-postgres>=1.0.0` and use `PostgresHook` from `airflow.providers.postgres.hooks.postgres` instead.

ℹ Unsafe fix
1 1 | from __future__ import annotations
2 2 | 
3   |-from airflow.hooks.postgres_hook import PostgresHook
4 3 | from airflow.operators.postgres_operator import Mapping
  4 |+from airflow.providers.postgres.hooks.postgres import PostgresHook
5 5 | 
6 6 | PostgresHook()
7 7 | Mapping()

AIR302_postgres.py:7:1: AIR302 `airflow.operators.postgres_operator.Mapping` is removed in Airflow 3.0
  |
6 | PostgresHook()
7 | Mapping()
  | ^^^^^^^ AIR302
  |
