VerticaToMySqlOperator

MySQL

Moves data from Vertica to MySQL.

View Source

Last Updated: May. 7, 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

sqlstrSQL query to execute against the Vertica database. (templated)
vertica_conn_idstrsource Vertica connection
mysql_tablestrtarget MySQL table, use dot notation to target a specific database. (templated)
mysql_conn_idstrsource mysql 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)
mysql_postoperatorstrsql statement to run against MySQL after the import, typically used to move data from staging to production and issue cleanup commands. (templated)
bulk_loadboolflag 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}.

Documentation

Moves data from Vertica to MySQL.

Example DAGs

Improve this module by creating an example DAG.

View Source
  1. Add an `example_dags` directory to the top-level source of the provider package with an empty `__init__.py` file.
  2. Add your DAG to this directory. Be sure to include a well-written and descriptive docstring
  3. Create a pull request against the source code. Once the package gets released, your DAG will show up on the Registry.

Was this page helpful?