Skip to content

Commit

Permalink
Extended template_fields_renderers for MySQL provider (#16987)
Browse files Browse the repository at this point in the history
  • Loading branch information
oyarushe committed Jul 14, 2021
1 parent 7529546 commit 6ab00bf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion airflow/providers/mysql/transfers/presto_to_mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__(
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/mysql/transfers/trino_to_mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__(
Expand Down
1 change: 1 addition & 0 deletions airflow/providers/mysql/transfers/vertica_to_mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
Expand Down

0 comments on commit 6ab00bf

Please sign in to comment.