Hi, I am trying to add labels to a Dataflow job that I'm creating from a template.
Under the "optional parameters", there's a section called Additional User Labels but I'm not able to find the correct format to add it as shown below. I tried Json notation but I can't resolve that Regex somehow. Do you know how to add single/multiple labels on this field?
Solved! Go to Solution.
Hello,
Can you try setting the following label:
{"environment":"landing"}
In Cloud Dataflow, labels can be added to a job either programmatically or via the command-line when launching a job. Note that GCP has restrictions on the length and characters that can be used in labels.
Can you try creating the job template using gcloud?
Hello,
Can you try setting the following label:
{"environment":"landing"}
I don't see this option to add user labels when setting up a dataflow job using GCP provided templates. was this functionality removed?
Not all templates support the User Labels. Check in the Optional parameters if you find User Labels.
thanks for the reply. why do all templates not support user labels? we need labels for cost
What template do you intend to use?
It has "Additional User Labels" in the Optional Parameters when using the console. Can you check:
Expand the Optional Parameters --> CRTL + F --> Labels
I just checked, there is no field for labels:
would additional experiments accomplish the same?
If the built-in templates don't allow for labels, or the functionality you need, you can always customize them to your liking. Their source code is available on GitHub at the following location: https://github.com/GoogleCloudPlatform/DataflowTemplates