0

ジョブが失敗または終了したときに通知を構成する API があることは知っています。

しかし、たとえば、テーブル内の行数をカウントするハイブ クエリを実行するとどうなるでしょうか。返された結果がゼロの場合、関係者にメールを送信したい。どうやってやるの?

ありがとう。

4

2 に答える 2

1

気流については、Airflow と Qubole のオペレーターを参照してください。エアフローを使用して、Qubole を使用して実行されるすべてのジョブを調整し、場合によっては非 Qubole 環境を調整します。各タスク(Qubole/Non Qubole)の成功/失敗をレポートするDataDog APIです。この場合の DataDog は、Airflow のメール オペレーターに置き換えることができます。Airflow にはチャット オペレーターもいます (Slack など)。

于 2016-06-30T20:14:52.703 に答える
0

There is no direct api for triggering notification based on results of a query. However there is a way to do this using Qubole: -Create a work flow in qubole with following steps: 1. Your query (any query) that writes output to a particular location on s3. 2. A shell script - This script reads result from your s3 and fails the job based on any criteria. For instance in your case, fail the job if result returns 0 rows. -Schedule this work flow using "Scheduler" API to notify on failure.

You can also use "Sendmail" shell command to send mail based on results in step 2 above.

于 2016-02-02T23:40:08.447 に答える