S3ToMySqlOperator

MySQL

Loads a file from S3 into a MySQL table.

View on GitHub

Last Updated: May. 7, 2021

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

s3_source_keyRequiredstrThe path to the file (S3 key) that will be loaded into MySQL.
mysql_tableRequiredstrThe MySQL table into where the data will be sent.
mysql_duplicate_key_handlingstrSpecify 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_optionsOptional[str]MySQL options to specify exactly how to load the data.
aws_conn_idstrThe S3 connection that contains the credentials to the S3 Bucket.
mysql_conn_idstrThe MySQL connection that contains the credentials to the MySQL data base.

Documentation

Loads a file from S3 into a MySQL table.

Was this page helpful?