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: Jul. 14, 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

sqlRequiredstrSQL query to execute against Presto. (templated)
mysql_tableRequiredstrtarget MySQL table, use dot notation to target a specific database. (templated)
mysql_conn_idstrsource mysql connection
presto_conn_idstrsource presto connection
mysql_preoperatorstrsql 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?