title: Provide BigQuery credentials in Apache-Beam pipeline coded in python
body: <p>I'm trying to read data from bigquery in my beam pipeline using cloud dataflow runner.
  I want to provide a credentials to access the project.</p>
  
  <p>I've seen examples in Java but none in Python. </p>
  
  <p>The only possibility I found is to use the : <a href="https://cloud.google.com/dataflow/docs/concepts/security-and-permissions#python_1" rel="nofollow noreferrer">--service_account_email</a> argument
  But what if I want to give the .json key information in the code itself in all the options like :
  google_cloud_options.service_account = '/path/to/credential.json'</p>
  
  <pre><code>options = PipelineOptions(flags=argv)
  google_cloud_options = options.view_as(GoogleCloudOptions)
  google_cloud_options.project = 'project_name'
  google_cloud_options.job_name = 'job_name'
  google_cloud_options.staging_location = 'gs://bucket'
  google_cloud_options.temp_location = 'gs://bucket'
  options.view_as(StandardOptions).runner = 'DataflowRunner'
  
  with beam.Pipeline(options=options) as pipeline:
      query = open('query.sql', 'r')
      bq_source = beam.io.BigQuerySource(query=query.read(), use_standard_sql=True)
      main_table = \
          pipeline \
          | 'ReadAccountViewAll' &gt;&gt; beam.io.Read(bq_source) \
  </code></pre>
  
  <p>Java has a method <a href="https://beam.apache.org/releases/javadoc/2.0.0/org/apache/beam/sdk/extensions/gcp/options/GcpOptions.html" rel="nofollow noreferrer">getGcpCredential</a> but cant find one in Python...</p>
  
  <p>Any ideas ?</p>