public final ReadSession createReadSession(
      TableReference tableReference, String parent, int requestedStreams) {

    CreateReadSessionRequest request =
        CreateReadSessionRequest.newBuilder()
            .setTableReference(tableReference)
            .setParent(parent)
            .setRequestedStreams(requestedStreams)
            .build();
    return createReadSession(request);
  }
public final ReadSession createReadSession ( TableReference tableReference , String parent , int requestedStreams ) { CreateReadSessionRequest request = CreateReadSessionRequest . newBuilder ( ) . setTableReference ( tableReference ) . setParent ( parent ) . setRequestedStreams ( requestedStreams ) . build ( ) ; return createReadSession ( request ) ; }
Creates a new read session. A read session divides the contents of a BigQuery table into one or
more streams, which can then be used to read data from the table. The read session also
specifies properties of the data to be read, such as a list of columns or a push-down filter
describing the rows to be returned.

<p>A particular row can be read by at most one stream. When the caller has reached the end of
each stream in the session, then all the data in the table has been read.

<p>Read sessions automatically expire 24 hours after they are created and do not require manual
clean-up by the caller.

<p>Sample code:

<pre><code>
try (BigQueryStorageClient bigQueryStorageClient = BigQueryStorageClient.create()) {
TableReference tableReference = TableReference.newBuilder().build();
String parent = "";
int requestedStreams = 0;
ReadSession response = bigQueryStorageClient.createReadSession(tableReference, parent, requestedStreams);
}
</code></pre>

@param tableReference Required. Reference to the table to read.
@param parent Required. String of the form "projects/your-project-id" indicating the project
this ReadSession is associated with. This is the project that will be billed for usage.
@param requestedStreams Optional. Initial number of streams. If unset or 0, we will provide a
value of streams so as to produce reasonable throughput. Must be non-negative. The number
of streams may be lower than the requested number, depending on the amount parallelism that
is reasonable for the table and the maximum amount of parallelism allowed by the system.
<p>Streams must be read starting from offset 0.
@throws com.google.api.gax.rpc.ApiException if the remote call fails