abhishek jha
abhishek jha

Reputation: 1095

How do I set a custom Job Id for a google dataflow job

I want to have customised Job Name and Job Id for each google dataflow Job I run. I am to create a customised Job name for the job.

But i am unable to set a customised job id.

I found a com.google.cloud.dataflow.sdk.options.DataflowWorkerHarnessOptions interface which has a method setJobId(String value). But I was unable to use that also create a customized job id.

Is there a way to create a customized Job Id?

Upvotes: 3

Views: 2937

Answers (2)

Aditya
Aditya

Reputation: 237

You may like to configure jobName instead. In your program, you can set jobName using options. This also helps in quickly searching related job from the dataflow listing page. In your DataflowPipelineOptions, there is paramerter to set job

Ex - options.setJobName("MyExtractionJob"+ new Date());

Upvotes: 0

danielm
danielm

Reputation: 3010

JobId is the Dataflow service's identifier for the job and must be globally unique, so the service does not allow the user to pick one.

Upvotes: 5

Related Questions