'Pass dynamic values through GCP cloud scheduler

I need to trigger the Google dataflow jobs with the random/dynamic job_names from the cloud scheduler. I am able to pass the static job name and trigger the Dataflow by passing it in the scheduler body. Is there a way to dynamically set this job name through the scheduler?

If there is a way to set the current_timestamp or some random_numbers that would help.

I am aware that we can trigger the dataflow through the cloud function as well. But trying to avoid the no.of services here.

what I have:

{ "job_name": "test-run-df-job" }

What I need:

{ "job_name": "test-run-df-job" + CURRENT_TIME() }

Thank you for any help.



Solution 1:[1]

You can't add dynamic value in Cloud Scheduler. You can imagine other services, like Cloud Workflows to do that addition without any code to write (like with a Cloud Functions for instance) and then invoke your Dataflow

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 guillaume blaquiere