0

I am trying to trigger a stored procedure in Mysql from Airflow DAG using below code:

run_this_first = airflow.operators.mysql_operator.MySqlOperator(
    task_id= 'sql_task',
    sql= 'call test_procedure()',
    mysql_conn_id= 'my_db',
    database= 'my_db_schema_name',
    dag = dag)

DAG compiles successfully and on starting task from UI, it keeps running and nothing is updated in database. Scheduler is up and running.

What can be wrong ?

Also from post, I am trying to understand difference between hook and operator.

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90
BlueSword
  • 1,290
  • 12
  • 25
  • Resolved as per [post](https://stackoverflow.com/a/49047832/3098658). Missed to "Turn On" from Web UI. – BlueSword Mar 20 '18 at 16:18
  • So were you able to run stored procedures from airflow? I ask because I'm running into a problem where the tasks are being marked as complete in Airflow but I'm not seeing any changes in the DB – DJ319 Oct 01 '18 at 11:52
  • Seen in this other [post](https://stackoverflow.com/questions/55455029/run-stored-procedure-in-airflow) some possible answer. Worth trying. – Wagner Barbosa Aug 14 '19 at 11:23

0 Answers0