class_docstr: Entry point for reading data from Cloud BigQuery.
docstr: Retrieves rows from the BigQuery service in parallel streams.
  
  ```
  bq_client = BigQueryClient()
  bq_read_session = bq_client.read_session(...)
  ds1 = bq_read_session.parallel_read_rows(...)
  ```
  Args:
      cycle_length: number of streams to process in parallel. If not specified, it
          is defaulted to the number of streams in the read session.
      sloppy: If false, elements are produced in deterministic order. If true,
          the implementation is allowed, for the sake of expediency, to produce
          elements in a non-deterministic order.
          When reading from multiple BigQuery streams, setting sloppy=True usually
          yields a better performance.
      block_length: The number of consecutive elements to pull from a session stream
          before advancing to the next one.
      num_parallel_calls: Number of threads to use for processing input streams.
          If the value `tf.data.experimental.AUTOTUNE` is used, then the number of
          parallel calls is set dynamically based on available CPU.
          Defaulted to the number of streams in the read session.
  
  Returns:
      A `tf.data.Dataset` returning the row keys and the cell contents.
  
  Raises:
      ValueError: If the configured probability is unexpected.
docstr_tok: ["Retrieves","rows","from","the","BigQuery","service","in","parallel","streams",".","``","`","bq_client","=","BigQueryClient","(",")","bq_read_session","=","bq_client.read_session","(","...",")","ds1","=","bq_read_session.parallel_read_rows","(","...",")","``","`","Args",":","cycle_length",":","number","of","streams","to","process","in","parallel",".","If","not","specified",",","it","is","defaulted","to","the","number","of","streams","in","the","read","session",".","sloppy",":","If","false",",","elements","are","produced","in","deterministic","order",".","If","true",",","the","implementation","is","allowed",",","for","the","sake","of","expediency",",","to","produce","elements","in","a","non-deterministic","order",".","When","reading","from","multiple","BigQuery","streams",",","setting","sloppy=True","usually","yields","a","better","performance",".","block_length",":","The","number","of","consecutive","elements","to","pull","from","a","session","stream","before","advancing","to","the","next","one",".","num_parallel_calls",":","Number","of","threads","to","use","for","processing","input","streams",".","If","the","value","`","tf.data.experimental.AUTOTUNE","`","is","used",",","then","the","number","of","parallel","calls","is","set","dynamically","based","on","available","CPU",".","Defaulted","to","the","number","of","streams","in","the","read","session",".","Returns",":","A","`","tf.data.Dataset","`","returning","the","row","keys","and","the","cell","contents",".","Raises",":","ValueError",":","If","the","configured","probability","is","unexpected","."]
code: def parallel_read_rows(
      self,
      cycle_length=None,
      sloppy=False,
      block_length=1,
      num_parallel_calls=None,
  ):
      """Retrieves rows from the BigQuery service in parallel streams.
  
      ```
      bq_client = BigQueryClient()
      bq_read_session = bq_client.read_session(...)
      ds1 = bq_read_session.parallel_read_rows(...)
      ```
      Args:
          cycle_length: number of streams to process in parallel. If not specified, it
              is defaulted to the number of streams in the read session.
          sloppy: If false, elements are produced in deterministic order. If true,
              the implementation is allowed, for the sake of expediency, to produce
              elements in a non-deterministic order.
              When reading from multiple BigQuery streams, setting sloppy=True usually
              yields a better performance.
          block_length: The number of consecutive elements to pull from a session stream
              before advancing to the next one.
          num_parallel_calls: Number of threads to use for processing input streams.
              If the value `tf.data.experimental.AUTOTUNE` is used, then the number of
              parallel calls is set dynamically based on available CPU.
              Defaulted to the number of streams in the read session.
  
      Returns:
          A `tf.data.Dataset` returning the row keys and the cell contents.
  
      Raises:
          ValueError: If the configured probability is unexpected.
      """
      streams_ds = dataset_ops.Dataset.from_tensor_slices(self._streams)
      streams_count = tf.cast(tf.size(self._streams), dtype=tf.int64)
      if cycle_length is None:
          cycle_length = streams_count
      if num_parallel_calls is None:
          num_parallel_calls = streams_count
  
      return streams_ds.interleave(
          map_func=self.read_rows,
          cycle_length=cycle_length,
          block_length=block_length,
          num_parallel_calls=num_parallel_calls,
          deterministic=not (sloppy),
      )
  
imports: import collections
  import enum
  import tensorflow
  from operator import itemgetter
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.util import deprecation
  from tensorflow_io.python.ops import core_ops
label_desc: Use image node_id 4 for calling the BigQueryReadSession obj's underlying member method code with example usage: obj.parallel_read_rows(cycle_length, sloppy, block_length, num_parallel_calls) and returns: streams_ds