from airflow.providers.postgres.operators.postgres import PostgresOperator task = PostgresOperator( task_id='test_query', postgres_conn_id='my_postgres', sql='SELECT 1;' )