partitions
Creates, updates, deletes, gets or lists a partitions
resource.
Overview
Name | partitions |
Type | Resource |
Id | google.dataplex.partitions |
Fields
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
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_lakes_zones_entities_partitions_get | SELECT | entitiesId, lakesId, locationsId, partitionsId, projectsId, zonesId | Get a metadata partition of an entity. |
projects_locations_lakes_zones_entities_partitions_list | SELECT | entitiesId, lakesId, locationsId, projectsId, zonesId | List metadata partitions of an entity. |
projects_locations_lakes_zones_entities_partitions_create | INSERT | entitiesId, lakesId, locationsId, projectsId, zonesId | Create a metadata partition. |
projects_locations_lakes_zones_entities_partitions_delete | DELETE | entitiesId, lakesId, locationsId, partitionsId, projectsId, zonesId | Delete a metadata partition. |
SELECT
examples
List metadata partitions of an entity.
SELECT
name,
etag,
location,
values
FROM google.dataplex.partitions
WHERE entitiesId = '{{ entitiesId }}'
AND lakesId = '{{ lakesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND zonesId = '{{ zonesId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new partitions
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.dataplex.partitions (
entitiesId,
lakesId,
locationsId,
projectsId,
zonesId,
values,
location,
etag
)
SELECT
'{{ entitiesId }}',
'{{ lakesId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ zonesId }}',
'{{ values }}',
'{{ location }}',
'{{ etag }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: values
value:
- string
- name: location
value: string
- name: etag
value: string
DELETE
example
Deletes the specified partitions
resource.
/*+ delete */
DELETE FROM google.dataplex.partitions
WHERE entitiesId = '{{ entitiesId }}'
AND lakesId = '{{ lakesId }}'
AND locationsId = '{{ locationsId }}'
AND partitionsId = '{{ partitionsId }}'
AND projectsId = '{{ projectsId }}'
AND zonesId = '{{ zonesId }}';