This commit is contained in:
Выдрин Сергей
2025-09-05 02:32:03 +03:00
parent 5665db0236
commit dbd5663bf8
3 changed files with 28 additions and 6 deletions

View File

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

View File

@@ -0,0 +1,11 @@
from airflow import DAG
from airflow.operators.dummy import DummyOperator
from datetime import datetime
with DAG(
dag_id="hello_world",
start_date=datetime(2025, 1, 1),
schedule_interval="@daily",
catchup=False,
) as dag:
task = DummyOperator(task_id="dummy_task")

View File

@@ -1,7 +1,11 @@
from airflow.providers.postgres.operators.postgres import PostgresOperator
from airflow import DAG
from airflow.operators.dummy import DummyOperator
from datetime import datetime
task = PostgresOperator(
task_id='test_query',
postgres_conn_id='my_postgres',
sql='SELECT 1;'
)
with DAG(
dag_id="hello_world",
start_date=datetime(2025, 1, 1),
schedule_interval="@daily",
catchup=False,
) as dag:
task = DummyOperator(task_id="dummy_task")