oyarushe commented on a change in pull request #17080:
URL: https://github.com/apache/airflow/pull/17080#discussion_r672177659
##########
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:
I thought about it, but I found in the code that we are using this
approach, for example:
https://github.com/apache/airflow/blob/177dfbd12a42a5c229640c6c830f43f280ea5caa/airflow/providers/amazon/aws/operators/emr_create_job_flow.py#L74-L78
##########
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:
Done
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]