Module Contents

class airflow.contrib.operators.vertica_to_mysql.VerticaToMySqlTransfer(sql, mysql_table, vertica_conn_id='vertica_default', mysql_conn_id='mysql_default', mysql_preoperator=None, mysql_postoperator=None, bulk_load=False, *args, **kwargs)[source]


Moves data from Vertica to MySQL.

  • sql (str) – SQL query to execute against the Vertica database. (templated)

  • vertica_conn_id (str) – source Vertica connection

  • mysql_table (str) – target MySQL table, use dot notation to target a specific database. (templated)

  • mysql_conn_id (str) – source mysql 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)

  • mysql_postoperator (str) – sql statement to run against MySQL after the import, typically used to move data from staging to production and issue cleanup commands. (templated)

  • bulk_load (bool) – 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}.

template_fields = ['sql', 'mysql_table', 'mysql_preoperator', 'mysql_postoperator'][source]
template_ext = ['.sql'][source]
ui_color = #a0e08c[source]
execute(self, context)[source]