title: How to set up labels in google dataflow jobs using scio?
body: <p>I want to set up labels for google dataflow jobs for cost allocation purpose. Here is an example of working Java Code:</p>
  
  <pre><code>private DataflowPipelineOptions options = PipelineOptionsFactory.fromArgs(args).as(DataflowPipelineOptionsImpl.class); 
  options.setLabels(ImmutableMap.of("key", "value"));
  </code></pre>
  
  <p>setLabels: <a href="https://cloud.google.com/dataflow/java-sdk/JavaDoc/com/google/cloud/dataflow/sdk/options/DataflowPipelineOptions.html#setLabels-java.util.Map-" rel="nofollow noreferrer">Method Documentation Link</a></p>
  
  <p>Can someone please help with scio / scala example ? I checked few scio + google dataflow examples but I couldn't find anything helpful.</p>
  
  <p>Other option is provide label argument in mvn / gradle command like below: </p>
  
  <blockquote>
  <pre><code>      mvn compile exec:java   
       --Dexec.mainClass=com.example.WordCount   -Dexec.args="--project=test-prod \
       --stagingLocation=gs://test-bucket/staging/ \
       --output=gs://test-bucket/output \
       --runner=TestDataflowPipelineRunner \
       --labels=\"{'a':'b'}\" \
       --jobName=dataflow-intro"
  </code></pre>
  </blockquote>
  
  <p>I am not sure if passing labels={a:b} is the correct syntax. </p>
  
  <p>Any help? thanks</p>