airflow.providers.mysql.operators.mysql
¶
Module Contents¶
Classes¶
Executes sql code in a specific MySQL database. |
- class airflow.providers.mysql.operators.mysql.MySqlOperator(*, mysql_conn_id='mysql_default', database=None, **kwargs)[source]¶
Bases:
airflow.providers.common.sql.operators.sql.SQLExecuteQueryOperator
Executes sql code in a specific MySQL database.
This class is deprecated.
Please use
airflow.providers.common.sql.operators.sql.SQLExecuteQueryOperator
.See also
For more information on how to use this operator, take a look at the guide: MySqlOperator
- Parameters
sql – the sql code to be executed. Can receive a str representing a sql statement, a list of str (sql statements), or reference to a template file. Template reference are recognized by str ending in ‘.sql’ (templated)
mysql_conn_id (str) – Reference to mysql connection id.
parameters – (optional) the parameters to render the SQL query with. Template reference are recognized by str ending in ‘.json’ (templated)
autocommit – if True, each command is automatically committed. (default value: False)
database (str | None) – name of database which overwrite defined one in connection