class_docstr: Help class for bigquery result row to tf example conversion.
class_docstr_tok: ["Help","class","for","bigquery","result","row","to","tf","example","conversion","."]
docstr: Instantiate a _BigQueryConverter object.
  
  Args:
    query: the query statement to get the type information.
    project_id: optional. The GCP project ID to run the query job. Default to
      the GCP project ID set by the gcloud environment on the machine.
docstr_tok: ["Instantiate","a","_BigQueryConverter","object",".","Args",":","query",":","the","query","statement","to","get","the","type","information",".","project_id",":","optional",".","The","GCP","project","ID","to","run","the","query","job",".","Default","to","the","GCP","project","ID","set","by","the","gcloud","environment","on","the","machine","."]
code: def __init__(self, query: str, project_id: Optional[str] = None):
      """Instantiate a _BigQueryConverter object.
  
      Args:
        query: the query statement to get the type information.
        project_id: optional. The GCP project ID to run the query job. Default to
          the GCP project ID set by the gcloud environment on the machine.
      """
      client = bigquery.Client(project=project_id)
      # Dummy query to get the type information for each field.
      query_job = client.query(
          "SELECT * FROM ({}) LIMIT 0".format(query)
      )
      results = query_job.result()
      self._type_map = {}
      for field in results.schema:
          self._type_map[field.name] = field.field_type
  
file_path: tfx/tfx/extensions/google_cloud_big_query/example_gen/executor.py
imports: import json
  from typing import Any, Dict, Optional
  import apache_beam
  from google.cloud import bigquery
  import tensorflow
  from tfx.components.example_gen import base_example_gen_executor
  from tfx.extensions.google_cloud_big_query import utils
label_desc: Use image node_id 1 to create a new _BigQueryConverter object  with example: obj = _BigQueryConverter(query, project_id)