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 2022/05/25 15:19:16 UTC
[GitHub] [airflow] uranusjr commented on a diff in pull request #23915: Add new SQLCheckOperators
uranusjr commented on code in PR #23915:
URL: https://github.com/apache/airflow/pull/23915#discussion_r881787575
##########
airflow/operators/sql.py:
##########
@@ -467,6 +467,218 @@ def push(self, meta_data):
self.log.info("Log from %s:\n%s", self.dag_id, info)
+def _get_failed_tests(checks):
+ failed_tests = []
+ for check, check_values in checks.items():
+ if not check_values["success"]:
+ failed_tests.append(
+ f"\tCheck: {check}, "
+ f"Pass Value: {check_values['pass_value']}, "
+ f"Result: {check_values['result']}\n"
+ )
+ return failed_tests
Review Comment:
```suggestion
def _get_failed_tests(checks):
return [
f"\tCheck: {check}, "
f"Pass Value: {check_values['pass_value']}, "
f"Result: {check_values['result']}\n"
for check, check_values in checks.items()
if not check_values["success"]
]
```
--
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