19

The Dataflow jobs are cluttered all over my dashboard, and I'd like to delete the failed jobs from my project. But in the dashboard, I don't see any option to delete the Dataflow job. I'm looking for something like below at least,

$ gcloud beta dataflow jobs delete JOB_ID

To delete all jobs,

$ gcloud beta dataflow jobs delete

Can someone please help me with this?

Vijin Paulraj
  • 4,469
  • 5
  • 39
  • 54

2 Answers2

14

Unfortunately, this is not currently possible. You cannot delete a Dataflow job. This is something that you could request via the public issue tracker (I've wanted it in the past too).

gcloud dataflow jobs --help

COMMANDS

COMMAND is one of the following:

 cancel
    Cancels all jobs that match the command line arguments.

 describe
    Outputs the Job object resulting from the Get API.

 drain
    Drains all jobs that match the command line arguments.

 list
    Lists all jobs in a particular project.

 run
    Runs a job from the specified path.

 show
    Shows a short description of the given job.
Graham Polley
  • 14,393
  • 4
  • 44
  • 80
  • 2
    This functionality can be tracked here https://issuetracker.google.com/110798648 Star the thread (in the left upper side) to get automatic updates on the implementation. – MonicaPC Aug 26 '20 at 20:06
4

As Graham mentions, it is not possible to delete Dataflow jobs. However, note that you can filter the job list to only show the jobs you care about. For example, Status:Running,Succeeded will exclude all failed or cancelled jobs.

Dataflow Job filter

On the commandline, you can use --status=(active|terminated|all):

gcloud beta dataflow jobs list --status=active
Scott Wegner
  • 7,263
  • 2
  • 39
  • 55