partitions
Creates, updates, deletes, gets or lists a partitions
resource.
Overview
Name | partitions |
Type | Resource |
Id | google.dataplex.partitions |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_lakes_zones_entities_partitions_get
- projects_locations_lakes_zones_entities_partitions_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Partition values used in the HTTP URL must be double encoded. For example, url_encode(url_encode(value)) can be used to encode "US:CA/CA#Sunnyvale so that the request URL ends with "/partitions/US%253ACA/CA%2523Sunnyvale". The name field in the response retains the encoded format. |
etag | string | Optional. The etag for this partition. |
location | string | Required. Immutable. The location of the entity data within the partition, for example, gs://bucket/path/to/entity/key1=value1/key2=value2. Or projects//datasets//tables/ |
values | array | Required. Immutable. The set of values representing the partition, which correspond to the partition schema defined in the parent entity. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Partition values used in the HTTP URL must be double encoded. For example, url_encode(url_encode(value)) can be used to encode "US:CA/CA#Sunnyvale so that the request URL ends with "/partitions/US%253ACA/CA%2523Sunnyvale". The name field in the response retains the encoded format. |
etag | string | Optional. The etag for this partition. |
location | string | Required. Immutable. The location of the entity data within the partition, for example, gs://bucket/path/to/entity/key1=value1/key2=value2. Or projects//datasets//tables/ |
values | array | Required. Immutable. The set of values representing the partition, which correspond to the partition schema defined in the parent entity. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_lakes_zones_entities_partitions_get | select | projectsId , locationsId , lakesId , zonesId , entitiesId , partitionsId | Get a metadata partition of an entity. | |
projects_locations_lakes_zones_entities_partitions_list | select | projectsId , locationsId , lakesId , zonesId , entitiesId | pageSize , pageToken , filter | List metadata partitions of an entity. |
projects_locations_lakes_zones_entities_partitions_create | insert | projectsId , locationsId , lakesId , zonesId , entitiesId | validateOnly | Create a metadata partition. |
projects_locations_lakes_zones_entities_partitions_delete | delete | projectsId , locationsId , lakesId , zonesId , entitiesId , partitionsId | etag | Delete a metadata partition. |
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 |
---|---|---|
entitiesId | string | |
lakesId | string | |
locationsId | string | |
partitionsId | string | |
projectsId | string | |
zonesId | string | |
etag | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
validateOnly | boolean |
SELECT
examples
- projects_locations_lakes_zones_entities_partitions_get
- projects_locations_lakes_zones_entities_partitions_list
Get a metadata partition of an entity.
SELECT
name,
etag,
location,
values
FROM google.dataplex.partitions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND lakesId = '{{ lakesId }}' -- required
AND zonesId = '{{ zonesId }}' -- required
AND entitiesId = '{{ entitiesId }}' -- required
AND partitionsId = '{{ partitionsId }}' -- required;
List metadata partitions of an entity.
SELECT
name,
etag,
location,
values
FROM google.dataplex.partitions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND lakesId = '{{ lakesId }}' -- required
AND zonesId = '{{ zonesId }}' -- required
AND entitiesId = '{{ entitiesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}';
INSERT
examples
- projects_locations_lakes_zones_entities_partitions_create
- Manifest
Create a metadata partition.
INSERT INTO google.dataplex.partitions (
data__values,
data__location,
data__etag,
projectsId,
locationsId,
lakesId,
zonesId,
entitiesId,
validateOnly
)
SELECT
'{{ values }}',
'{{ location }}',
'{{ etag }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ lakesId }}',
'{{ zonesId }}',
'{{ entitiesId }}',
'{{ validateOnly }}'
RETURNING
name,
etag,
location,
values
;
# Description fields are for documentation purposes
- name: partitions
props:
- name: projectsId
value: string
description: Required parameter for the partitions resource.
- name: locationsId
value: string
description: Required parameter for the partitions resource.
- name: lakesId
value: string
description: Required parameter for the partitions resource.
- name: zonesId
value: string
description: Required parameter for the partitions resource.
- name: entitiesId
value: string
description: Required parameter for the partitions resource.
- name: values
value: array
description: >
Required. Immutable. The set of values representing the partition, which correspond to the partition schema defined in the parent entity.
- name: location
value: string
description: >
Required. Immutable. The location of the entity data within the partition, for example, gs://bucket/path/to/entity/key1=value1/key2=value2. Or projects//datasets//tables/
- name: etag
value: string
description: >
Optional. The etag for this partition.
- name: validateOnly
value: boolean
DELETE
examples
- projects_locations_lakes_zones_entities_partitions_delete
Delete a metadata partition.
DELETE FROM google.dataplex.partitions
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND lakesId = '{{ lakesId }}' --required
AND zonesId = '{{ zonesId }}' --required
AND entitiesId = '{{ entitiesId }}' --required
AND partitionsId = '{{ partitionsId }}' --required
AND etag = '{{ etag }}';