Navid61 commented on issue #47197: URL: https://github.com/apache/airflow/issues/47197#issuecomment-2690045420
Yes, you were right. I found instructions on how to use the SQLExecuteQueryOperator here: https://github.com/apache/airflow/blob/providers-postgres/6.1.0/providers/postgres/tests/system/postgres/example_postgres.py ```python import datetime from airflow import DAG from airflow.providers.common.sql.operators.sql import SQLExecuteQueryOperator DAG_ID='user_processing' with DAG(dag_id=DAG_ID, start_date=datetime.datetime(2024, 2, 28),schedule="@daily",catchup=False) as dag: create_table = SQLExecuteQueryOperator( task_id='create_table', conn_id='postgres', database='postgres', sql=''' CREATE TABLE IF NOT EXISTS users( firstname TEXT NOT NULL, lastname TEXT NOT NULL, country TEXT NOT NULL, username TEXT NOT NULL, password TEXT NOT NULL, email TEXT NOT NULL ); ''' ) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
