airflow.providers.mysql.transfers.presto_to_mysql
¶
Module Contents¶
-
class
airflow.providers.mysql.transfers.presto_to_mysql.
PrestoToMySqlOperator
(*, sql: str, mysql_table: str, presto_conn_id: str = 'presto_default', mysql_conn_id: str = 'mysql_default', mysql_preoperator: Optional[str] = None, **kwargs)[source]¶ Bases:
airflow.models.BaseOperator
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.
- Parameters
sql (str) -- SQL query to execute against Presto. (templated)
mysql_table (str) -- target MySQL table, use dot notation to target a specific database. (templated)
mysql_conn_id (str) -- source mysql connection
presto_conn_id (str) -- source presto connection
mysql_preoperator (str) -- sql 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)