MySqlHook
MySQLInteract with MySQL.
Access Instructions
Install the MySQL provider package into your Airflow environment.
Import the module into your DAG file and instantiate it with your desired params.
Parameters
Documentation
Interact with MySQL.
You can specify charset in the extra field of your connection as {"charset": "utf8"}
. Also you can choose cursor as {"cursor": "SSCursor"}
. Refer to the MySQLdb.cursors for more details.
Note: For AWS IAM authentication, use iam in the extra connection parameters and set it to true. Leave the password field empty. This will use the “aws_default” connection to get the temporary token unless you override in extras. extras example: {"iam":true, "aws_conn_id":"my_aws_conn"}
You can also add “local_infile” parameter to determine whether local_infile feature of MySQL client is going to be enabled (it is disabled by default).