Service for reading from and writing to existing Bigtable tables. v2
Package
@google-cloud/bigtableConstructors
(constructor)(opts, gaxInstance)
constructor
(
opts
?:
ClientOptions
,
gaxInstance
?:
typeof
gax
|
typeof
gax
.
fallback
);
Construct an instance of BigtableClient.
opts
ClientOptions
gaxInstance
typeof gax
| typeof fallback
: loaded instance of google-gax
. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new BigtableClient({fallback: true}, gax); ```
Properties
apiEndpoint
get
apiEndpoint
()
:
string
;
The DNS address for this API service.
apiEndpoint
static
get
apiEndpoint
()
:
string
;
The DNS address for this API service - same as servicePath.
auth
auth
:
gax
.
GoogleAuth
;
bigtableStub
bigtableStub
?:
Promise
< {
[
name
:
string
]
:
Function
;
}>;
descriptors
descriptors
:
Descriptors
;
innerApiCalls
innerApiCalls
:
{
[
name
:
string
]
:
Function
;
};
pathTemplates
pathTemplates
:
{
[
name
:
string
]
:
gax
.
PathTemplate
;
};
port
static
get
port
()
:
number
;
The port for this API service.
scopes
static
get
scopes
()
:
string
[];
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static
get
servicePath
()
:
string
;
The DNS address for this API service.
universeDomain
get
universeDomain
()
:
string
;
warn
warn
:
(
code
:
string
,
message
:
string
,
warnType
?:
string
)
=
>
void
;
Methods
authorizedViewPath(project, instance, table, authorizedView)
authorizedViewPath
(
project
:
string
,
instance
:
string
,
table
:
string
,
authorizedView
:
string
)
:
string
;
Return a fully-qualified authorizedView resource name string.
project
string
instance
string
table
string
authorizedView
string
string
{string} Resource name string.
checkAndMutateRow(request, options)
checkAndMutateRow
(
request
?:
protos
.
google
.
bigtable
.
v2
.
ICheckAndMutateRowRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
bigtable
.
v2
.
ICheckAndMutateRowResponse
,
protos
.
google
.
bigtable
.
v2
.
ICheckAndMutateRowRequest
|
undefined
,
{}
|
undefined
]>;
Mutates a row atomically based on the output of a predicate Reader filter.
request
options
Promise
<[ protos.google.bigtable.v2.ICheckAndMutateRowResponse
, protos.google.bigtable.v2.ICheckAndMutateRowRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing CheckAndMutateRowResponse . Please see the documentation for more details and examples.
checkAndMutateRow(request, options, callback)
checkAndMutateRow
(
request
:
protos
.
google
.
bigtable
.
v2
.
ICheckAndMutateRowRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
bigtable
.
v2
.
ICheckAndMutateRowResponse
,
protos
.
google
.
bigtable
.
v2
.
ICheckAndMutateRowRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.bigtable.v2.ICheckAndMutateRowResponse
, protos.google.bigtable.v2.ICheckAndMutateRowRequest
| null | undefined, {} | null | undefined>
void
checkAndMutateRow(request, callback)
checkAndMutateRow
(
request
:
protos
.
google
.
bigtable
.
v2
.
ICheckAndMutateRowRequest
,
callback
:
Callback<protos
.
google
.
bigtable
.
v2
.
ICheckAndMutateRowResponse
,
protos
.
google
.
bigtable
.
v2
.
ICheckAndMutateRowRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.bigtable.v2.ICheckAndMutateRowResponse
, protos.google.bigtable.v2.ICheckAndMutateRowRequest
| null | undefined, {} | null | undefined>
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.
Promise
<void>
{Promise} A promise that resolves when the client is closed.
executeQuery(request, options)
executeQuery
(
request
?:
protos
.
google
.
bigtable
.
v2
.
IExecuteQueryRequest
,
options
?:
CallOptions
)
:
gax
.
CancellableStream
;
Executes a SQL query against a particular Bigtable instance.
request
options
gax.CancellableStream
{Stream} An object stream which emits ExecuteQueryResponse on 'data' event. Please see the documentation for more details and examples.
generateInitialChangeStreamPartitions(request, options)
generateInitialChangeStreamPartitions
(
request
?:
protos
.
google
.
bigtable
.
v2
.
IGenerateInitialChangeStreamPartitionsRequest
,
options
?:
CallOptions
)
:
gax
.
CancellableStream
;
NOTE: This API is intended to be used by Apache Beam BigtableIO. Returns the current list of partitions that make up the table's change stream. The union of partitions will cover the entire keyspace. Partitions can be read with ReadChangeStream
.
request
options
gax.CancellableStream
{Stream} An object stream which emits GenerateInitialChangeStreamPartitionsResponse on 'data' event. Please see the documentation for more details and examples.
getProjectId()
getProjectId
()
:
Promise<string>
;
Promise
<string>
getProjectId(callback)
getProjectId
(
callback
:
Callback<string
,
undefined
,
undefined
> )
:
void
;
callback
Callback
<string, undefined, undefined>
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.
Promise
<{
[name: string]: Function
;
}>
{Promise} A promise that resolves to an authenticated service stub.
instancePath(project, instance)
instancePath
(
project
:
string
,
instance
:
string
)
:
string
;
Return a fully-qualified instance resource name string.
project
string
instance
string
string
{string} Resource name string.
matchAuthorizedViewFromAuthorizedViewName(authorizedViewName)
matchAuthorizedViewFromAuthorizedViewName
(
authorizedViewName
:
string
)
:
string
|
number
;
Parse the authorized_view from AuthorizedView resource.
authorizedViewName
string
A fully-qualified path representing AuthorizedView resource.
string | number
{string} A string representing the authorized_view.
matchInstanceFromAuthorizedViewName(authorizedViewName)
matchInstanceFromAuthorizedViewName
(
authorizedViewName
:
string
)
:
string
|
number
;
Parse the instance from AuthorizedView resource.
authorizedViewName
string
A fully-qualified path representing AuthorizedView resource.
string | number
{string} A string representing the instance.
matchInstanceFromInstanceName(instanceName)
matchInstanceFromInstanceName
(
instanceName
:
string
)
:
string
|
number
;
Parse the instance from Instance resource.
instanceName
string
A fully-qualified path representing Instance resource.
string | number
{string} A string representing the instance.
matchInstanceFromMaterializedViewName(materializedViewName)
matchInstanceFromMaterializedViewName
(
materializedViewName
:
string
)
:
string
|
number
;
Parse the instance from MaterializedView resource.
materializedViewName
string
A fully-qualified path representing MaterializedView resource.
string | number
{string} A string representing the instance.
matchInstanceFromTableName(tableName)
matchInstanceFromTableName
(
tableName
:
string
)
:
string
|
number
;
Parse the instance from Table resource.
tableName
string
A fully-qualified path representing Table resource.
string | number
{string} A string representing the instance.
matchMaterializedViewFromMaterializedViewName(materializedViewName)
matchMaterializedViewFromMaterializedViewName
(
materializedViewName
:
string
)
:
string
|
number
;
Parse the materialized_view from MaterializedView resource.
materializedViewName
string
A fully-qualified path representing MaterializedView resource.
string | number
{string} A string representing the materialized_view.
matchProjectFromAuthorizedViewName(authorizedViewName)
matchProjectFromAuthorizedViewName
(
authorizedViewName
:
string
)
:
string
|
number
;
Parse the project from AuthorizedView resource.
authorizedViewName
string
A fully-qualified path representing AuthorizedView resource.
string | number
{string} A string representing the project.
matchProjectFromInstanceName(instanceName)
matchProjectFromInstanceName
(
instanceName
:
string
)
:
string
|
number
;
Parse the project from Instance resource.
instanceName
string
A fully-qualified path representing Instance resource.
string | number
{string} A string representing the project.
matchProjectFromMaterializedViewName(materializedViewName)
matchProjectFromMaterializedViewName
(
materializedViewName
:
string
)
:
string
|
number
;
Parse the project from MaterializedView resource.
materializedViewName
string
A fully-qualified path representing MaterializedView resource.
string | number
{string} A string representing the project.
matchProjectFromTableName(tableName)
matchProjectFromTableName
(
tableName
:
string
)
:
string
|
number
;
Parse the project from Table resource.
tableName
string
A fully-qualified path representing Table resource.
string | number
{string} A string representing the project.
matchTableFromAuthorizedViewName(authorizedViewName)
matchTableFromAuthorizedViewName
(
authorizedViewName
:
string
)
:
string
|
number
;
Parse the table from AuthorizedView resource.
authorizedViewName
string
A fully-qualified path representing AuthorizedView resource.
string | number
{string} A string representing the table.
matchTableFromTableName(tableName)
matchTableFromTableName
(
tableName
:
string
)
:
string
|
number
;
Parse the table from Table resource.
tableName
string
A fully-qualified path representing Table resource.
string | number
{string} A string representing the table.
materializedViewPath(project, instance, materializedView)
materializedViewPath
(
project
:
string
,
instance
:
string
,
materializedView
:
string
)
:
string
;
Return a fully-qualified materializedView resource name string.
project
string
instance
string
materializedView
string
string
{string} Resource name string.
mutateRow(request, options)
mutateRow
(
request
?:
protos
.
google
.
bigtable
.
v2
.
IMutateRowRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
bigtable
.
v2
.
IMutateRowResponse
,
protos
.
google
.
bigtable
.
v2
.
IMutateRowRequest
|
undefined
,
{}
|
undefined
]>;
Mutates a row atomically. Cells already present in the row are left unchanged unless explicitly changed by mutation
.
request
options
Promise
<[ protos.google.bigtable.v2.IMutateRowResponse
, protos.google.bigtable.v2.IMutateRowRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing MutateRowResponse . Please see the documentation for more details and examples.
mutateRow(request, options, callback)
mutateRow
(
request
:
protos
.
google
.
bigtable
.
v2
.
IMutateRowRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
bigtable
.
v2
.
IMutateRowResponse
,
protos
.
google
.
bigtable
.
v2
.
IMutateRowRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.bigtable.v2.IMutateRowResponse
, protos.google.bigtable.v2.IMutateRowRequest
| null | undefined, {} | null | undefined>
void
mutateRow(request, callback)
mutateRow
(
request
:
protos
.
google
.
bigtable
.
v2
.
IMutateRowRequest
,
callback
:
Callback<protos
.
google
.
bigtable
.
v2
.
IMutateRowResponse
,
protos
.
google
.
bigtable
.
v2
.
IMutateRowRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.bigtable.v2.IMutateRowResponse
, protos.google.bigtable.v2.IMutateRowRequest
| null | undefined, {} | null | undefined>
void
mutateRows(request, options)
mutateRows
(
request
?:
protos
.
google
.
bigtable
.
v2
.
IMutateRowsRequest
,
options
?:
CallOptions
)
:
gax
.
CancellableStream
;
Mutates multiple rows in a batch. Each individual row is mutated atomically as in MutateRow, but the entire batch is not executed atomically.
request
options
gax.CancellableStream
{Stream} An object stream which emits on 'data' event. Please see the documentation for more details and examples.
pingAndWarm(request, options)
pingAndWarm
(
request
?:
protos
.
google
.
bigtable
.
v2
.
IPingAndWarmRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
bigtable
.
v2
.
IPingAndWarmResponse
,
protos
.
google
.
bigtable
.
v2
.
IPingAndWarmRequest
|
undefined
,
{}
|
undefined
]>;
Warm up associated instance metadata for this connection. This call is not required but may be useful for connection keep-alive.
request
options
Promise
<[ protos.google.bigtable.v2.IPingAndWarmResponse
, protos.google.bigtable.v2.IPingAndWarmRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing PingAndWarmResponse . Please see the documentation for more details and examples.
pingAndWarm(request, options, callback)
pingAndWarm
(
request
:
protos
.
google
.
bigtable
.
v2
.
IPingAndWarmRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
bigtable
.
v2
.
IPingAndWarmResponse
,
protos
.
google
.
bigtable
.
v2
.
IPingAndWarmRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.bigtable.v2.IPingAndWarmResponse
, protos.google.bigtable.v2.IPingAndWarmRequest
| null | undefined, {} | null | undefined>
void
pingAndWarm(request, callback)
pingAndWarm
(
request
:
protos
.
google
.
bigtable
.
v2
.
IPingAndWarmRequest
,
callback
:
Callback<protos
.
google
.
bigtable
.
v2
.
IPingAndWarmResponse
,
protos
.
google
.
bigtable
.
v2
.
IPingAndWarmRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.bigtable.v2.IPingAndWarmResponse
, protos.google.bigtable.v2.IPingAndWarmRequest
| null | undefined, {} | null | undefined>
void
prepareQuery(request, options)
prepareQuery
(
request
?:
protos
.
google
.
bigtable
.
v2
.
IPrepareQueryRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
bigtable
.
v2
.
IPrepareQueryResponse
,
protos
.
google
.
bigtable
.
v2
.
IPrepareQueryRequest
|
undefined
,
{}
|
undefined
]>;
Prepares a GoogleSQL query for execution on a particular Bigtable instance.
request
options
Promise
<[ protos.google.bigtable.v2.IPrepareQueryResponse
, protos.google.bigtable.v2.IPrepareQueryRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing PrepareQueryResponse . Please see the documentation for more details and examples.
prepareQuery(request, options, callback)
prepareQuery
(
request
:
protos
.
google
.
bigtable
.
v2
.
IPrepareQueryRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
bigtable
.
v2
.
IPrepareQueryResponse
,
protos
.
google
.
bigtable
.
v2
.
IPrepareQueryRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.bigtable.v2.IPrepareQueryResponse
, protos.google.bigtable.v2.IPrepareQueryRequest
| null | undefined, {} | null | undefined>
void
prepareQuery(request, callback)
prepareQuery
(
request
:
protos
.
google
.
bigtable
.
v2
.
IPrepareQueryRequest
,
callback
:
Callback<protos
.
google
.
bigtable
.
v2
.
IPrepareQueryResponse
,
protos
.
google
.
bigtable
.
v2
.
IPrepareQueryRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.bigtable.v2.IPrepareQueryResponse
, protos.google.bigtable.v2.IPrepareQueryRequest
| null | undefined, {} | null | undefined>
void
readChangeStream(request, options)
readChangeStream
(
request
?:
protos
.
google
.
bigtable
.
v2
.
IReadChangeStreamRequest
,
options
?:
CallOptions
)
:
gax
.
CancellableStream
;
NOTE: This API is intended to be used by Apache Beam BigtableIO. Reads changes from a table's change stream. Changes will reflect both user-initiated mutations and mutations that are caused by garbage collection.
request
options
gax.CancellableStream
{Stream} An object stream which emits on 'data' event. Please see the documentation for more details and examples.
readModifyWriteRow(request, options)
readModifyWriteRow
(
request
?:
protos
.
google
.
bigtable
.
v2
.
IReadModifyWriteRowRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
bigtable
.
v2
.
IReadModifyWriteRowResponse
,
protos
.
google
.
bigtable
.
v2
.
IReadModifyWriteRowRequest
|
undefined
,
{}
|
undefined
]>;
Modifies a row atomically on the server. The method reads the latest existing timestamp and value from the specified columns and writes a new entry based on pre-defined read/modify/write rules. The new value for the timestamp is the greater of the existing timestamp or the current server time. The method returns the new contents of all modified cells.
request
options
Promise
<[ protos.google.bigtable.v2.IReadModifyWriteRowResponse
, protos.google.bigtable.v2.IReadModifyWriteRowRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing ReadModifyWriteRowResponse . Please see the documentation for more details and examples.
readModifyWriteRow(request, options, callback)
readModifyWriteRow
(
request
:
protos
.
google
.
bigtable
.
v2
.
IReadModifyWriteRowRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
bigtable
.
v2
.
IReadModifyWriteRowResponse
,
protos
.
google
.
bigtable
.
v2
.
IReadModifyWriteRowRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.bigtable.v2.IReadModifyWriteRowResponse
, protos.google.bigtable.v2.IReadModifyWriteRowRequest
| null | undefined, {} | null | undefined>
void
readModifyWriteRow(request, callback)
readModifyWriteRow
(
request
:
protos
.
google
.
bigtable
.
v2
.
IReadModifyWriteRowRequest
,
callback
:
Callback<protos
.
google
.
bigtable
.
v2
.
IReadModifyWriteRowResponse
,
protos
.
google
.
bigtable
.
v2
.
IReadModifyWriteRowRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.bigtable.v2.IReadModifyWriteRowResponse
, protos.google.bigtable.v2.IReadModifyWriteRowRequest
| null | undefined, {} | null | undefined>
void
readRows(request, options)
readRows
(
request
?:
protos
.
google
.
bigtable
.
v2
.
IReadRowsRequest
,
options
?:
CallOptions
)
:
gax
.
CancellableStream
;
Streams back the contents of all requested rows in key order, optionally applying the same Reader filter to each. Depending on their size, rows and cells may be broken up across multiple responses, but atomicity of each row will still be preserved. See the ReadRowsResponse documentation for details.
request
options
gax.CancellableStream
{Stream} An object stream which emits on 'data' event. Please see the documentation for more details and examples.
sampleRowKeys(request, options)
sampleRowKeys
(
request
?:
protos
.
google
.
bigtable
.
v2
.
ISampleRowKeysRequest
,
options
?:
CallOptions
)
:
gax
.
CancellableStream
;
Returns a sample of row keys in the table. The returned row keys will delimit contiguous sections of the table of approximately equal size, which can be used to break up the data for distributed tasks like mapreduces.
request
options
gax.CancellableStream
{Stream} An object stream which emits SampleRowKeysResponse on 'data' event. Please see the documentation for more details and examples.
tablePath(project, instance, table)
tablePath
(
project
:
string
,
instance
:
string
,
table
:
string
)
:
string
;
Return a fully-qualified table resource name string.
project
string
instance
string
table
string
string
{string} Resource name string.