Skip to main content

schema_bundles

Creates, updates, deletes, gets or lists a schema_bundles resource.

Overview

Nameschema_bundles
TypeResource
Idgoogle.bigtableadmin.schema_bundles

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The unique name identifying this schema bundle. Values are of the form projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}
etagstringOptional. The etag for this schema bundle. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. The server returns an ABORTED error on a mismatched etag.
protoSchemaobjectSchema for Protobufs. (id: ProtoSchema)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, instancesId, tablesId, schemaBundlesIdGets metadata information about the specified schema bundle.
listselectprojectsId, instancesId, tablesIdpageSize, pageToken, viewLists all schema bundles associated with the specified table.
createinsertprojectsId, instancesId, tablesIdschemaBundleIdCreates a new schema bundle in the specified table.
patchupdateprojectsId, instancesId, tablesId, schemaBundlesIdupdateMask, ignoreWarningsUpdates a schema bundle in the specified table.
deletedeleteprojectsId, instancesId, tablesId, schemaBundlesIdetagDeletes a schema bundle in the specified table.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
instancesIdstring
projectsIdstring
schemaBundlesIdstring
tablesIdstring
etagstring
ignoreWarningsboolean
pageSizeinteger (int32)
pageTokenstring
schemaBundleIdstring
updateMaskstring (google-fieldmask)
viewstring

SELECT examples

Gets metadata information about the specified schema bundle.

SELECT
name,
etag,
protoSchema
FROM google.bigtableadmin.schema_bundles
WHERE projectsId = '{{ projectsId }}' -- required
AND instancesId = '{{ instancesId }}' -- required
AND tablesId = '{{ tablesId }}' -- required
AND schemaBundlesId = '{{ schemaBundlesId }}' -- required;

INSERT examples

Creates a new schema bundle in the specified table.

INSERT INTO google.bigtableadmin.schema_bundles (
data__name,
data__protoSchema,
data__etag,
projectsId,
instancesId,
tablesId,
schemaBundleId
)
SELECT
'{{ name }}',
'{{ protoSchema }}',
'{{ etag }}',
'{{ projectsId }}',
'{{ instancesId }}',
'{{ tablesId }}',
'{{ schemaBundleId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates a schema bundle in the specified table.

UPDATE google.bigtableadmin.schema_bundles
SET
data__name = '{{ name }}',
data__protoSchema = '{{ protoSchema }}',
data__etag = '{{ etag }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND instancesId = '{{ instancesId }}' --required
AND tablesId = '{{ tablesId }}' --required
AND schemaBundlesId = '{{ schemaBundlesId }}' --required
AND updateMask = '{{ updateMask}}'
AND ignoreWarnings = {{ ignoreWarnings}}
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a schema bundle in the specified table.

DELETE FROM google.bigtableadmin.schema_bundles
WHERE projectsId = '{{ projectsId }}' --required
AND instancesId = '{{ instancesId }}' --required
AND tablesId = '{{ tablesId }}' --required
AND schemaBundlesId = '{{ schemaBundlesId }}' --required
AND etag = '{{ etag }}';