| :py:mod:`airflow.providers.mysql.transfers.presto_to_mysql` |
| =========================================================== |
| |
| .. py:module:: airflow.providers.mysql.transfers.presto_to_mysql |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.mysql.transfers.presto_to_mysql.PrestoToMySqlOperator |
| |
| |
| |
| |
| .. py:class:: PrestoToMySqlOperator(*, sql, mysql_table, presto_conn_id = 'presto_default', mysql_conn_id = 'mysql_default', mysql_preoperator = None, **kwargs) |
| |
| Bases: :py:obj:`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. |
| |
| :param sql: SQL query to execute against Presto. (templated) |
| :param mysql_table: target MySQL table, use dot notation to target a |
| specific database. (templated) |
| :param mysql_conn_id: Reference to :ref:`mysql connection id <howto/connection:mysql>`. |
| :param presto_conn_id: source presto connection |
| :param mysql_preoperator: 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) |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['sql', 'mysql_table', 'mysql_preoperator'] |
| |
| |
| |
| .. py:attribute:: template_ext |
| :annotation: :Sequence[str] = ['.sql'] |
| |
| |
| |
| .. py:attribute:: template_fields_renderers |
| |
| |
| |
| |
| .. py:attribute:: ui_color |
| :annotation: = #a0e08c |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |