tables
Creates, updates, deletes, gets or lists a tables
resource.
Overview
Name | tables |
Type | Resource |
Id | google.biglake.tables |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id} |
createTime | string (google-datetime) | Output only. The creation time of the table. |
deleteTime | string (google-datetime) | Output only. The deletion time of the table. Only set after the table is deleted. |
etag | string | The checksum of a table object computed by the server based on the value of other fields. It may be sent on update requests to ensure the client has an up-to-date value before proceeding. It is only checked for update table operations. |
expireTime | string (google-datetime) | Output only. The time when this table is considered expired. Only set after the table is deleted. |
hiveOptions | object | Options of a Hive table. (id: HiveTableOptions) |
type | string | The table type. |
updateTime | string (google-datetime) | Output only. The last modification time of the table. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id} |
createTime | string (google-datetime) | Output only. The creation time of the table. |
deleteTime | string (google-datetime) | Output only. The deletion time of the table. Only set after the table is deleted. |
etag | string | The checksum of a table object computed by the server based on the value of other fields. It may be sent on update requests to ensure the client has an up-to-date value before proceeding. It is only checked for update table operations. |
expireTime | string (google-datetime) | Output only. The time when this table is considered expired. Only set after the table is deleted. |
hiveOptions | object | Options of a Hive table. (id: HiveTableOptions) |
type | string | The table type. |
updateTime | string (google-datetime) | Output only. The last modification time of the table. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , catalogsId , databasesId , tablesId | Gets the table specified by the resource name. | |
list | select | projectsId , locationsId , catalogsId , databasesId | pageSize , pageToken , view | List all tables in a specified database. |
create | insert | projectsId , locationsId , catalogsId , databasesId | tableId | Creates a new table. |
patch | update | projectsId , locationsId , catalogsId , databasesId , tablesId | updateMask | Updates an existing table specified by the table ID. |
delete | delete | projectsId , locationsId , catalogsId , databasesId , tablesId | Deletes an existing table specified by the table ID. | |
rename | exec | projectsId , locationsId , catalogsId , databasesId , tablesId | Renames an existing table specified by the table ID. |
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 |
---|---|---|
catalogsId | string | |
databasesId | string | |
locationsId | string | |
projectsId | string | |
tablesId | string | |
pageSize | integer (int32) | |
pageToken | string | |
tableId | string | |
updateMask | string (google-fieldmask) | |
view | string |
SELECT
examples
- get
- list
Gets the table specified by the resource name.
SELECT
name,
createTime,
deleteTime,
etag,
expireTime,
hiveOptions,
type,
updateTime
FROM google.biglake.tables
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND catalogsId = '{{ catalogsId }}' -- required
AND databasesId = '{{ databasesId }}' -- required
AND tablesId = '{{ tablesId }}' -- required;
List all tables in a specified database.
SELECT
name,
createTime,
deleteTime,
etag,
expireTime,
hiveOptions,
type,
updateTime
FROM google.biglake.tables
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND catalogsId = '{{ catalogsId }}' -- required
AND databasesId = '{{ databasesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND view = '{{ view }}';
INSERT
examples
- create
- Manifest
Creates a new table.
INSERT INTO google.biglake.tables (
data__hiveOptions,
data__type,
data__etag,
projectsId,
locationsId,
catalogsId,
databasesId,
tableId
)
SELECT
'{{ hiveOptions }}',
'{{ type }}',
'{{ etag }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ catalogsId }}',
'{{ databasesId }}',
'{{ tableId }}'
RETURNING
name,
createTime,
deleteTime,
etag,
expireTime,
hiveOptions,
type,
updateTime
;
# Description fields are for documentation purposes
- name: tables
props:
- name: projectsId
value: string
description: Required parameter for the tables resource.
- name: locationsId
value: string
description: Required parameter for the tables resource.
- name: catalogsId
value: string
description: Required parameter for the tables resource.
- name: databasesId
value: string
description: Required parameter for the tables resource.
- name: hiveOptions
value: object
description: >
Options of a Hive table.
- name: type
value: string
description: >
The table type.
valid_values: ['TYPE_UNSPECIFIED', 'HIVE']
- name: etag
value: string
description: >
The checksum of a table object computed by the server based on the value of other fields. It may be sent on update requests to ensure the client has an up-to-date value before proceeding. It is only checked for update table operations.
- name: tableId
value: string
UPDATE
examples
- patch
Updates an existing table specified by the table ID.
UPDATE google.biglake.tables
SET
data__hiveOptions = '{{ hiveOptions }}',
data__type = '{{ type }}',
data__etag = '{{ etag }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND catalogsId = '{{ catalogsId }}' --required
AND databasesId = '{{ databasesId }}' --required
AND tablesId = '{{ tablesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
createTime,
deleteTime,
etag,
expireTime,
hiveOptions,
type,
updateTime;
DELETE
examples
- delete
Deletes an existing table specified by the table ID.
DELETE FROM google.biglake.tables
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND catalogsId = '{{ catalogsId }}' --required
AND databasesId = '{{ databasesId }}' --required
AND tablesId = '{{ tablesId }}' --required;
Lifecycle Methods
- rename
Renames an existing table specified by the table ID.
EXEC google.biglake.tables.rename
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@catalogsId='{{ catalogsId }}' --required,
@databasesId='{{ databasesId }}' --required,
@tablesId='{{ tablesId }}' --required
@@json=
'{
"newName": "{{ newName }}"
}';