Skip to main content

logical_views

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

Overview

Namelogical_views
TypeResource
Idgoogle.bigtableadmin.logical_views

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The unique name of the logical view. Format: projects/{project}/instances/{instance}/logicalViews/{logical_view}
deletionProtectionbooleanOptional. Set to true to make the LogicalView protected against deletion.
etagstringOptional. The etag for this logical view. This may be sent on update requests to ensure that the client has an up-to-date value before proceeding. The server returns an ABORTED error on a mismatched etag.
querystringRequired. The logical view's select query.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, instancesId, logicalViewsIdGets information about a logical view.
listselectprojectsId, instancesIdpageSize, pageTokenLists information about logical views in an instance.
createinsertprojectsId, instancesIdlogicalViewIdCreates a logical view within an instance.
patchupdateprojectsId, instancesId, logicalViewsIdupdateMaskUpdates a logical view within an instance.
deletedeleteprojectsId, instancesId, logicalViewsIdetagDeletes a logical view from an instance.

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
logicalViewsIdstring
projectsIdstring
etagstring
logicalViewIdstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets information about a logical view.

SELECT
name,
deletionProtection,
etag,
query
FROM google.bigtableadmin.logical_views
WHERE projectsId = '{{ projectsId }}' -- required
AND instancesId = '{{ instancesId }}' -- required
AND logicalViewsId = '{{ logicalViewsId }}' -- required;

INSERT examples

Creates a logical view within an instance.

INSERT INTO google.bigtableadmin.logical_views (
data__name,
data__query,
data__etag,
data__deletionProtection,
projectsId,
instancesId,
logicalViewId
)
SELECT
'{{ name }}',
'{{ query }}',
'{{ etag }}',
{{ deletionProtection }},
'{{ projectsId }}',
'{{ instancesId }}',
'{{ logicalViewId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates a logical view within an instance.

UPDATE google.bigtableadmin.logical_views
SET
data__name = '{{ name }}',
data__query = '{{ query }}',
data__etag = '{{ etag }}',
data__deletionProtection = {{ deletionProtection }}
WHERE
projectsId = '{{ projectsId }}' --required
AND instancesId = '{{ instancesId }}' --required
AND logicalViewsId = '{{ logicalViewsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a logical view from an instance.

DELETE FROM google.bigtableadmin.logical_views
WHERE projectsId = '{{ projectsId }}' --required
AND instancesId = '{{ instancesId }}' --required
AND logicalViewsId = '{{ logicalViewsId }}' --required
AND etag = '{{ etag }}';