blob: 2341133f5626cc26ad7cc8aef9c2c864e8e51730 [file] [log] [blame]
:py:mod:`airflow.providers.mysql.transfers.vertica_to_mysql`
============================================================
.. py:module:: airflow.providers.mysql.transfers.vertica_to_mysql
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.providers.mysql.transfers.vertica_to_mysql.VerticaToMySqlOperator
Attributes
~~~~~~~~~~
.. autoapisummary::
airflow.providers.mysql.transfers.vertica_to_mysql.MYSQL_RENDERER
.. py:data:: MYSQL_RENDERER
.. py:class:: VerticaToMySqlOperator(sql, mysql_table, vertica_conn_id = 'vertica_default', mysql_conn_id = 'mysql_default', mysql_preoperator = None, mysql_postoperator = None, bulk_load = False, *args, **kwargs)
Bases: :py:obj:`airflow.models.BaseOperator`
Moves data from Vertica to MySQL.
:param sql: SQL query to execute against the Vertica database. (templated)
:param vertica_conn_id: source Vertica connection
: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 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)
:param mysql_postoperator: sql statement to run against MySQL after the
import, typically used to move data from staging to production
and issue cleanup commands. (templated)
:param bulk_load: flag to use bulk_load option. This loads MySQL directly
from a tab-delimited text file using the LOAD DATA LOCAL INFILE command.
This option requires an extra connection parameter for the
destination MySQL connection: {'local_infile': true}.
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['sql', 'mysql_table', 'mysql_preoperator', 'mysql_postoperator']
.. 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.