materialized_views
Creates, updates, deletes, gets or lists a materialized_views
resource.
Overview
Name | materialized_views |
Type | Resource |
Id | google.bigtableadmin.materialized_views |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The unique name of the materialized view. Format: projects/{project}/instances/{instance}/materializedViews/{materialized_view} |
deletionProtection | boolean | Set to true to make the MaterializedView protected against deletion. |
etag | string | Optional. The etag for this materialized 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. |
query | string | Required. Immutable. The materialized view's select query. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The unique name of the materialized view. Format: projects/{project}/instances/{instance}/materializedViews/{materialized_view} |
deletionProtection | boolean | Set to true to make the MaterializedView protected against deletion. |
etag | string | Optional. The etag for this materialized 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. |
query | string | Required. Immutable. The materialized view's select query. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , instancesId , materializedViewsId | Gets information about a materialized view. | |
list | select | projectsId , instancesId | pageSize , pageToken | Lists information about materialized views in an instance. |
create | insert | projectsId , instancesId | materializedViewId | Creates a materialized view within an instance. |
patch | update | projectsId , instancesId , materializedViewsId | updateMask | Updates a materialized view within an instance. |
delete | delete | projectsId , instancesId , materializedViewsId | etag | Deletes a materialized 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.
Name | Datatype | Description |
---|---|---|
instancesId | string | |
materializedViewsId | string | |
projectsId | string | |
etag | string | |
materializedViewId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets information about a materialized view.
SELECT
name,
deletionProtection,
etag,
query
FROM google.bigtableadmin.materialized_views
WHERE projectsId = '{{ projectsId }}' -- required
AND instancesId = '{{ instancesId }}' -- required
AND materializedViewsId = '{{ materializedViewsId }}' -- required;
Lists information about materialized views in an instance.
SELECT
name,
deletionProtection,
etag,
query
FROM google.bigtableadmin.materialized_views
WHERE projectsId = '{{ projectsId }}' -- required
AND instancesId = '{{ instancesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
Creates a materialized view within an instance.
INSERT INTO google.bigtableadmin.materialized_views (
data__name,
data__query,
data__etag,
data__deletionProtection,
projectsId,
instancesId,
materializedViewId
)
SELECT
'{{ name }}',
'{{ query }}',
'{{ etag }}',
{{ deletionProtection }},
'{{ projectsId }}',
'{{ instancesId }}',
'{{ materializedViewId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: materialized_views
props:
- name: projectsId
value: string
description: Required parameter for the materialized_views resource.
- name: instancesId
value: string
description: Required parameter for the materialized_views resource.
- name: name
value: string
description: >
Identifier. The unique name of the materialized view. Format: `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`
- name: query
value: string
description: >
Required. Immutable. The materialized view's select query.
- name: etag
value: string
description: >
Optional. The etag for this materialized 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.
- name: deletionProtection
value: boolean
description: >
Set to true to make the MaterializedView protected against deletion.
- name: materializedViewId
value: string
UPDATE
examples
- patch
Updates a materialized view within an instance.
UPDATE google.bigtableadmin.materialized_views
SET
data__name = '{{ name }}',
data__query = '{{ query }}',
data__etag = '{{ etag }}',
data__deletionProtection = {{ deletionProtection }}
WHERE
projectsId = '{{ projectsId }}' --required
AND instancesId = '{{ instancesId }}' --required
AND materializedViewsId = '{{ materializedViewsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes a materialized view from an instance.
DELETE FROM google.bigtableadmin.materialized_views
WHERE projectsId = '{{ projectsId }}' --required
AND instancesId = '{{ instancesId }}' --required
AND materializedViewsId = '{{ materializedViewsId }}' --required
AND etag = '{{ etag }}';