From 6ab00bfcfdfe1213928281527f32ca31b77cce1b Mon Sep 17 00:00:00 2001 From: Oleksandr Yarushevskyi <33004847+oyarushe@users.noreply.github.com> Date: Wed, 14 Jul 2021 11:43:55 +0300 Subject: [PATCH] Extended template_fields_renderers for MySQL provider (#16987) --- airflow/providers/mysql/transfers/presto_to_mysql.py | 2 +- airflow/providers/mysql/transfers/trino_to_mysql.py | 2 +- airflow/providers/mysql/transfers/vertica_to_mysql.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/airflow/providers/mysql/transfers/presto_to_mysql.py b/airflow/providers/mysql/transfers/presto_to_mysql.py index 7d776507167f..f558a49a45d1 100644 --- a/airflow/providers/mysql/transfers/presto_to_mysql.py +++ b/airflow/providers/mysql/transfers/presto_to_mysql.py @@ -46,7 +46,7 @@ class PrestoToMySqlOperator(BaseOperator): template_fields = ('sql', 'mysql_table', 'mysql_preoperator') template_ext = ('.sql',) - template_fields_renderers = {"mysql_preoperator": "sql"} + template_fields_renderers = {"sql": "sql", "mysql_preoperator": "sql"} ui_color = '#a0e08c' def __init__( diff --git a/airflow/providers/mysql/transfers/trino_to_mysql.py b/airflow/providers/mysql/transfers/trino_to_mysql.py index ba10b1f5542a..6a6c20df2662 100644 --- a/airflow/providers/mysql/transfers/trino_to_mysql.py +++ b/airflow/providers/mysql/transfers/trino_to_mysql.py @@ -46,7 +46,7 @@ class TrinoToMySqlOperator(BaseOperator): template_fields = ('sql', 'mysql_table', 'mysql_preoperator') template_ext = ('.sql',) - template_fields_renderers = {"mysql_preoperator": "sql"} + template_fields_renderers = {"sql": "sql", "mysql_preoperator": "sql"} ui_color = '#a0e08c' def __init__( diff --git a/airflow/providers/mysql/transfers/vertica_to_mysql.py b/airflow/providers/mysql/transfers/vertica_to_mysql.py index b67eeffa3b9b..c1eecab24b75 100644 --- a/airflow/providers/mysql/transfers/vertica_to_mysql.py +++ b/airflow/providers/mysql/transfers/vertica_to_mysql.py @@ -60,6 +60,7 @@ class VerticaToMySqlOperator(BaseOperator): template_fields = ('sql', 'mysql_table', 'mysql_preoperator', 'mysql_postoperator') template_ext = ('.sql',) template_fields_renderers = { + "sql": "sql", "mysql_preoperator": "sql", "mysql_postoperator": "sql", }