Loads a file from S3 into a MySQL table.

View on GitHub

Last Updated: Oct. 23, 2022

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.


s3_source_keyRequiredThe path to the file (S3 key) that will be loaded into MySQL.
mysql_tableRequiredThe MySQL table into where the data will be sent.
mysql_duplicate_key_handlingSpecify what should happen to duplicate data. You can choose either IGNORE or REPLACE. See also https://dev.mysql.com/doc/refman/8.0/en/load-data.html#load-data-duplicate-key-handling
mysql_extra_optionsMySQL options to specify exactly how to load the data.
aws_conn_idThe S3 connection that contains the credentials to the S3 Bucket.
mysql_conn_idReference to mysql connection id.


Loads a file from S3 into a MySQL table.

Was this page helpful?