简体   繁体   English

Dataproc Spark 运算符如何返回值以及如何捕获和返回值

[英]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.

相关问题 如果我使用 Dataproc,它如何处理从 Apache Hadoop 和 Spark 到 Dataproc 的实时流数据? - If I use Dataproc, how does it process real-time streaming data from Apache Hadoop and Spark to Dataproc? 如何在 google dataproc 上运行 spark 3.2.0? - How to run spark 3.2.0 on google dataproc? 如何使用 dataproc 客户端通过 google dataproc 集群作业为 spark 传递自定义作业 ID - how to pass custom job id via google dataproc cluster job for spark using dataproc client 如何在 addOnCompleteListener Firebase 上返回值? - How to return value on addOnCompleteListener Firebase? 如何从 Spark Dataproc 检查文件是否存在于 Google Storage 中? - How to check if a file exists in Google Storage from Spark Dataproc? 如何从 Spark 作业中检索通过 Dataproc 提交的作业的 jobId - How to retrieve the jobId of job submitted via Dataproc from within the Spark job Dataproc:如何配置 Spark 驱动程序和执行程序 log4j 属性? - Dataproc: how do I configure Spark driver and executor log4j properties? 如何从 Python 中的 BigQuery 返回 boolean 值 - How to return boolean value from BigQuery in Python 如何根据 firestore 值返回 boolean - How to return boolean based on firestore value dataproc 上的组件网关激活不适用于 composer(airflow) 运算符 airflow.providers.google.cloud.operators.dataproc - Component Gateway activation on dataproc does not work with composer(airflow) operator airflow.providers.google.cloud.operators.dataproc
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM