PrestoToMySqlOperator

MySQL

Moves data from Presto to MySQL, note that for now the data is loaded into memory before being pushed to MySQL, so this operator should be used for smallish amount of data.

View on GitHub

Last Updated: Oct. 24, 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.

Parameters

sqlRequiredSQL query to execute against Presto. (templated)
mysql_tableRequiredtarget MySQL table, use dot notation to target a specific database. (templated)
mysql_conn_idReference to mysql connection id.
presto_conn_idsource presto connection
mysql_preoperatorsql statement to run against mysql prior to import, typically use to truncate of delete in place of the data coming in, allowing the task to be idempotent (running the task twice won’t double load data). (templated)

Documentation

Moves data from Presto to MySQL, note that for now the data is loaded into memory before being pushed to MySQL, so this operator should be used for smallish amount of data.

Was this page helpful?