Class v1beta1.BigQueryStorageClient (2.3.0)

BigQuery storage API.

The BigQuery storage API can be used to read data stored in BigQuery. v1beta1

Package

@google-cloud/bigquery-storage!

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of BigQueryStorageClient.

Parameter
NameDescription
opts ClientOptions

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

Property Value
TypeDescription
string

auth

auth: gax.GoogleAuth;
Property Value
TypeDescription
gax.GoogleAuth

bigQueryStorageStub

bigQueryStorageStub?: Promise<{
        [name: string]: Function;
    }>;
Property Value
TypeDescription
Promise<{ [name: string]: Function; }>

descriptors

descriptors: Descriptors;
Property Value
TypeDescription
Descriptors

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };
Property Value
TypeDescription
{ [name: string]: Function; }

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };
Property Value
TypeDescription
{ [name: string]: gax.PathTemplate; }

port

static get port(): number;

The port for this API service.

Property Value
TypeDescription
number

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

Property Value
TypeDescription
string[]

servicePath

static get servicePath(): string;

The DNS address for this API service.

Property Value
TypeDescription
string

Methods

batchCreateReadSessionStreams(request, options)

batchCreateReadSessionStreams(request: protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsResponse, (protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest | undefined), {} | undefined]>;
Parameters
NameDescription
request protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsResponse, (protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest | undefined), {} | undefined]>

batchCreateReadSessionStreams(request, options, callback)

batchCreateReadSessionStreams(request: protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsResponse, protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsResponse, protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

batchCreateReadSessionStreams(request, callback)

batchCreateReadSessionStreams(request: protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest, callback: Callback<protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsResponse, protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest
callback Callback<protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsResponse, protos.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createReadSession(request, options)

createReadSession(request: protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.storage.v1beta1.IReadSession, (protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest | undefined), {} | undefined]>;
Parameters
NameDescription
request protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.cloud.bigquery.storage.v1beta1.IReadSession, (protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest | undefined), {} | undefined]>

createReadSession(request, options, callback)

createReadSession(request: protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.storage.v1beta1.IReadSession, protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.storage.v1beta1.IReadSession, protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createReadSession(request, callback)

createReadSession(request: protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest, callback: Callback<protos.google.cloud.bigquery.storage.v1beta1.IReadSession, protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest
callback Callback<protos.google.cloud.bigquery.storage.v1beta1.IReadSession, protos.google.cloud.bigquery.storage.v1beta1.ICreateReadSessionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

finalizeStream(request, options)

finalizeStream(request: protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, (protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest | undefined), {} | undefined]>;
Parameters
NameDescription
request protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, (protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest | undefined), {} | undefined]>

finalizeStream(request, options, callback)

finalizeStream(request: protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

finalizeStream(request, callback)

finalizeStream(request: protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

matchLocationFromReadSessionName(readSessionName)

matchLocationFromReadSessionName(readSessionName: string): string | number;

Parse the location from ReadSession resource.

Parameter
NameDescription
readSessionName string

A fully-qualified path representing ReadSession resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromStreamName(streamName)

matchLocationFromStreamName(streamName: string): string | number;

Parse the location from Stream resource.

Parameter
NameDescription
streamName string

A fully-qualified path representing Stream resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
NameDescription
projectName string

A fully-qualified path representing Project resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromReadSessionName(readSessionName)

matchProjectFromReadSessionName(readSessionName: string): string | number;

Parse the project from ReadSession resource.

Parameter
NameDescription
readSessionName string

A fully-qualified path representing ReadSession resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromStreamName(streamName)

matchProjectFromStreamName(streamName: string): string | number;

Parse the project from Stream resource.

Parameter
NameDescription
streamName string

A fully-qualified path representing Stream resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchSessionFromReadSessionName(readSessionName)

matchSessionFromReadSessionName(readSessionName: string): string | number;

Parse the session from ReadSession resource.

Parameter
NameDescription
readSessionName string

A fully-qualified path representing ReadSession resource.

Returns
TypeDescription
string | number

{string} A string representing the session.

matchStreamFromStreamName(streamName)

matchStreamFromStreamName(streamName: string): string | number;

Parse the stream from Stream resource.

Parameter
NameDescription
streamName string

A fully-qualified path representing Stream resource.

Returns
TypeDescription
string | number

{string} A string representing the stream.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
NameDescription
project string
Returns
TypeDescription
string

{string} Resource name string.

readRows(request, options)

readRows(request?: protos.google.cloud.bigquery.storage.v1beta1.IReadRowsRequest, options?: CallOptions): gax.CancellableStream;

Reads rows from the table in the format prescribed by the read session. Each response contains one or more table rows, up to a maximum of 10 MiB per response; read requests which attempt to read individual rows larger than this will fail.

Each request also returns a set of stream statistics reflecting the estimated total number of rows in the read stream. This number is computed based on the total table size and the number of active streams in the read session, and may change as other streams continue to read data.

Parameters
NameDescription
request protos.google.cloud.bigquery.storage.v1beta1.IReadRowsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
gax.CancellableStream

{Stream} An object stream which emits [ReadRowsResponse] on 'data' event. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming) for more details and examples.

readSessionPath(project, location, session)

readSessionPath(project: string, location: string, session: string): string;

Return a fully-qualified readSession resource name string.

Parameters
NameDescription
project string
location string
session string
Returns
TypeDescription
string

{string} Resource name string.

splitReadStream(request, options)

splitReadStream(request: protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamResponse, (protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest | undefined), {} | undefined]>;
Parameters
NameDescription
request protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamResponse, (protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest | undefined), {} | undefined]>

splitReadStream(request, options, callback)

splitReadStream(request: protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamResponse, protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamResponse, protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

splitReadStream(request, callback)

splitReadStream(request: protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest, callback: Callback<protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamResponse, protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest
callback Callback<protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamResponse, protos.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

streamPath(project, location, stream)

streamPath(project: string, location: string, stream: string): string;

Return a fully-qualified stream resource name string.

Parameters
NameDescription
project string
location string
stream string
Returns
TypeDescription
string

{string} Resource name string.