You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/07/19 10:19:27 UTC
[GitHub] [airflow] uranusjr commented on a change in pull request #17080: Parse JSON template parameters field for MySQL operator
uranusjr commented on a change in pull request #17080:
URL: https://github.com/apache/airflow/pull/17080#discussion_r672173893
##########
File path: airflow/providers/mysql/operators/mysql.py
##########
@@ -67,6 +70,11 @@ def __init__(
self.parameters = parameters
self.database = database
+ def prepare_template(self) -> None:
+ """Parse JSON template file for attribute parameter."""
+ if isinstance(self.parameters, str):
+ self.parameters = ast.literal_eval(self.parameters)
Review comment:
If the content is JSON, shouldn’t this use `json.loads()`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org