Skip to main content

partitions

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

Overview

Namepartitions
TypeResource
Idgoogle.dataplex.partitions

Fields

NameDatatypeDescription
namestringOutput 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.
etagstringOptional. The etag for this partition.
locationstringRequired. 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/
valuesarrayRequired. Immutable. The set of values representing the partition, which correspond to the partition schema defined in the parent entity.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_lakes_zones_entities_partitions_getSELECTentitiesId, lakesId, locationsId, partitionsId, projectsId, zonesIdGet a metadata partition of an entity.
projects_locations_lakes_zones_entities_partitions_listSELECTentitiesId, lakesId, locationsId, projectsId, zonesIdList metadata partitions of an entity.
projects_locations_lakes_zones_entities_partitions_createINSERTentitiesId, lakesId, locationsId, projectsId, zonesIdCreate a metadata partition.
projects_locations_lakes_zones_entities_partitions_deleteDELETEentitiesId, lakesId, locationsId, partitionsId, projectsId, zonesIdDelete 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.

/*+ create */
INSERT INTO google.dataplex.partitions (
entitiesId,
lakesId,
locationsId,
projectsId,
zonesId,
values,
location,
etag
)
SELECT
'{{ entitiesId }}',
'{{ lakesId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ zonesId }}',
'{{ values }}',
'{{ location }}',
'{{ etag }}'
;

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 }}';