[英]How does a Dataproc Spark operator return a value and how to capture and return it
How does a Dataproc Spark operator in Airflow return a value and how to capture it. Airflow 中的 Dataproc Spark 运算符如何返回值以及如何捕获它。
I have a downstream job which capture this result and based on returned value, I've to trigger another job by branch operator.我有一个捕获此结果的下游作业,并且根据返回值,我必须由分支操作员触发另一个作业。
Simple answer is you can't.简单的答案是你不能。 Dataproc jobs does not support returning any variable as well as logs back to airflow.
Dataproc 作业不支持返回任何变量以及返回 airflow 的日志。
You can try the one workaround.您可以尝试一种解决方法。
Your dataproc job will write any output in file back to airflow dga bucket so your dag can read that file loaclly ( or you can write file on temp bucket then download the file from there and read ).您的 dataproc 作业会将文件中的任何 output 写回 airflow dga 存储桶,以便您的 dag 可以本地读取该文件(或者您可以在临时存储桶上写入文件,然后从那里下载文件并读取)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.