Skip to main content

entities

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

Overview

Nameentities
TypeResource
Idgoogle.dataplex.entities

Fields

NameDatatypeDescription
idstringRequired. A user-provided entity ID. It is mutable, and will be used as the published table name. Specifying a new ID in an update entity request will override the existing value. The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores, and consist of 256 or fewer characters.
namestringOutput only. The resource name of the entity, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}.
descriptionstringOptional. User friendly longer description text. Must be shorter than or equal to 1024 characters.
accessobjectDescribes the access mechanism of the data within its storage location.
assetstringRequired. Immutable. The ID of the asset associated with the storage location containing the entity data. The entity must be with in the same zone with the asset.
catalogEntrystringOutput only. The name of the associated Data Catalog entry.
compatibilityobjectProvides compatibility information for various metadata stores.
createTimestringOutput only. The time when the entity was created.
dataPathstringRequired. Immutable. The storage path of the entity data. For Cloud Storage data, this is the fully-qualified path to the entity, such as gs://bucket/path/to/data. For BigQuery data, this is the name of the table resource, such as projects/project_id/datasets/dataset_id/tables/table_id.
dataPathPatternstringOptional. The set of items within the data path constituting the data in the entity, represented as a glob path. Example: gs://bucket/path/to/data/*/.csv.
displayNamestringOptional. Display name must be shorter than or equal to 256 characters.
etagstringOptional. The etag associated with the entity, which can be retrieved with a GetEntity request. Required for update and delete requests.
formatobjectDescribes the format of the data within its storage location.
schemaobjectSchema information describing the structure and layout of the data.
systemstringRequired. Immutable. Identifies the storage system of the entity data.
typestringRequired. Immutable. The type of entity.
uidstringOutput only. System generated unique ID for the Entity. This ID will be different if the Entity is deleted and re-created with the same name.
updateTimestringOutput only. The time when the entity was last updated.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_lakes_zones_entities_getSELECTentitiesId, lakesId, locationsId, projectsId, zonesIdGet a metadata entity.
projects_locations_lakes_zones_entities_listSELECTlakesId, locationsId, projectsId, zonesIdList metadata entities in a zone.
projects_locations_lakes_zones_entities_createINSERTlakesId, locationsId, projectsId, zonesIdCreate a metadata entity.
projects_locations_lakes_zones_entities_deleteDELETEentitiesId, lakesId, locationsId, projectsId, zonesIdDelete a metadata entity.
projects_locations_lakes_zones_entities_updateREPLACEentitiesId, lakesId, locationsId, projectsId, zonesIdUpdate a metadata entity. Only supports full resource update.

SELECT examples

List metadata entities in a zone.

SELECT
id,
name,
description,
access,
asset,
catalogEntry,
compatibility,
createTime,
dataPath,
dataPathPattern,
displayName,
etag,
format,
schema,
system,
type,
uid,
updateTime
FROM google.dataplex.entities
WHERE 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 entities resource.

/*+ create */
INSERT INTO google.dataplex.entities (
lakesId,
locationsId,
projectsId,
zonesId,
displayName,
description,
etag,
type,
asset,
dataPath,
dataPathPattern,
system,
format,
schema
)
SELECT
'{{ lakesId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ zonesId }}',
'{{ displayName }}',
'{{ description }}',
'{{ etag }}',
'{{ type }}',
'{{ asset }}',
'{{ dataPath }}',
'{{ dataPathPattern }}',
'{{ system }}',
'{{ format }}',
'{{ schema }}'
;

REPLACE example

Replaces all fields in the specified entities resource.

/*+ update */
REPLACE google.dataplex.entities
SET
displayName = '{{ displayName }}',
description = '{{ description }}',
etag = '{{ etag }}',
type = '{{ type }}',
asset = '{{ asset }}',
dataPath = '{{ dataPath }}',
dataPathPattern = '{{ dataPathPattern }}',
system = '{{ system }}',
format = '{{ format }}',
schema = '{{ schema }}'
WHERE
entitiesId = '{{ entitiesId }}'
AND lakesId = '{{ lakesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND zonesId = '{{ zonesId }}';

DELETE example

Deletes the specified entities resource.

/*+ delete */
DELETE FROM google.dataplex.entities
WHERE entitiesId = '{{ entitiesId }}'
AND lakesId = '{{ lakesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND zonesId = '{{ zonesId }}';